学无先后,达者为师

网站首页 编程语言 正文

kafka-报错kafka.common.InconsistentClusterIdException

作者:与数据交流的路上 更新时间: 2022-10-11 编程语言

一、背景

kafka的物理机意外宕机,导致kafka启动不起来

二、报错详情

[2022-08-09 08:20:42,097] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentClusterIdException: The Cluster ID 123456 doesn't match stored clusterId Some(456789) 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:235)
	at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:44)
	at kafka.Kafka$.main(Kafka.scala:82)
	at kafka.Kafka.main(Kafka.scala)

三、解决

可以看到报错比较明显了,是cluster-id对不上了,这时候我们可以修改meta.properties的配置

# meta.properties文件的位置可以根据server.properties配置文件的log.dirs参数的值进行查找
vim meta.properties

cluster.id=123456

接下来就可以正常启动了

原文链接:https://blog.csdn.net/line_on_database/article/details/126264870

栏目分类
最近更新