server.log
一直刷的警告信息是:
WARN Connection to node 2 terminated during authentication. This may indicate that authentication failed due to invalid credentials. (org.apache.kafka.clients.NetworkClient)
controller.log
中的对应报错信息是:
[2020-06-18 19:35:07,285] INFO [Controller 0]: Newly added brokers: 0, deleted brokers: , all live brokers: 0 (kafka.controller.KafkaController)
[2020-06-18 19:35:07,287] DEBUG [Channel manager on controller 0]: Controller 0 trying to connect to broker 0 (kafka.controller.ControllerChannelManager)
[2020-06-18 19:35:07,295] INFO [Controller-0-to-broker-0-send-thread]: Starting (kafka.controller.RequestSendThread)
[2020-06-18 19:35:07,296] INFO [Controller 0]: New broker startup callback for 0 (kafka.controller.KafkaController)
[2020-06-18 19:35:07,520] WARN [Controller-0-to-broker-0-send-thread]: Controller 0's connection to broker 172.21.4.112:9086 (id: 0 rack: null) was unsuccessful (kafka.controller.RequestSendThread)
java.io.IOException: Connection to 172.21.4.112:9086 (id: 0 rack: null) failed.
at org.apache.kafka.clients.NetworkClientUtils.awaitReady(NetworkClientUtils.java:68)
at kafka.controller.RequestSendThread.brokerReady(ControllerChannelManager.scala:264)
at kafka.controller.RequestSendThread.doWork(ControllerChannelManager.scala:218)
at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:64)
参考一下:https://www.orchome.com/1966
参考这个连接的方法配了,不过环境有点不一样,这个zk是单独搭建的,没有用kafka内置的。
例子我都试过才提供出来的,zk单独和kafka内置一样,没关系的。
你可以参考这哥们的问题,注意细节:https://www.orchome.com/user/3013/show#/issues/0/1
你的答案