FATAL Fatal error during KafkaServer startup. Prepare to shutdown 解决方法

问题

[2019-11-10 18:23:00,228] FATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentBrokerIdException: Configured broker.id 1 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:624)
at kafka.server.KafkaServer.startup(KafkaServer.scala:201)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)
at kafka.Kafka$.main(Kafka.scala:92)
at kafka.Kafka.main(Kafka.scala)

解决方法

在kafka日志文件夹中找到此meta.properties查看内容的broker.id的值是否和 server.properties文件中的broker.id值相等。(此报错是因为不相等造成的,以下截图为修改完结果

若不相等,修改meta.properties文件中的broker.id,使他相等
FATAL Fatal error during KafkaServer startup. Prepare to shutdown 解决方法_第1张图片
在这里插入图片描述

你可能感兴趣的:(Hadoop,kafka)