其他分享
首页 > 其他分享> > 启动kafaka失败了,提示zk保存kafka的ids已经在使用。

启动kafaka失败了,提示zk保存kafka的ids已经在使用。

作者:互联网

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不正常关闭引起的。

 

发现问题:kafka集群启动时,zk里面找不到该brokers_id,但是关闭kafka集群就可以发现这个brokers,我们只需要把ids这个节点删除就行,重新启动kafka,好了。

  1. [推荐]您需要清理zookeeper路径/ brokers / ids / []中的代理ID。使用zk-cli tool delete命令清除路径。启动您的代理并验证它是否向协调员注册。

  2. 解决此问题的另一种方法是从kafka服务器配置更改您的broker-id并重新启动代理。但是,这会破坏您的分区,不建议使用数据

 

其他情况:

https://blog.csdn.net/hello_world_qwp/article/details/79419532

标签:ids,zk,zookeeper,broker,kafka,brokers
来源: https://www.cnblogs.com/xiongmozhou/p/10801768.html