Kafka Output fails to authenticate with kerberos

I'm trying to write data to Kafka broker authenticated with Kerberos with GSSAPI and SASL. When I start the logstash agent it errors out with Receive Timeout from Kerberos but when i use kinit to get the ticket from kerberos, it works perfectly fine without any issues.

Logstash Config:

     input {
      file {
        path => "<path of log file to monitor>"
    output {
      kafka {
            topic_id => "<topic>"
            bootstrap_servers => "broker-list"
            compression_type => "snappy"
            jaas_path => "<path/to/jaas/config/file>"
            kerberos_config => "/etc/krb5.conf"
            sasl_kerberos_service_name => "kafka"
            security_protocol => "SASL_SSL"
            client_id => "<unique identifier of client>"
            ssl_truststore_location => "<ssl truststore in jks format>"
            ssl_truststore_password => "<password for truststore>"

Logstash version: 7.9.2

How do i fix this issue?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.