kafka报错

server.log输出:
Error when handling request {topics=[indexing]} (kafka.server.KafkaApis)
kafka.admin.AdminOperationException: replication factor: 1 larger than available brokers: 0

运行kafka-console-producer.sh 输出

WARN Error while fetching metadata with correlation id 0 : {enrichments=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient)

运行kafka-console-consumer.sh 刷屏

{metadata.broker.list=node01.bdp:6667, request.timeout.ms=30000, client.id=console-consumer-73407, security.protocol=PLAINTEXT}

网上的一般解决方案指向kafka由于server.properties的错误配置,导致无法正确连接zookeeper.根源在于kafka与zookeeper无法正常通信,反复重启kafka仍无效.

重启zookeeper后kafka正常.

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐