kafka启动失败The Cluster ID *** doesn‘t match stored clusterId Some(***) in meta.properties The broker

前言:

启动kafka遇到问题,就是应用启动没有进行消费kafka数据导致,应用无数据入库,需要排查下问题:

1、对kafka进行重启设置,添加  startup.sh

nohup bin/kafka-server-start.sh config/server.properties > temp.log &

 2、异常启动日志输出如下:

[2021-08-09 10:53:12,477] INFO [ZooKeeperClient Kafka server] Connected. (kafka.zookeeper.ZooKeeperClient)
[2021-08-09 10:53:12,974] INFO Cluster ID = kVSgfurUQFGGpHMTBqBPiw (kafka.server.KafkaServer)
[2021-08-09 10:53:13,000] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentClusterIdException: The Cluster ID kVSgfurUQFGGpHMTBqBPiw doesn't match stored clusterId Some(0Qftv9yBTAmf2iDPSlIk7g) 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)
[2021-08-09 10:53:13,005] INFO shutting down (kafka.server.KafkaServer)
[2021-08-09 10:53:13,011] INFO [ZooKeeperClient Kafka server] Closing. (kafka.zookeeper.ZooKeeperClient)
[2021-08-09 10:53:13,121] INFO Session: 0x1067146fb3f0045 closed (org.apache.zookeeper.ZooKeeper)
[2021-08-09 10:53:13,121] INFO EventThread shut down for session: 0x1067146fb3f0045 (org.apache.zookeeper.ClientCnxn)
[2021-08-09 10:53:13,128] INFO [ZooKeeperClient Kafka server] Closed. (kafka.zookeeper.ZooKeeperClient)

kafka启动失败The Cluster ID *** doesn‘t match stored clusterId Some(***) in meta.properties The broker_第1张图片

 

3、解决办法,

1、在   server.properties 找到  log.dirs 配置的路径,

 操作命令如下:kafka启动失败The Cluster ID *** doesn‘t match stored clusterId Some(***) in meta.properties The broker_第2张图片

 2、进入配置的 log.dirs=/tmp-9092/kafka-logs  路径下面

kafka启动失败The Cluster ID *** doesn‘t match stored clusterId Some(***) in meta.properties The broker_第3张图片

 3、meta.properties,修改里面的cluster.id即可,

修改为错误提示里面的id,然后重启就可以解决问题了!

kafka启动失败The Cluster ID *** doesn‘t match stored clusterId Some(***) in meta.properties The broker_第4张图片

 重新启动运行startup.sh 就会出现启动成功的日志刷出来:

kafka启动失败The Cluster ID *** doesn‘t match stored clusterId Some(***) in meta.properties The broker_第5张图片

 

你可能感兴趣的:(2021-目前,工作)