Recently I faced an issue with my single node Kafka broker after a system reboot. The Kafka was not getting started and it was showing an error “Cluster ID doesn’t match stored clusterId in”

This error is self explanatory and the we can solve this by doing a quick fix. The following steps fixed my Kafka’s problem.

Step 1: Get the new Cluster ID from the error logs.

You can check the error logs and find the new cluster id.

Sample cluster id format is given below


Step 2: Find the file in your Kafka server

There is a file with the name This file is located within the kafka-logs directory. The location of kafka-logs directory can be located by checking the file in the config directory.

Location of config file –> $KAFKA_HOME/config/

In the, check for value of the parameter log.dirs.

cat  $KAFKA_HOME/config/  | grep log.dir

The will be located in the log.dir path

Step 3: Update the Cluster ID in the and restart the Kafka

Open the, the contents will be similar to the one below. Update the value with the new cluster id present in the error log.

#Wed May 26 11:21:15 EET 2021

Restart the Kafka Broker. Problem solved.

I hope this tip is helpful. Feel free to comment if you face any issues.