kafka创建topic报错
kafka创建topic报错kafka-topics.sh \--zookeeper mypc01:2181,mypc02:2181,mypc03:2181/kafka-2020 \--create \--topic news203 \--partitions 1 \--replication-factor 1InvalidReplicationFactorException: Replicati
·
kafka创建topic
报错
kafka-topics.sh \
--zookeeper mypc01:2181,mypc02:2181,mypc03:2181/kafka-2020 \
--create \
--topic news \
--partitions 1 \
--replication-factor 1
InvalidReplicationFactorException: Replication factor: 1 larger than available brokers: 0.
(kafka.admin.TopicCommand$)
排查原因,
1 kafka正常启动
2 发现是zookeeper
路径不正确.
就是创建topic
时的zookeeper
路径要和kafka
配置server.properties
中的一样
# Zookeeper connection string (see zookeeper docs for details).
# This is a comma separated host:port pairs, each corresponding to a zk
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
# You can also append an optional chroot string to the urls to specify the
# root directory for all kafka znodes.
zookeeper.connect=mypc01:2181,mypc02:2181,mypc03:2181/kafka-2020
更多推荐
已为社区贡献9条内容
所有评论(0)