# Kafka Output fails to authenticate with kerberos

**URL:** https://discuss.elastic.co/t/kafka-output-fails-to-authenticate-with-kerberos/257906
**Category:** Logstash
**Created:** [December 7, 2020, 7:57pm UTC](https://discuss.elastic.co/t/kafka-output-fails-to-authenticate-with-kerberos/257906 "2020-12-07T19:57:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![burkeg](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@burkeg](https://discuss.elastic.co/u/burkeg)
#### Post date: [December 7, 2020, 7:57pm UTC](https://discuss.elastic.co/t/kafka-output-fails-to-authenticate-with-kerberos/257906/1 "2020-12-07T19:57:56Z")

</div>

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:

```auto
     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?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 4, 2021, 7:58pm UTC](https://discuss.elastic.co/t/kafka-output-fails-to-authenticate-with-kerberos/257906/2 "2021-01-04T19:58:02Z")

</div>

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