WARN [Producer clientId=console-producer] Connection to node -1 could not be established.
kafka执行生产者生产数据报错
·
WARN [Producer clientId=console-producer] Connection to node -1 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
kafka-console-producer.sh --broker-list localhost:9092 --topic shop
原因:命令行中的localhost应该是配置kafka时的地址,我配置的地址是192.168.161.136
解决:
kafka-console-producer.sh --broker-list 192.168.161.136:9092 --topic shop
更多推荐
已为社区贡献1条内容
所有评论(0)