Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka - configurable javax.net.debug setting #1891

Merged
merged 2 commits into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-0.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- [#1872](https://github.com/epiphany-platform/epiphany/issues/1872) - pythonPath in launch.json is not supported
- [#1868](https://github.com/epiphany-platform/epiphany/issues/1868) - Repository host runs Ubuntu on Azure/RHEL cluster
- [#1875](https://github.com/epiphany-platform/epiphany/issues/1875) - epicli upgrade fails when there is no kubernetes_master group in inventory
- [#1834](https://github.com/epiphany-platform/epiphany/issues/1834) - Kafka - Disable debug logging and make this option configurable

### Updated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Description=Kafka Daemon
After=zookeeper.service

{% if specification.kafka_var.javax_net_debug is defined %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kafka_var ? maybe we should refactor this sometime in the future ? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sk4zuzu have you seen "Gopher's day" movie? ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know... 😞

{% set javax_debug = '-Djavax.net.debug=' ~ specification.kafka_var.javax_net_debug %}
{% else %}
{% set javax_debug = '' %}
{% endif %}

[Service]
Type=simple
User=kafka
Expand All @@ -11,9 +17,9 @@ Restart=on-failure
Environment="KAFKA_HEAP_OPTS={{ specification.kafka_var.heap_opts }}"
Environment="LOG_DIR={{ specification.kafka_var.log_dir }}"
{% if exporter.stat.exists %}
Environment="KAFKA_OPTS=-Djavax.net.debug=all -javaagent:{{ specification.prometheus_jmx_path }}={{ specification.prometheus_jmx_exporter_web_listen_port }}:{{ specification.prometheus_jmx_config }}"
Environment="KAFKA_OPTS={{ javax_debug }} -javaagent:{{ specification.prometheus_jmx_path }}={{ specification.prometheus_jmx_exporter_web_listen_port }}:{{ specification.prometheus_jmx_config }}"
{% else %}
Environment="KAFKA_OPTS=-Djavax.net.debug=all"
Environment="KAFKA_OPTS={{ javax_debug }}"
{% endif %}
Environment="KAFKA_JMX_OPTS={{ specification.kafka_var.jmx_opts }}"
ExecStart=/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/server.properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ specification:
enabled: True
admin: kafka
admin_pwd: epiphany
# javax_net_debug: all # uncomment to activate debugging, other debug options: https://colinpaice.blog/2020/04/05/using-java-djavax-net-debug-to-examine-data-flows-including-tls/
security:
ssl:
enabled: False
Expand Down