kafka_exporter
kafka_exporter copied to clipboard
Kafka exporter not working with SASL/SCRAM
Our kafka cluster has SASL/SCRAM security mechanism and kafka exporter throws this error-
INFO[0000] Starting kafka_exporter (version=1.2.0, branch=HEAD, revision=830660212e6c109e69dcb1cb58f5159fe3b38903) source="kafka_exporter.go:474"
INFO[0000] Build context (go=go1.10.3, user=root@981cde178ac4, date=20180707-14:34:48) source="kafka_exporter.go:475"
ERRO[0001] Error Init Kafka Client source="kafka_exporter.go:210"
panic: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)
goroutine 1 [running]:
main.NewExporter(0xc42006a420, 0x1, 0x1, 0x100, 0x7ffd8252476a, 0xb, 0x7ffd82524786, 0x12, 0x1, 0x7ffd825247a7, ...)
/go/src/github.com/danielqsj/kafka_exporter/kafka_exporter.go:211 +0x847
main.main()
/go/src/github.com/danielqsj/kafka_exporter/kafka_exporter.go:481 +0x215b
PS- It works fine with SASL/PLAIN. Is it known issue?
Can you please post your configuration parameters for SASL/PLAIN? I am attempting to connect to a ConfluentCloud hosted Kafka cluster authenticated with sasl.mechanism=PLAIN and security.protocol=SASL_SSL
Can you please post your configuration parameters for SASL/PLAIN? I am attempting to connect to a ConfluentCloud hosted Kafka cluster authenticated with sasl.mechanism=PLAIN and security.protocol=SASL_SSL
Me too and it works now with --tls.insecure-skip-tls-verify
and --tls.enabled
View my reply here: https://github.com/danielqsj/kafka_exporter/issues/116#issuecomment-559108062
Only needed to add --tls.insecure-skip-tls-verify in my case, thanks for your reply :+1:
I have the same "issue", But add --tls.insecure-skip-tls-verify does not working for me. I'm no using TLS.
Parameters for SASL:
bootstrap.servers=localhost:9092
security.protocol=SASL_PLAINTEXT
sasl.mechanism=SCRAM-SHA-256
./kafka_exporter --sasl.enabled --sasl.username="xxx" --sasl.password="xxx" --tls.enabled --tls.insecure-skip-tls-verify --kafka.version=2.12.2 --log.level=debug
INFO[0000] Starting kafka_exporter (version=1.2.0, branch=HEAD, revision=830660212e6c109e69dcb1cb58f5159fe3b38903) source="kafka_exporter.go:474"
INFO[0000] Build context (go=go1.10.3, user=root@981cde178ac4, date=20180707-14:34:48) source="kafka_exporter.go:475"
ERRO[0000] Error Init Kafka Client source="kafka_exporter.go:210"
panic: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)
goroutine 1 [running]:
main.NewExporter(0xc4200817c0, 0x1, 0x1, 0x101, 0x7ffd57bb8606, 0x5, 0x7ffd57bb861c, 0xd, 0x1, 0x8f22f8, ...)
/go/src/github.com/danielqsj/kafka_exporter/kafka_exporter.go:211 +0x847
main.main()
/go/src/github.com/danielqsj/kafka_exporter/kafka_exporter.go:481 +0x215b
I met the same mistake, is there any solution
I met the same mistake, is there any solution
I am also running into the same issue.
it looks like the latest docker image does not have the changes for scram support. Its not built from master branch
what worked for me is
./kafka_exporter --kafka.server=url:port \
--web.listen-address=:7071 \
--sasl.enabled \
--sasl.username="user" \
--sasl.password="password" \
--sasl.kerberos-auth-type="userAuth" \
--sasl.mechanism="scram-sha512" \
--tls.insecure-skip-tls-verify \
--tls.enabled \
--log.level=debug
Thanks @sandjaie for the solution, I was missing --sasl.enabled