A broker is already registered on the path /brokers/ids/0. 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
原因:是这台机器之前因为卡死被物理重启,kafka broker没有正常下线,zk上还保留着它的broker id。
解决方案:
找到原因后,解决就很简单了,把注册在zookeeper上的这个broker id delete掉就行了
先连接到zookeeper客户端:
delete /brokers/ids/0
2.错误截图:
原因:可能是你修改了server.properties的配置文件 ,导致 meta.properties,
记住这个meta.properties 的路径为你配置的log.dir下的文件,不要像我一样,最开始配置的是logs下,最后又更改为了data,导致我配置了logs下的meta文件,一直不管用,浪费了好长时间
解决方案: 直接将server.properties和meta.properties中的broker.id 配置成一样,重新启动就ok了!