禁用Kerberos失败,kafka启动报错:KeeperErrorCode = NoAuth

日志:

[2018-08-09 10:51:41,954] FATAL Fatal error during KafkaServerStartable startup. Prepare to shutdown (kafka.server.KafkaServerStartable)
org.I0Itec.zkclient.exception.ZkException: org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode = NoAuth
    at org.I0Itec.zkclient.exception.ZkException.create(ZkException.java:68)
    at kafka.utils.ZKCheckedEphemeral.create(ZkUtils.scala:1139)
    at kafka.utils.ZkUtils.registerBrokerInZk(ZkUtils.scala:390)
    at kafka.utils.ZkUtils.registerBrokerInZk(ZkUtils.scala:379)
    at kafka.server.KafkaHealthcheck.register(KafkaHealthcheck.scala:70)
    at kafka.server.KafkaHealthcheck.startup(KafkaHealthcheck.scala:51)
    at kafka.server.KafkaServer.startup(KafkaServer.scala:270)
    at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:39)
    at kafka.Kafka$.main(Kafka.scala:67)
    at kafka.Kafka.main(Kafka.scala)
Caused by: org.apache.zookeeper.KeeperException$NoAuthException: KeeperErrorCode = NoAuth
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:113)
    ... 9 more
 

Cause: 
This issue occurs because the ACLs on the Kafka znodes are not removed while disabling Kerberos. 

Solution: 

This is a known issue and and a bug (BUG-40773) has been submitted to be addressed in a future release.

 

Before disabling Kerberos, do the following: 

  1. su - kafka
  2. /usr/hdp/current/kafka-broker/bin/kafka-run-class.sh kafka.admin.ZkSecurityMigrator --zookeeper.acl unsecure --zookeeper.connect 'hostname:2181'
  3. The ACLs on Kafka znodes should not have SSALs and should be similar to the following: 

# /usr/hdp/current/kafka-broker/bin/zookeeper-shell.sh zk_host:2181
[zk: localhost:2181(CONNECTED) 4] getAcl /brokers
'world,'anyone 
: cdrwa 
[zk: localhost:2181(CONNECTED) 4] getAcl /brokers/ids 
'world,'anyone 
: cdrwa

        3. Follow the instructions for disabling Kerberos from Ambari. 
        4. Restart Kafka nodes. 

If you have already disabled Kerberos, re-enable it and perform the above steps.  

你可能感兴趣的:(Kerberos,Kafka)