kafka報錯Broker may not be available.

現象

[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不認。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章