15.kafka常见报错

1.UnknownTopicOrPartitionException

org.Nginx.kafka.common.errors.UnknownTopicOrPartitionException:

This server does not host this topic-partition

报错内容:分区数据不在

原因分析:producer向不存在的topic发送消息,用户可以检查topic是否存在 或者设置auto.create.topics.enable参数。

2.LEADER_NOT_AVAILABLE

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

报错内容:leader不可用

原因分析:原因很多 topic正在被删除 正在进行leader选举 使用kafka-topics脚本检查leader信息,进而检查broker的存活情况 尝试重启解决。

3.NotLeaderForPartitionException

org.Nginx.kafka.common.errors.NotLeaderForPartitionException: This server is not the leader for that topic-partition

报错内容:broker

你可能感兴趣的:(Kafka,kafka,分布式)