首页 > 其他分享 >kafka重启失败

kafka重启失败

时间:2022-12-13 10:58:50浏览次数:78  
标签:25 26 07 05 重启 kafka 失败 2021

 

一个线上环境,因为修改了zookeeper配置,需要重启下kafka服务,然而重启后kafka却报错了,下面就让我们来看看复原场景吧!

 

结果启动失败,报如下错误:

[2021-05-25 07:26:14,355] INFO Opening socket connection to server localhost/127.0.0.1:2191. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2021-05-25 07:26:14,366] INFO Socket connection established, initiating session, client: /127.0.0.1:46372, server: localhost/127.0.0.1:2191 (org.apache.zookeeper.ClientCnxn)
[2021-05-25 07:26:14,459] INFO Session establishment complete on server localhost/127.0.0.1:2191, sessionid = 0x101da8295320007, negotiated timeout = 18000 (org.apache.zookeeper.ClientCnxn)
[2021-05-25 07:26:14,464] INFO [ZooKeeperClient Kafka server] Connected. (kafka.zookeeper.ZooKeeperClient)
[2021-05-25 07:26:15,254] INFO [feature-zk-node-event-process-thread]: Starting (kafka.server.FinalizedFeatureChangeListener$ChangeNotificationProcessorThread)
[2021-05-25 07:26:15,352] INFO Feature ZK node at path: /feature does not exist (kafka.server.FinalizedFeatureChangeListener)
[2021-05-25 07:26:15,360] INFO Cleared cache (kafka.server.FinalizedFeatureCache)
[2021-05-25 07:26:16,369] INFO Cluster ID = ryDbylR1RSmMpFuE_8T9Cw (kafka.server.KafkaServer)
[2021-05-25 07:26:16,561] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentClusterIdException: The Cluster ID ryDbylR1RSmMpFuE_8T9Cw doesn't match stored clusterId Some(YEC8BCSgSmGemPNNnYU8WA) 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:218)
        at kafka.Kafka$.main(Kafka.scala:109)
        at kafka.Kafka.main(Kafka.scala)
[2021-05-25 07:26:16,564] INFO shutting down (kafka.server.KafkaServer)
[2021-05-25 07:26:16,569] INFO [feature-zk-node-event-process-thread]: Shutting down (kafka.server.FinalizedFeatureChangeListener$ChangeNotificationProcessorThread)
[2021-05-25 07:26:16,570] INFO [feature-zk-node-event-process-thread]: Stopped (kafka.server.FinalizedFeatureChangeListener$ChangeNotificationProcessorThread)
[2021-05-25 07:26:16,570] INFO [feature-zk-node-event-process-thread]: Shutdown completed (kafka.server.FinalizedFeatureChangeListener$ChangeNotificationProcessorThread)
[2021-05-25 07:26:16,652] INFO [ZooKeeperClient Kafka server] Closing. (kafka.zookeeper.ZooKeeperClient)
[2021-05-25 07:26:16,760] INFO Session: 0x101da8295320007 closed (org.apache.zookeeper.ZooKeeper)
[2021-05-25 07:26:16,760] INFO EventThread shut down for session: 0x101da8295320007 (org.apache.zookeeper.ClientCnxn)
[2021-05-25 07:26:16,764] INFO [ZooKeeperClient Kafka server] Closed. (kafka.zookeeper.ZooKeeperClient)
[2021-05-25 07:26:16,853] INFO App info kafka.server for 0 unregistered (org.apache.kafka.common.utils.AppInfoParser)
[2021-05-25 07:26:16,854] INFO shut down completed (kafka.server.KafkaServer)
[2021-05-25 07:26:16,854] ERROR Exiting Kafka. (kafka.Kafka$)
[2021-05-25 07:26:16,856] INFO shutting down (kafka.server.KafkaServer)

抓重点,根据上述报错信息,可以看到关键点The Cluster ID ryDbylR1RSmMpFuE_8T9Cw doesn't match stored clusterId Some(YEC8BCSgSmGemPNNnYU8WA) in meta.properties.  大意是群集 ID 与 meta.properties文件中存储的clusterID 不匹配

 

解决:

在自己的 log.dir 路径下找到配置文件meta.properties,将cluster.id按照它的提示修改。必如我就将原本的cluster.id=YEC8BCSgSmGemPNNnYU8WA 改为cluster.id=ryDbylR1RSmMpFuE_8T9Cw即可,再来重启就正常了。

 

 

 

>>>

参考来源:https://blog.csdn.net/TonG_L/article/details/117258446

 

标签:25,26,07,05,重启,kafka,失败,2021
From: https://www.cnblogs.com/panw/p/16977937.html

相关文章