kafka调试中遇到Connection to node -1 could not be established. Broker may not be available.

2022-10-09,,,,

kafka报错内容:

warn [consumer clientid=consumer-1, groupid=console-consumer-950] connection to node -1 could not be established. broker may not be available.

这是因为你的配置文件中的plaintext跟你请求的内容不同。举例来说,我在配置文件里配置的listeners=plaintext://10.127.96.151:9092,但是我想测试的时候请求的是./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topic1 --from-beginning

正确的应该是./kafka-console-consumer.sh --bootstrap-server 10.127.96.151:9092 --topic topic1 --from-beginning

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

《kafka调试中遇到Connection to node -1 could not be established. Broker may not be available..doc》

下载本文的Word格式文档,以方便收藏与打印。