fluentd kafka plugin fails to connect to kafka server using sasl(kerberos) authentication #5046
Unanswered
Naveenrajp26
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is a problem?
i am trying to push the data to kafka server which is setup with kerberos authentication and i am facing below error in sending the data. please suggest
fluentd logs:
{"time":"2025-08-03T02:24:59.891530Z","level":"warn","message":"rdkafka: [thrd:sim0142node02.tre.nsn-rdnet.net:9093/bootstrap]: :9093/bootstrap: Disconnected: verify that security.protocol is correctly configured, broker might require SASL authentication (after 340ms in state UP, 4 identical error(s) suppressed)","worker_id":3}
{"time":"2025-08-03T02:25:00.370518Z","level":"warn","message":"rdkafka: [thrd:sim0142node02.tre.nsn-rdnet.net:9093/bootstrap]: :9093/bootstrap: Disconnected: verify that security.protocol is correctly configured, broker might require SASL authentication (after 257ms in state UP, 4 identical error(s) suppressed)","worker_id":3}
version of kafka packages:
bash-5.1$ fluent-gem list | grep kafka
fluent-plugin-kafka (0.19.5, 0.19.2)
rdkafka (0.12.0)
ruby-kafka (1.5.0)
bash-5.1$
fluentd.conf
bash-5.1$ cat /etc/fluent/fluentd.conf
#If you have own configuration for fluentd other than provided by belk/clog then set fluentd_config: custom-value and provide your configuration below. Example-
workers 4
format json
time_format %Y-%m-%dT%H:%M:%S.%6NZ
ignore_same_log_interval 30s
@include /etc/fluent/filter.conf
@include /etc/fluent/rdkafka_no_tls.conf
rdkafka_no_tls.conf
@type rdkafka2 @log_level debug@type copy
copy_mode shallow
bash-5.1$ klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: kafka_client/@TRE.NSN-RDNET.NET
Valid starting Expires Service principal
08/03/25 02:08:31 08/04/25 02:08:31 krbtgt/[email protected]
bash-5.1$
cat config/kafka_server_jaas.conf
// Specifies a unique keytab and principal name for each broker
KafkaServer {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
storeKey=true
keyTab="/etc/security/keytabs/kafka.keytab"
principal="kafka/@TRE.NSN-RDNET.NET";
};
Client {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
storeKey=true
keyTab="/etc/security/keytabs/kafka_client.keytab"
principal="kafka_client/@TRE.NSN-RDNET.NET";
};
server.properties
listeners=SASL_PLAINTEXT://:9093
advertised.listeners=SASL_PLAINTEXT://:9093
listener.security.protocol.map=SASL_PLAINTEXT:SASL_PLAINTEXT
security.inter.broker.protocol=SASL_PLAINTEXT
sasl.kerberos.service.name=kafka
Specify one of of the SASL mechanisms
sasl.mechanism.inter.broker.protocol=GSSAPI
zookeeper.connect=:2181
zookeeper.connection.timeout.ms=18000
zookeeper.sasl.client=false
Describe the configuration of Fluentd
No response
Describe the logs of Fluentd
No response
Environment
Beta Was this translation helpful? Give feedback.
All reactions