当前位置: 移动技术网 > IT编程>脚本编程>NodeJs > 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.

2020年03月09日  | 移动技术网IT编程  | 我要评论

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

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

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网