增加kafka节点,对原有节点的顺序做了调整,报错如下:
cxid:0x2a zxid:0x1e txntype:-1 reqpath:n/a Error Path:/brokers/ids Error:KeeperErrorCode = NodeExists for /brokers/ids (org.apache.zookeeper.server.PrepRequestProcessor)
检查配置server.properties
# cat /bigdata/kafka/config/server.properties broker.id=2 //id重复了,改一个kafka集群中,没有id
重启kafka后,上面的报错没有了,但又出了新的报错
[2019-10-16 11:30:14,977] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentBrokerIdException: Configured broker.id 2 doesn't match stored broker.id 0 in meta.properties. If you moved your data, make sure your configured broker.id matches. If you intend to create a new broker, you should remove all data in your data directories (log.dirs).
at kafka.server.KafkaServer.getBrokerIdAndOfflineDirs(KafkaServer.scala:686)
at kafka.server.KafkaServer.startup(KafkaServer.scala:209)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
at kafka.Kafka$.main(Kafka.scala:75)
at kafka.Kafka.main(Kafka.scala)
解决办法:
# vim /bigdata/kafka/data/meta.properties broker.id=2 //根server.properties一样
转载请注明
作者:海底苍鹰
地址:http://blog.51yip.com/hadoop/2200.html