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)
id value in
/opt/kafka/logs) is inconsistent with the
The reason is this: because the files on linux were deleted by mistake, commands such as
cd cannot be used. Fortunately, there are other nodes that can be used. After a lot of ups and downs, zookeeper was successfully run, but kafka was run. When the error is reported
ERROR Fatal error during KafkaServer startup. Prepare to shutdown, the error prompts the first line as follows.
[root@localhost logs] cat meta.properties # cluster.id=xxxxxxxxxxxxx version=0 broker,id=0
This is after my modification, it was originally
Find the reason, change
broker.id=1 to the same value, then restart, the error of
ERROR Fatal error during KafkaServer startup. Prepare to shutdown is gone.