D:\cluster\kafka_2.12-1.1.0>.\bin\windows\kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
Error while executing topic command : Replication factor: 1 larger than available brokers: 0.
[2019-01-18 10:04:11,703] ERROR org.apache.kafka.common.errors.InvalidReplicationFactorException: Replication factor: 1 larger than available brokers: 0.
 (kafka.admin.TopicCommand$)

 错误原因: 一时疏忽没有启动kafak就开始创建topic

2.

[kafka Java创建生产者报错:Invalid partition given with record: 1 is not in the range [0...1)]

错误原因是 kafak的配置文件中分区数不一致,需要修改 server.proerties文件汇总的num.partitions =1 这个配置

相关文章:

  • 2021-05-28
  • 2022-12-23
  • 2021-10-18
  • 2022-02-20
  • 2021-10-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-21
  • 2021-12-12
  • 2021-07-03
  • 2022-12-23
  • 2021-12-31
相关资源
相似解决方案