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

metrics.reporters breaks kafka cli commands #2242

Open
swood opened this issue Jan 28, 2025 · 0 comments
Open

metrics.reporters breaks kafka cli commands #2242

swood opened this issue Jan 28, 2025 · 0 comments

Comments

@swood
Copy link

swood commented Jan 28, 2025

Hello.

I bumped into a weird problem where any Kafka cli commands are broken if there are metrics.exporter option in the Kafka server configuration file.

My current server config is:

metric.reporters=com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
cruise.control.metrics.reporter.bootstrap.servers=10.10.10.1:9093,10.10.10.2:9093,10.10.10.3:9093
cruise.control.metrics.reporter.listener.security.protocol.map=SSL:SSL
cruise.control.metrics.reporter.ssl.keystore.type=JKS
cruise.control.metrics.reporter.ssl.truststore.type=JKS
cruise.control.metrics.reporter.ssl.client.auth=required
cruise.control.metrics.reporter.security.protocol=SSL
cruise.control.metrics.reporter.ssl.protocol=TLS
cruise.control.metrics.reporter.ssl.enabled.protocols=TLSv1.2
cruise.control.metrics.reporter.ssl.truststore.location=/etc/ssl/kafka/kafka.truststore.jks
cruise.control.metrics.reporter.ssl.keystore.location=/etc/ssl/kafka/kafka.keystore.jks
cruise.control.metrics.reporter.ssl.truststore.password=password
cruise.control.metrics.reporter.ssl.keystore.password=password
cruise.control.metrics.reporter.ssl.key.password=password

I see the broker metrics in the CruiseControl UI. However, I am getting an error if I'm trying to call any Kafka scripts:

/kafka/bin/kafka-acls.sh --bootstrap-server 10.10.10.1:9093 --command-config /kafka/server.properties --list
Error while executing ACL command: Failed to create new KafkaAdminClient
org.apache.kafka.common.KafkaException: Failed to create new KafkaAdminClient
	at org.apache.kafka.clients.admin.KafkaAdminClient.createInternal(KafkaAdminClient.java:551)
	at org.apache.kafka.clients.admin.KafkaAdminClient.createInternal(KafkaAdminClient.java:488)
	at org.apache.kafka.clients.admin.Admin.create(Admin.java:134)
	at kafka.admin.AclCommand$AdminClientService.listAcls(AclCommand.scala:100)
	at kafka.admin.AclCommand$.main(AclCommand.scala:77)
	at kafka.admin.AclCommand.main(AclCommand.scala)
Caused by: java.lang.NumberFormatException: Cannot parse null string
	at java.base/java.lang.Integer.parseInt(Integer.java:630)
	at java.base/java.lang.Integer.parseInt(Integer.java:786)
	at com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter.configure(CruiseControlMetricsReporter.java:186)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstance(AbstractConfig.java:401)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstances(AbstractConfig.java:482)
	at org.apache.kafka.common.config.AbstractConfig.getConfiguredInstances(AbstractConfig.java:460)
	at org.apache.kafka.clients.CommonClientConfigs.metricsReporters(CommonClientConfigs.java:238)
	at org.apache.kafka.clients.CommonClientConfigs.metricsReporters(CommonClientConfigs.java:234)
	at org.apache.kafka.clients.admin.KafkaAdminClient.createInternal(KafkaAdminClient.java:512)
	... 5 more

Does anyone know what parameter should I set to avoid this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant