在使用Kafka過程中遇到的錯誤

OldBoy~發表於2018-01-17

問題一:用kafka命令傳送訊息時候,一直報WARN Error while fetching metadata with correlation id 0 : {test=UNKNOWN_TOPIC_OR_PARTITION}?

原因:由於主題沒建立導致的,生成是禁止自動建立的。

原文地址:http://www.orchome.com/447

 

問題二:Created producer rdkafka#producer-1 LOG-3-FAIL: 192.168.9.154::9092/bootstrap: Connect to ipv4#192.168.9.154:9092 failed: 由於目標計算機積極拒絕,無法連線。

原因:你的config/server.properties需要明確寫出listeners的ip地址,而不能用localhost或者127.0.0.1代替

原文地址:https://blog.csdn.net/hmqwsdcv/article/details/51331356

 

問題三:kafka,建立消費者時提示no brokers found in zk.

原因:localhost 上沒有執行 zookeeper,或者 2181埠是錯誤的

原文地址:https://ask.csdn.net/questions/342764

 

問題四:WARN Error while fetching metadata with correlation id 5 : {test=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)

解決辦法:

# vim server.properties
advertised.listeners=PLAINTEXT://192.168.9.154:9092 #開啟註釋

原文地址:https://www.2cto.com/net/201801/712758.html

相關文章