1:kafka报错内容:
WARN clients.NetworkClient: [Consumer clientId=consumer-1, groupId=console-consumer-26747] Connection to node -1 (bigdatacdh1/192.168.1.101:9092) could not be established. Broker may not be available.
kafka 的服务可能没有开启,从而导致Broker may not be available。
2:idea报错内容(kafka):
WARN [Consumer clientId=consumer-1, groupId=console-consumer-950] Connection to node -1 could not be established. Broker may not be available.
分析:这个错误发生的本质是连接不能成功被建立。
首先考虑的应该考虑的是win端出现错误还是Linux端出现错误
Linux端:
1.hosts文件。
(基本可以排除,在搭建环境之前就已经做好映射了)
2.Kafka server和Kafka Client配置文件。
(CDH6.3.0 kafka服务端配置文件路径 /opt/cloudera/parcels/CDH/etc/kafka/conf.dist/ )
win端:
1.hosts文件。
2.IDEA中程序中的错误:
a.kafk