码迷,mamicode.com
首页 > 其他好文 > 详细

Error while executing topic command : Replication factor: 2 larger than available brokers: 0.

时间:2019-01-18 18:27:48      阅读:2040      评论:0      收藏:0      [点我收藏+]

标签:mon   9.4   显示   echo   没有   software   err   admin   目录   

[root@hdp1 /mnt/software/maxwell-1.19.4]#kafka-topics.sh --zookeeper hdp1,hdp2,hdp3:2181 --create --topic maxwell --partitions 6 --replication-factor 2
Error while executing topic command : Replication factor: 2 larger than available brokers: 0.
[2019-01-18 04:18:09,809] ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 2 larger than available brokers: 0.
(kafka.admin.TopicCommand$)

 

创建kafka的topic显示,存活的brokers为0

 

原因:

     没有在kafka目录下创建zookeeper ,指定myid

解决:

   cd kafka_2.11-1.1.0

  mkdir zookeeper
  cd zookeeper
  touch myid
  echo 0 > myid
重新启动kafka就ok

Error while executing topic command : Replication factor: 2 larger than available brokers: 0.

标签:mon   9.4   显示   echo   没有   software   err   admin   目录   

原文地址:https://www.cnblogs.com/QuestionsZhang/p/10288880.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!