当前位置:   article > 正文

启动kafka报错ERROR Fatal error during KafkaServer startup. Prepare to shutdown_error [kafkaserver id=2] fatal error during kafkas

error [kafkaserver id=2] fatal error during kafkaserver startup. prepare to

一、错误


报的错:
ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentBrokerIdException: Configured broker.id 0 doesn’t match stored broker.id Some(1) 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.getOrGenerateBrokerId(KafkaServer.scala:793)
at kafka.server.KafkaServer.startup(KafkaServer.scala:221)
at kafka.Kafka$.main(Kafka.scala:109)
at kafka.Kafka.main(Kafka.scala)
 

二、错误原因

meta.properties(路径:/opt/module/kafka/logs)里面的id值和/opt/module/kafka/configserver.properties中的broker.id不一致。

起因是这样的:由于误删除了linux上的文件,以至于cd这样的命令都无法使用,幸亏还有其他的节点可以使用,经过一番倒腾后,成功的运行了zookeeper,然而运行kafka的时候,报错了ERROR Fatal error during KafkaServer startup. Prepare to shutdown ,错误提示如下的第一行。

 

 这是我修改后的  broker.id    原来是1

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/662910
推荐阅读
相关标签
  

闽ICP备14008679号