kafka创建Topic的时候报错:KeeperErrorCode = NoNode for /brokers/ids

1.报错原因:

创建命令

bin/kafka-topics.sh --create --zookeeper bigdata.ibeifeng.com:2181/kafka02 --replication-factor 1 --partitions 1 --topic hello_topic

和server.properties中zookeeper设定的目录不一致

zookeeper.connect=bigdata.ibeifeng.com:2181/kafka08

2.解决:

修改创建topic命令中zookeeper目录即可

bin/kafka-topics.sh --create --zookeeper bigdata.ibeifeng.com:2181/kafka08 --replication-factor 1 --partitions 1 --topic hello_topic

 

你可能感兴趣的:(kafka,大数据开发)