Kafka自带zookeeper报错INFO Got user-level KeeperException when processing xxx Error Path:/brokers Error:KeeperErrorCode = NodeExists for /brokers (org.apache.zookeeper.server.PrepRequestProcessor)

时间:2021-08-28 22:13:49

问题描述:

按照kafka官方文档的操作步骤,解压kafka压缩包后。依次启动zookeeper,和kafka服务

kafka服务启动后,查看到zookeeper日志里有以下异常

Kafka自带zookeeper报错INFO Got user-level KeeperException when processing xxx Error Path:/brokers Error:KeeperErrorCode = NodeExists for /brokers (org.apache.zookeeper.server.PrepRequestProcessor)

 

问题原因及解决办法:

网上查找资料,找到zookeeper日志异常原因---这不是一个报错故障,只是一个user-level KeeperException。可以忽略不做处理的

kafka安装好后,第一次启动。zookeeper日志Error:KeeperErrorCode = NoNode for /config/topics/test,是因为kafka请求访问这个路径,但是这个路径还不存在,zookeeper就抛了这个error。kafka会创建这个topic,然后访问zookeeper里topic对应的路径,zookeeper日志抛出error NodeExists for /config/topics(kafka已经把topic创建好了),路径已经存在了。

综上所述,这些error是正常的日志信息,可以忽略。

网友给的解释的链接和截图:

https://*.com/questions/43559328/got-user-level-keeperexception-when-processing

Kafka自带zookeeper报错INFO Got user-level KeeperException when processing xxx Error Path:/brokers Error:KeeperErrorCode = NodeExists for /brokers (org.apache.zookeeper.server.PrepRequestProcessor)