问题呈现
zookeeper正常运行,但kafka进程一下就给掉了。。。
查看server.log,发现id不匹配
Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentClusterIdException: The Cluster ID YOIAaEFQTxOxKawUXmUcGw doesn’t match stored clusterId Some(VZ-h-2APRFydv_OisSEfxQ) in meta.properties. The broker is trying to join the wrong cluster. Configured zookeeper.connect may be wrong.
解决方法
修改meta.properties(在${kafka_home}/logs)的id,和报错信息统一就可。