SASL authentication failed using login context 'Client'
<p>I am working in securing Kafka with Kerberos in CDH 5.5 
Kafka version: 2.0.1
Kerberos is enabled and works fine</p>

<p>when i enable sasl in kafka using  cloudera maneger, i get the error: </p>

<p>Jun 29, 3:02:42.875 PM  INFO    org.apache.zookeeper.ClientCnxn     </p>

<p>Opening socket connection to server brahim.localhost/127.0.0.1:2181. Will attempt to SASL-authenticate using Login Context section 'Client'</p>

<p>Jun 29, 3:02:42.879 PM  INFO    org.apache.zookeeper.ClientCnxn     </p>

<p>Socket connection established to brahim.localhost/127.0.0.1:2181, initiating session</p>

<p>Jun 29, 3:02:42.906 PM  INFO    org.apache.zookeeper.ClientCnxn     </p>

<p>Session establishment complete on server brahim.localhost/127.0.0.1:2181, sessionid = 0x1559c20b6110007, negotiated timeout = 30000</p>

<p>Jun 29, 3:02:42.910 PM  INFO    org.I0Itec.zkclient.ZkClient    </p>

<p>zookeeper state changed (SyncConnected)</p>

<p>Jun 29, 3:02:42.942 PM  ERROR   org.apache.zookeeper.client.ZooKeeperSaslClient     </p>

<p>SASL authentication failed using login context 'Client'.</p>

<p>Jun 29, 3:02:42.942 PM  INFO    org.I0Itec.zkclient.ZkClient    </p>

<p>zookeeper state changed (AuthFailed)</p>

<p>Jun 29, 3:02:48.551 PM  INFO    org.I0Itec.zkclient.ZkEventThread   </p>

<p>Terminate ZkClient event thread.</p>

<p>Jun 29, 3:02:48.554 PM  FATAL   kafka.Kafka$    </p>

<p>org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 6000
    at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:1223)
    at org.I0Itec.zkclient.ZkClient.(ZkClient.java:155)
    at org.I0Itec.zkclient.ZkClient.(ZkClient.java:129)
    at kafka.utils.ZkUtils$.createZkClientAndConnection(ZkUtils.scala:80)
    at kafka.utils.ZkUtils$.apply(ZkUtils.scala:62)
    at nl.techop.kafka.dao.zookeeper.KafkaZkClient.(KafkaZkClient.scala:52)
    at nl.techop.kafka.KafkaHttpMetricsServer.init(KafkaHttpMetricsServer.scala:43)
    at nl.techop.kafka.KafkaHttpMetricsServer.(KafkaHttpMetricsServer.scala:28)
    at nl.techop.kafka.KafkaHttpMetricsReporter.init(KafkaHttpMetricsReporter.scala:41)
    at kafka.metrics.KafkaMetricsReporter$$anonfun$startReporters$1.apply(KafkaMetricsReporter.scala:60)
    at kafka.metrics.KafkaMetricsReporter$$anonfun$startReporters$1.apply(KafkaMetricsReporter.scala:58)
    at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:35)
    at kafka.metrics.KafkaMetricsReporter$.startReporters(KafkaMetricsReporter.scala:58)
    at kafka.server.KafkaServerStartable$.fromProps(KafkaServerStartable.scala:27)
    at kafka.Kafka$.main(Kafka.scala:58)
    at com.cloudera.kafka.wrap.Kafka$.main(Kafka.scala:76)
    at com.cloudera.kafka.wrap.Kafka.main(Kafka.scala)</p>