FATAL [Kafka Server 1], Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
java.lang.RuntimeException: A broker is already registered on the path /brokers/ids/1. This probably indicates that you either have configured a brokerid that is already in use, or else you have shutdown this broker and restarted it faster than the zookeeper timeout so it appears to be re-registering.
原因:可能是kafka或者zookeeper不正常关闭引起的。
-
[推荐]您需要清理zookeeper路径/ brokers / ids / []中的代理ID。使用zk-cli tool delete命令清除路径。启动您的代理并验证它是否向协调员注册。
-
解决此问题的另一种方法是从kafka服务器配置更改您的broker-id并重新启动代理。但是,这会破坏您的分区,不建议使用数据