自己搭建的kafka集群,很久不用之后,集群的每一台服务器 Cluster ID确实没有重复的,但是启动报错
ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentClusterIdException: The Cluster ID 0dz1_QUqRT2I_P6W4ML9Mw doesn't match stored clusterId Some(pKdf1JR6QS-CpUui3rW0BA) 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:228)
at kafka.Kafka$.main(Kafka.scala:109)
at kafka.Kafka.main(Kafka.scala)
在 server.properties 找到 log.dirs 配置的路径。
将该路径下的所有文件删除,或者编辑meta.properties文件修改里面的cluster.id即可