在Centos上部署Kafka,启动Kafka服务的时候,经常出现如下的warnings (This problem hasn’t be solved!):
1 | [2019-11-27 18:31:00,242] WARN [Controller id=0, targetBrokerId=0] Connection to node 0 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient) |
而且无法通过localshot:9092
连接这个broker,那到底是什么原因导致这样的问题呢?通过google如上的问题,得到如下的解决方法:
- kafka broker not available at starting
- Kafka + Zookeeper: Connection to node -1 could not be established. Broker may not be available
- kafka-console-consumer. ERROR Connection to node 0 could not be established.Broker may not be available
如上提到的方法都无法解决那个warning问题。