<?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: Problems with Kafka Scripts after enabled Kerberos in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-Kafka-Scripts-after-enabled-Kerberos/m-p/138527#M52092</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/274/yjiang.html" nodeid="274"&gt;@yjiang&lt;/A&gt; &lt;/P&gt;&lt;P&gt;That helped me aswell. Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2017 15:37:11 GMT</pubDate>
    <dc:creator>frank93</dc:creator>
    <dc:date>2017-05-10T15:37:11Z</dc:date>
    <item>
      <title>Problems with Kafka Scripts after enabled Kerberos</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-Kafka-Scripts-after-enabled-Kerberos/m-p/138524#M52089</link>
      <description>&lt;P&gt;After enabled Kerberos using Ambari wizard, Kafka scripts does not work. Is there any additional configurations to make it work? I am using HDP 2.5.3.&lt;/P&gt;&lt;PRE&gt;$ kinit
$ ./kafka-topics.sh --zookeeper localhost:2181 --create --topic foo --partitions 1 --replication-factor 1
[2017-01-20 11:54:59,482] WARN Could not login: the client is being asked for a password, but the Zookeeper client code does not currently support obtaining a password from the user. Make sure that the client is configured to use a ticket cache (using the JAAS configuration setting 'useTicketCache=true)' and restart the client. If you still get this message after that, the TGT in the ticket cache has expired and must be manually refreshed. To do so, first determine if you are using a password or a keytab. If the former, run kinit in a Unix shell in the environment of the user who is running this Zookeeper client using the command 'kinit &amp;lt;princ&amp;gt;' (where &amp;lt;princ&amp;gt; is the name of the client's Kerberos principal). If the latter, do 'kinit -k -t &amp;lt;keytab&amp;gt; &amp;lt;princ&amp;gt;' (where &amp;lt;princ&amp;gt; is the name of the Kerberos principal, and &amp;lt;keytab&amp;gt; is the location of the keytab file). After manually refreshing your cache, restart this client. If you continue to see this message after manually refreshing your cache, ensure that your KDC host's clock is in sync with this host's clock. (org.apache.zookeeper.client.ZooKeeperSaslClient)
[2017-01-20 11:54:59,484] WARN SASL configuration failed: javax.security.auth.login.LoginException: No password provided Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it. (org.apache.zookeeper.ClientCnxn)
Exception in thread "main" org.I0Itec.zkclient.exception.ZkAuthFailedException: Authentication failure
	at org.I0Itec.zkclient.ZkClient.waitForKeeperState(ZkClient.java:946)
	at org.I0Itec.zkclient.ZkClient.waitUntilConnected(ZkClient.java:923)
	at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1230)
	at org.I0Itec.zkclient.ZkClient.&amp;lt;init&amp;gt;(ZkClient.java:156)
	at org.I0Itec.zkclient.ZkClient.&amp;lt;init&amp;gt;(ZkClient.java:130)
	at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:75)
	at kafka.utils.ZkUtils$.apply(ZkUtils.scala:57)
	at kafka.admin.TopicCommand$.main(TopicCommand.scala:54)
	at kafka.admin.TopicCommand.main(TopicCommand.scala)
&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jan 2017 20:00:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-Kafka-Scripts-after-enabled-Kerberos/m-p/138524#M52089</guid>
      <dc:creator>yjiang</dc:creator>
      <dc:date>2017-01-20T20:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Kafka Scripts after enabled Kerberos</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-Kafka-Scripts-after-enabled-Kerberos/m-p/138525#M52090</link>
      <description>&lt;P&gt;Also tried the below, didn't work...&lt;/P&gt;&lt;PRE&gt;$ export JVMFLAGS="-Djava.security.auth.login.config=/etc/kafka/conf/kafka_client_jaas.conf"

$ ./kafka-topics.sh --zookeeper localhost:2181 --create --topic foo --partitions 1 --replication-factor 1
&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jan 2017 20:32:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-Kafka-Scripts-after-enabled-Kerberos/m-p/138525#M52090</guid>
      <dc:creator>yjiang</dc:creator>
      <dc:date>2017-01-20T20:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Kafka Scripts after enabled Kerberos</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-Kafka-Scripts-after-enabled-Kerberos/m-p/138526#M52091</link>
      <description>&lt;P&gt;Solved by the below workaround. This looks like a bug in kafka-topics.sh.&lt;/P&gt;&lt;P&gt;1. Add KAFKA_CLIENT_KERBEROS_PARAMS before executing actual TopicCommand if running in a Kerberos enabled cluster.&lt;/P&gt;&lt;PRE&gt;$ cat kafka-topics.sh
# 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

exec $(dirname $0)/kafka-run-class.sh kafka.admin.TopicCommand "$@"
&lt;/PRE&gt;&lt;P&gt;2. Use Zookeeper server FQDN instead of localhost in command line.&lt;/P&gt;&lt;PRE&gt;$ kinit
$ ./kafka-topics.sh --zookeeper ip-10-0-0-149.ap-northeast-1.compute.internal:2181 --create --topic foo --partitions 1 --replication-factor 1

Created topic "foo".
&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jan 2017 21:27:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-Kafka-Scripts-after-enabled-Kerberos/m-p/138526#M52091</guid>
      <dc:creator>yjiang</dc:creator>
      <dc:date>2017-01-20T21:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with Kafka Scripts after enabled Kerberos</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-Kafka-Scripts-after-enabled-Kerberos/m-p/138527#M52092</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/274/yjiang.html" nodeid="274"&gt;@yjiang&lt;/A&gt; &lt;/P&gt;&lt;P&gt;That helped me aswell. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 15:37:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Problems-with-Kafka-Scripts-after-enabled-Kerberos/m-p/138527#M52092</guid>
      <dc:creator>frank93</dc:creator>
      <dc:date>2017-05-10T15:37:11Z</dc:date>
    </item>
  </channel>
</rss>

