运维开发网

kafka报错Broker may not be available.

运维开发网 https://www.qedev.com 2020-04-09 10:48 出处:网络 作者:运维开发网整理
现象 [root@kafka-3 bin]# ./kafka-console-producer.sh --broker-list localhost:9092 --topic test >sdssd [2018-03-20 17:58:01,409] WARN [Producer clientId=console-producer] Connection to node -1 could not

现象

[root@kafka-3 bin]# ./kafka-console-producer.sh --broker-list localhost:9092 --topic test
>sdssd
[2018-03-20 17:58:01,409] WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2018-03-20 17:58:01,461] WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
[2018-03-20 17:58:01,571] WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

解决方法:

将localhost改成PLAINTEXT配置的地址即可,估计localhost没配置,kafka不认。

0

精彩评论

暂无评论...
验证码 换一张
取 消