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.10.10.10:9092,但是我想測試的時候請求的是./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topic_name --from-beginning

正確的應該是./kafka-console-consumer.sh --bootstrap-server 10.10.10.10:9092 --topic topic_name --from-beginning

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