因为对网络安全监测,发现zookeeper没有对/节点设权限,所以就通过ACL设置了/的权限,设置权限后导致kafka注册不到对应的zookeeper的brokers上。
异常信息如下:
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:1112)
at kafka.utils.ZkUtils.registerBrokerInZk(ZkUtils.scala:302)
at kafka.utils.ZkUtils.registerBrokerInZk(ZkUtils.scala:291)
at kafka.server.KafkaHealthcheck.register(KafkaHealthcheck.scala:70)
at kafka.server.KafkaHealthcheck.startup(KafkaHealthcheck.scala:51)
at kafka.server.KafkaServer.startup(KafkaServer.scala:244)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:37)
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)
尝试的方法如下:
1)设置了zookeeper+kafka的SASL,测试后感觉与这个问题无关,注册节点依然注册不上去。
你的答案