kafka 遇到的錯


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 這個配置


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM