Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Configured broker.id 5 doesn't match stored broker

Shulou Source: shulou.com Published: 2022-06-03 03:15:38 10月02日 Update

Error message:

[2019-05-20 17 purl 38 21894] FATAL Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)

Kafka.common.InconsistentBrokerIdException: Configured broker.id 5 doesn't match stored broker.id 0 in meta.properties. If you moved your dat

Ured 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:618)

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)

Solution: modify the broker.id value of meta.properties in log.dirs directory and server.properties in configuration file.

[root@hadoop kafka-logs] # vim / tmp/kafka-logs/meta.properties

#

# Fri May 10 15:37:50 CST 2019

Version=0

Broker.id=5

[root@hadoop kafka-logs] # vim / opt/kafka2.12-1.0.0/config/server.properties

# The id of the broker. This must be set to a unique integer for each broker.

Broker.id=5

Tags: Consistency information files directories configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Apple Xiaomi Shulou Information Microsoft