錯誤:
啟動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 *
然後重新啟動即可。