<?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 client code does not currently support obtaining a password from the user in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/298075#M218983</link>
    <description>&lt;P&gt;From jaas file I see that the debug=true was added, on the other hand, the debug is not showing up in the producer output, which means that the jaas file provided is not picker up properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you check the kafka-console-producer.sh you'll notice below lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# check if kafka_jaas.conf in config , only enable client_kerberos_params in secure mode.
KAFKA_HOME="$(dirname $(cd "$( dirname "${BASH_SOURCE[0]}" )" &amp;amp;&amp;amp; pwd ))"
KAFKA_JAAS_CONF=$KAFKA_HOME/config/kafka_jaas.conf
if [ -f $KAFKA_JAAS_CONF ]; then
    export KAFKA_CLIENT_KERBEROS_PARAMS="-Djava.security.auth.login.config=$KAFKA_HOME/config/kafka_client_jaas.conf"
fi&lt;/LI-CODE&gt;&lt;P&gt;Try editing kafka_client_jaas.conf&amp;nbsp; or also you can try to export using KAFKA_CLIENT_KERBEROS_PARAMS and see if that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manuel.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jun 2020 16:37:30 GMT</pubDate>
    <dc:creator>ManuelCalvo</dc:creator>
    <dc:date>2020-06-15T16:37:30Z</dc:date>
    <item>
      <title>Kafka client code does not currently support obtaining a password from the user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/283879#M210864</link>
      <description>&lt;P&gt;I'm getting below error message while trying to produce data from kafka topic in the kerberized HDP cluster.&lt;/P&gt;
&lt;P&gt;Error:&lt;/P&gt;
&lt;P&gt;DEBUG [Producer clientId=console-producer] Kafka producer has been closed (org.apache.kafka.clients.producer.KafkaProducer)&lt;BR /&gt;org.apache.kafka.common.KafkaException: Failed to construct kafka producer&lt;BR /&gt;at org.apache.kafka.clients.producer.KafkaProducer.&amp;lt;init&amp;gt;(KafkaProducer.java:457)&lt;BR /&gt;&lt;STRONG&gt;Caused by: org.apache.kafka.common.KafkaException: javax.security.auth.login.LoginException: Could not login: the client is being asked for a password, but the Kafka client code does not currently support obtaining a password from the user. not available to garner authentication information from the user&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Stack:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;HDP 3.1.0
Kafka 1.0.0.3.1&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;$KAFKA_HOME="/usr/hdp/3.1.0.0-78/kafka"
$BROKER_LIST="&amp;lt;broker-list&amp;gt;"
$ZK_HOSTS="&amp;lt;zk-host-list&amp;gt;:2181/kafka"
$export KAFKA_OPTS="-Djava.security.auth.login.config=/home/&amp;lt;user&amp;gt;/jaas.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=true -Dsun.security.krb5.debug=true"
$export KAFKA_CLIENT_KERBEROS_PARAMS="-Djava.security.auth.login.config=/home/&amp;lt;user&amp;gt;/jaas.conf -Dsun.security.krb5.debug=true" &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$cat jaas.conf&lt;/P&gt;
&lt;P&gt;---using user keytab &amp;amp; principal for authentication and disabled useTicketCache---&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;KafkaClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/home/&amp;lt;user&amp;gt;/user.keytab"
storeKey=true
useTicketCache=false
serviceName="kafka"
principal="user@domain.COM";
};
Client {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/home/&amp;lt;user&amp;gt;/user.keytab"
storeKey=true
useTicketCache=false
serviceName="zookeeper"
principal="user@domain.COM";
};&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$cat client.properties&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;security.protocol=SASL_PLAINTEXT
sasl.mechanism=GSSAPI
sasl.kerberos.service.name=kafka&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$klist&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;~]$ klist
klist: No credentials cache found (filename: /tmp/krb5cc_121852)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$kafka-console-producer.sh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$KAFKA_HOME/bin/kafka-console-producer.sh --broker-list &amp;lt;broker-list&amp;gt;:9092 --topic testtopic --producer.config /home/&amp;lt;user&amp;gt;/client.properties&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;full error log:&lt;/P&gt;
&lt;P&gt;[2019-11-23 10:05:45,614] DEBUG Added sensor with name bufferpool-wait-time (org.apache.kafka.common.metrics.Metrics)&lt;BR /&gt;[2019-11-23 10:05:45,617] DEBUG Added sensor with name buffer-exhausted-records (org.apache.kafka.common.metrics.Metrics)&lt;BR /&gt;[2019-11-23 10:05:45,620] DEBUG Updated cluster metadata version 1 to Cluster(id = null, nodes = [sl975iaehdp0401.visa.com:9092 (id: -1 rack: null)], partitions = [], controller = null) (org.apache.kafka.clients.Metadata)&lt;BR /&gt;[2019-11-23 10:05:45,637] INFO [Producer clientId=console-producer] Closing the Kafka producer with timeoutMillis = 0 ms. (org.apache.kafka.clients.producer.KafkaProducer)&lt;BR /&gt;[2019-11-23 10:05:45,638] DEBUG [Producer clientId=console-producer] Kafka producer has been closed (org.apache.kafka.clients.producer.KafkaProducer)&lt;BR /&gt;org.apache.kafka.common.KafkaException: Failed to construct kafka producer&lt;BR /&gt;at org.apache.kafka.clients.producer.KafkaProducer.&amp;lt;init&amp;gt;(KafkaProducer.java:457)&lt;BR /&gt;at org.apache.kafka.clients.producer.KafkaProducer.&amp;lt;init&amp;gt;(KafkaProducer.java:304)&lt;BR /&gt;at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:45)&lt;BR /&gt;at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala)&lt;BR /&gt;Caused by: org.apache.kafka.common.KafkaException: javax.security.auth.login.LoginException: Could not login: the client is being asked for a password, but the Kafka client code does not currently support obtaining a password from the user. not available to garner authentication information from the user&lt;BR /&gt;at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:153)&lt;BR /&gt;at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:140)&lt;BR /&gt;at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:65)&lt;BR /&gt;at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:88)&lt;BR /&gt;at org.apache.kafka.clients.producer.KafkaProducer.&amp;lt;init&amp;gt;(KafkaProducer.java:414)&lt;BR /&gt;... 3 more&lt;BR /&gt;Caused by: javax.security.auth.login.LoginException: Could not login: the client is being asked for a password, but the Kafka client code does not currently support obtaining a password from the user. not available to garner authentication information from the user&lt;BR /&gt;at com.sun.security.auth.module.Krb5LoginModule.promptForPass(Krb5LoginModule.java:940)&lt;BR /&gt;at com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:760)&lt;BR /&gt;at com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:617)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)&lt;BR /&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;BR /&gt;at java.lang.reflect.Method.invoke(Method.java:498)&lt;BR /&gt;at javax.security.auth.login.LoginContext.invoke(LoginContext.java:755)&lt;BR /&gt;at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195)&lt;BR /&gt;at javax.security.auth.login.LoginContext$4.run(LoginContext.java:682)&lt;BR /&gt;at javax.security.auth.login.LoginContext$4.run(LoginContext.java:680)&lt;BR /&gt;at java.security.AccessController.doPrivileged(Native Method)&lt;BR /&gt;at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)&lt;BR /&gt;at javax.security.auth.login.LoginContext.login(LoginContext.java:587)&lt;BR /&gt;at org.apache.kafka.common.security.authenticator.AbstractLogin.login(AbstractLogin.java:60)&lt;BR /&gt;at org.apache.kafka.common.security.kerberos.KerberosLogin.login(KerberosLogin.java:103)&lt;BR /&gt;at org.apache.kafka.common.security.authenticator.LoginManager.&amp;lt;init&amp;gt;(LoginManager.java:65)&lt;BR /&gt;at org.apache.kafka.common.security.authenticator.LoginManager.acquireLoginManager(LoginManager.java:125)&lt;BR /&gt;at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:142)&lt;BR /&gt;... 7 more&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help on this.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Nov 2019 14:40:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/283879#M210864</guid>
      <dc:creator>sampathkumar_ma</dc:creator>
      <dc:date>2019-11-23T14:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka client code does not currently support obtaining a password from the user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/283989#M210939</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/18550"&gt;@sampathkumar_ma&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please check if the user running the command has permissions to get a valid ticket from: "/home/&amp;lt;user&amp;gt;/user.keytab"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, add "debug=true" in the jaas file to get more details:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;KafkaClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/home/&amp;lt;user&amp;gt;/user.keytab"
storeKey=true
debug=true
useTicketCache=false
serviceName="kafka"
principal="user@domain.COM";
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 17:01:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/283989#M210939</guid>
      <dc:creator>ManuelCalvo</dc:creator>
      <dc:date>2019-11-25T17:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka client code does not currently support obtaining a password from the user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/284001#M210949</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/34938"&gt;@ManuelCalvo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, keytab has right permission to get the valid ticket. I tried taking the ticket manually &amp;amp; it works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I observed here was environment variable KAFKA_OPTS was ignored&amp;nbsp;by kafka clients.The console producer/consumer should work with the KAFKA_OPTS environment variable that is expected to have priority over the system variables;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I exported KAFKA_OPTS pointing to the JAAS file and Kerberos client configuration file, but it's not working!!!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Kafka-version :&amp;nbsp;2.0.0.3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;export KAFKA_OPTS="-Djava.security.auth.login.config=/home/&amp;lt;user&amp;gt;/jaas.conf -Djava.security.krb5.conf=/etc/krb5.conf"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;error:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Caused by: org.apache.kafka.common.KafkaException: javax.security.auth.login.LoginException: Could not login: the client is being asked for a password, but the Kafka client code does not currently support obtaining a password from the user. not available to garner  authentication information from the user
        at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:153)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;If I pass SASL parameters as below in the client.properties, I'm able to produce/consume data from Topics without any issue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$KAFKA_HOME/bin/kafka-console-producer.sh --broker-list $BROKER_LIST --topic testtopic --producer.config /home/&amp;lt;user&amp;gt;/client.properties&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;$cat client.properties
security.protocol=SASL_PLAINTEXT
sasl.mechanism=GSSAPI
#sasl.kerberos.service.name=kafka
sasl.jaas.config=com.sun.security.auth.module.Krb5LoginModule required \
useKeyTab=true \
storeKey=true \
keyTab="/home/&amp;lt;user&amp;gt;/&amp;lt;user&amp;gt;.keytab" \
useTicketCache=false \
serviceName="kafka" \
principal="user@domain.COM";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any idea why export&amp;nbsp;&lt;SPAN&gt;KAFKA_OPTS is not working here?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 20:16:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/284001#M210949</guid>
      <dc:creator>sampathkumar_ma</dc:creator>
      <dc:date>2019-11-25T20:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka client code does not currently support obtaining a password from the user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/284077#M210996</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/18550"&gt;@sampathkumar_ma&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;export KAFA_OPTS should work in this case. Could you please add "debug=true" to the jaas file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;KafkaClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/home/&amp;lt;user&amp;gt;/user.keytab"
storeKey=true
debug=true
useTicketCache=false
serviceName="kafka"
principal="user@domain.COM";
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Share the complete output, we should see something similar to:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Debug is  true storeKey false useTicketCache true useKeyTab false doNotPrompt false ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is false useFirstPass is false storePass is false clearPass is false
Acquire TGT from Cache
Principal is kafka/host@EXAMPLE.COM
Commit Succeeded &lt;/LI-CODE&gt;&lt;P&gt;Also along with that you can enable DEBUG under:&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;/etc/kafka/conf/tools-log4j.properties&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Change WARN to DEBUG and run the client and share the details.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 15:10:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/284077#M210996</guid>
      <dc:creator>ManuelCalvo</dc:creator>
      <dc:date>2019-11-26T15:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka client code does not currently support obtaining a password from the user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/284458#M211221</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/34938"&gt;@ManuelCalvo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Changed WARN to DEBUG and ran the kafka producer.&amp;nbsp;&lt;/SPAN&gt;Please find the details below:&lt;/P&gt;&lt;P&gt;jaas.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;KafkaClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/home/user.keytab"
storeKey=true
useTicketCache=false
debug=true
serviceName="kafka"
principal="user@domain.COM";
};
Client {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/home/&amp;lt;user&amp;gt;/user.keytab"
storeKey=true
useTicketCache=false
debug=true
serviceName="zookeeper"
principal="user@domain.COM";
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;client.propertis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;security.protocol=SASL_PLAINTEXT
sasl.kerberos.service.name=kafka&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kafka-producer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[&amp;lt;user&amp;gt;@server ~]$export KAFKA_OPTS="-Djava.security.auth.login.config=/home/&amp;lt;user&amp;gt;/jaas.conf -Djava.security.krb5.conf=/etc/krb5.conf -Dsun.security.krb5.debug=true"
[&amp;lt;user&amp;gt;@server ~]$ $KAFKA_HOME/bin/kafka-console-producer.sh --broker-list $BROKER_LIST --producer.config /home/&amp;lt;user&amp;gt;/client.properties --topic testtopic&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;full error log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[&amp;lt;user&amp;gt;@server ~]$ $KAFKA_HOME/bin/kafka-console-producer.sh --broker-list $BROKER_LIST --producer.config /home/&amp;lt;user&amp;gt;/client.properties --topic testtopic
[2019-11-30 12:52:57,917] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2019-11-30 12:52:57,977] INFO ProducerConfig values:
        acks = 1
        batch.size = 16384
        bootstrap.servers = [server1:9092, server2:9092, server3:9092, server4:9092]
        buffer.memory = 33554432
        client.id = console-producer
        compression.type = none
        connections.max.idle.ms = 540000
        enable.idempotence = false
        interceptor.classes = []
        key.serializer = class org.apache.kafka.common.serialization.ByteArraySerializer
        linger.ms = 1000
        max.block.ms = 60000
        max.in.flight.requests.per.connection = 5
        max.request.size = 1048576
        metadata.max.age.ms = 300000
        metric.reporters = []
        metrics.num.samples = 2
        metrics.recording.level = INFO
        metrics.sample.window.ms = 30000
        partitioner.class = class org.apache.kafka.clients.producer.internals.DefaultPartitioner
        receive.buffer.bytes = 32768
        reconnect.backoff.max.ms = 1000
        reconnect.backoff.ms = 50
        request.timeout.ms = 1500
        retries = 3
        retry.backoff.ms = 100
        sasl.client.callback.handler.class = null
        sasl.jaas.config = null
        sasl.kerberos.kinit.cmd = /usr/bin/kinit
        sasl.kerberos.min.time.before.relogin = 60000
        sasl.kerberos.service.name = kafka
        sasl.kerberos.ticket.renew.jitter = 0.05
        sasl.kerberos.ticket.renew.window.factor = 0.8
        sasl.login.callback.handler.class = null
        sasl.login.class = null
        sasl.login.refresh.buffer.seconds = 300
        sasl.login.refresh.min.period.seconds = 60
        sasl.login.refresh.window.factor = 0.8
        sasl.login.refresh.window.jitter = 0.05
        sasl.mechanism = GSSAPI
        security.protocol = SASL_PLAINTEXT
        send.buffer.bytes = 102400
        ssl.cipher.suites = null
        ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
        ssl.endpoint.identification.algorithm = https
        ssl.key.password = null
        ssl.keymanager.algorithm = SunX509
        ssl.keystore.location = null
        ssl.keystore.password = null
        ssl.keystore.type = JKS
        ssl.protocol = TLS
        ssl.provider = null
        ssl.secure.random.implementation = null
        ssl.trustmanager.algorithm = PKIX
        ssl.truststore.location = null
        ssl.truststore.password = null
        ssl.truststore.type = JKS
        transaction.timeout.ms = 60000
        transactional.id = null
        value.serializer = class org.apache.kafka.common.serialization.ByteArraySerializer
 (org.apache.kafka.clients.producer.ProducerConfig)
[2019-11-30 12:52:57,997] DEBUG Added sensor with name bufferpool-wait-time (org.apache.kafka.common.metrics.Metrics)
[2019-11-30 12:52:58,000] DEBUG Added sensor with name buffer-exhausted-records (org.apache.kafka.common.metrics.Metrics)
[2019-11-30 12:52:58,191] DEBUG Updated cluster metadata version 1 to Cluster(id = null, nodes = [server1:9092 (id: -2 rack: null), server2:9092 (id: -1 rack: null), server3:9092 (id: -4 rack: null), server4:9092 (id: -3 rack: null)], partitions = [], controller = null) (org.apache.kafka.clients.Metadata)
[2019-11-30 12:52:58,210] INFO [Producer clientId=console-producer] Closing the Kafka producer with timeoutMillis = 0 ms. (org.apache.kafka.clients.producer.KafkaProducer)
[2019-11-30 12:52:58,211] DEBUG [Producer clientId=console-producer] Kafka producer has been closed (org.apache.kafka.clients.producer.KafkaProducer)
org.apache.kafka.common.KafkaException: Failed to construct kafka producer
        at org.apache.kafka.clients.producer.KafkaProducer.&amp;lt;init&amp;gt;(KafkaProducer.java:457)
        at org.apache.kafka.clients.producer.KafkaProducer.&amp;lt;init&amp;gt;(KafkaProducer.java:304)
        at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:45)
        at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala)
Caused by: org.apache.kafka.common.KafkaException: javax.security.auth.login.LoginException: Could not login: the client is being asked for a password, but the Kafka client code does not currently support obtaining a password from the user. not available to garner  authentication information from the user
        at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:153)
        at org.apache.kafka.common.network.ChannelBuilders.create(ChannelBuilders.java:140)
        at org.apache.kafka.common.network.ChannelBuilders.clientChannelBuilder(ChannelBuilders.java:65)
        at org.apache.kafka.clients.ClientUtils.createChannelBuilder(ClientUtils.java:88)
        at org.apache.kafka.clients.producer.KafkaProducer.&amp;lt;init&amp;gt;(KafkaProducer.java:414)
        ... 3 more
Caused by: javax.security.auth.login.LoginException: Could not login: the client is being asked for a password, but the Kafka client code does not currently support obtaining a password from the user. not available to garner  authentication information from the user
        at com.sun.security.auth.module.Krb5LoginModule.promptForPass(Krb5LoginModule.java:940)
        at com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:760)
        at com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:617)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:755)
        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:195)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:682)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:680)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
        at javax.security.auth.login.LoginContext.login(LoginContext.java:587)
        at org.apache.kafka.common.security.authenticator.AbstractLogin.login(AbstractLogin.java:60)
        at org.apache.kafka.common.security.kerberos.KerberosLogin.login(KerberosLogin.java:103)
        at org.apache.kafka.common.security.authenticator.LoginManager.&amp;lt;init&amp;gt;(LoginManager.java:65)
        at org.apache.kafka.common.security.authenticator.LoginManager.acquireLoginManager(LoginManager.java:125)
        at org.apache.kafka.common.network.SaslChannelBuilder.configure(SaslChannelBuilder.java:142)
        ... 7 more
[&amp;lt;user&amp;gt;@server ~]$&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 13:05:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/284458#M211221</guid>
      <dc:creator>sampathkumar_ma</dc:creator>
      <dc:date>2019-11-30T13:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka client code does not currently support obtaining a password from the user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/298072#M218980</link>
      <description>&lt;P&gt;I am facing the same issue. Did any of you get this working ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 16:01:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/298072#M218980</guid>
      <dc:creator>BMODEV</dc:creator>
      <dc:date>2020-06-15T16:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka client code does not currently support obtaining a password from the user</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/298075#M218983</link>
      <description>&lt;P&gt;From jaas file I see that the debug=true was added, on the other hand, the debug is not showing up in the producer output, which means that the jaas file provided is not picker up properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you check the kafka-console-producer.sh you'll notice below lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# check if kafka_jaas.conf in config , only enable client_kerberos_params in secure mode.
KAFKA_HOME="$(dirname $(cd "$( dirname "${BASH_SOURCE[0]}" )" &amp;amp;&amp;amp; pwd ))"
KAFKA_JAAS_CONF=$KAFKA_HOME/config/kafka_jaas.conf
if [ -f $KAFKA_JAAS_CONF ]; then
    export KAFKA_CLIENT_KERBEROS_PARAMS="-Djava.security.auth.login.config=$KAFKA_HOME/config/kafka_client_jaas.conf"
fi&lt;/LI-CODE&gt;&lt;P&gt;Try editing kafka_client_jaas.conf&amp;nbsp; or also you can try to export using KAFKA_CLIENT_KERBEROS_PARAMS and see if that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manuel.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2020 16:37:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Kafka-client-code-does-not-currently-support-obtaining-a/m-p/298075#M218983</guid>
      <dc:creator>ManuelCalvo</dc:creator>
      <dc:date>2020-06-15T16:37:30Z</dc:date>
    </item>
  </channel>
</rss>

