Windows – Unable to start kafka with zookeeper (kafka.common.InconsistentClusterIdException)

kafkawindowszookeeper

Below the steps I did to get this issue :

  1. Launch ZooKeeper
  2. Launch Kafka : .\bin\windows\kafka-server-start.bat .\config\server.properties

Also note that my OS is Windows

And at the second step the error happens :

ERROR Fatal error during KafkaServer startup. Prepare to shutdown
(kafka.server.KafkaServer)
kafka.common.InconsistentClusterIdException: The Cluster ID
Reu8ClK3TTywPiNLIQIm1w doesn't match stored clusterId
Some(BaPSk1bCSsKFxQQ4717R6Q) in meta.properties. The broker is trying
to join the wrong cluster. Configured zookeeper.connect may be wrong.

at kafka.server.KafkaServer.startup(KafkaServer.scala:220)
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:44)
at kafka.Kafka$.main(Kafka.scala:84)
at kafka.Kafka.main(Kafka.scala)

When I trigger .\bin\windows\kafka-server-start.bat .\config\server.properties zookeeper console returns :

INFO [SyncThread:0:FileTxnLog@216] – Creating new log file: log.1

How to fix this issue to get kafka running ?

EDIT See this answer following those steps solved my problem

Best Answer

I solved this issue on my machine (Windows 10) by deleting the meta.properties file found in the log directory.

The issue itself occured after I had stopped both the zookeeper and server and then restarted them.

Related Topic