在使用Kafka过程中遇到的错误

问题一:用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

posted @ 2018-01-17 16:36  温柔的风  阅读(21243)  评论(0编辑  收藏  举报