Network/Kafka

[Kafka] kafka.common.InconsistentClusterIdException: The Cluster ID doesn't match stored clusterId Some in meta.properties. The broker is trying to join the wrong cluster. Configured zookeeper.connect may be wrong.

Hyo Kim 2023. 4. 9. 21:18
728x90
반응형

브로커 실행 에러

kafka.common.InconsistentClusterIdException: The Cluster ID 5O5gujuWTEKjB8VxoS0sRA doesn't match stored clusterId Some(y3v9cswgSTOtIUhYDgdPIg) 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:223)
	at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:44)
	at kafka.Kafka$.main(Kafka.scala:82)
	at kafka.Kafka.main(Kafka.scala)
[2023-04-09 21:06:07,170] INFO shutting down (kafka.server.KafkaServer)
[2023-04-09 21:06:07,171] INFO [ZooKeeperClient Kafka server] Closing. (kafka.zookeeper.ZooKeeperClient)
[2023-04-09 21:06:07,297] INFO Session: 0x10001acd7cc0000 closed (org.apache.zookeeper.ZooKeeper)
[2023-04-09 21:06:07,297] INFO EventThread shut down for session: 0x10001acd7cc0000 (org.apache.zookeeper.ClientCnxn)
[2023-04-09 21:06:07,298] INFO [ZooKeeperClient Kafka server] Closed. (kafka.zookeeper.ZooKeeperClient)
[2023-04-09 21:06:07,302] INFO shut down completed (kafka.server.KafkaServer)
[2023-04-09 21:06:07,302] ERROR Exiting Kafka. (kafka.server.KafkaServerStartable)
[2023-04-09 21:06:07,302] INFO shutting down (kafka.server.KafkaServer)

원인

Kafka가 meta.properties에 실패한 클러스터 ID를 저장했기 때문.


해결 방법

config/server.properties log.dirs 위치 파악

server.properties
data dir

해당 위치에 있는 meta.properties 를 제거해주면 정상 실행된다.

728x90
반응형