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

2022-01-14,,,,

这篇文章主要介绍了kafka调试中遇到Connection to node -1 could not be established. Broker may not be available的解决方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

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.的详细内容,更多请关注本站其它相关文章!

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

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