<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Kafka producer/consumer with kerberos authentication not working,  Error while fetching metadata with correlation id 299 : {test=LEADER_NOT_AVAILABLE} in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Kafka-producer-consumer-with-kerberos-authentication-not/m-p/243793#M205591</link>
    <description>&lt;P&gt;&lt;EM&gt; &lt;A href="https://community.hortonworks.com/questions/238852/@hoda%20moradi"&gt;@hoda moradi&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Your kafka_jaas.conf and contradicting entries 4 in number can you back up the current file and re-adjust the one I have attached on all the brokers if multimode.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Below is functioning SSL, Kerberos config &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;#########################################################
# server.properties
#########################################################
listeners=PLAINTEXT://0.0.0.0:9092,SSL:0.0.0.0:9093,SASL_SSL://0.0.0.0:9094
advertised.listeners=PLAINTEXT://FQDN_Broker:9092,SSL://FQDN_Broker:9093,SASL_SSL://FQDN_Broker:9092

sasl.enabled.mechanisms=GSSAPI
sasl.kerberos.service.name=kafka &lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Client&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;#########################################################
# kafka_client_jaas.conf:
#########################################################
KafkaClient {
com.sun.security.auth.module.Krb5LoginModule required
useTicketCache=true
renewTicket=true
serviceName="kafka";
}; &lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Server&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;#########################################################
# kafka_jaas.conf
#########################################################
KafkaServer {
    com.sun.security.auth.module.Krb5LoginModule required
    useKeyTab=true
    storeKey=true
    keyTab="/etc/security/keytabs/kafka.service.keytab"
    useTicketCache=false
    serviceName="kafka"
    principal="kafka/_host@EXAMPLE.COM";
    }; &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;After these steps restart the Kafka broker(s) please revert&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Feb 2019 06:29:51 GMT</pubDate>
    <dc:creator>Shelton</dc:creator>
    <dc:date>2019-02-08T06:29:51Z</dc:date>
  </channel>
</rss>

