kafka 升级后启动报错

错误:

启动zookeeper报错如下:

ERROR Unexpected exception, exiting abnormally (org.apache.zookeeper.server.ZooKeeperServerMain)
java.io.IOException: No snapshot found, but there are log entries. Something is broken!

启动kafka报错如下:

ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentClusterIdException: The Cluster ID vpQcYvrnSf64z6hqo5ZjLg doesn't match stored clusterId Some(g0MqhijcQaqy5E9MeJtIrA) in m
eta.properties. The broker is trying to join the wrong cluster. Configured zookeeper.connect may be wrong.

解决:

清理上一个版本留下来的缓存信息

cd /tmp/zookeeper/     #zookeeper.properties中dataDir对应的值
rm -rf *
cd /tmp/kafka-logs    #server.properties中log.dirs 对应的值
rm -rf *

然后重新启动即可。

猜你喜欢

转载自blog.csdn.net/qq_29384639/article/details/108527980