错误:分区x没有前导跳过获取偏移-但描述显示领导在场

sycxhyv7  于 2021-06-06  发布在  Kafka
关注(0)|答案(1)|浏览(384)

错误:分区0没有前导。跳过获取偏移-但描述显示领导在场
我有同样的问题,然后错误:分区0没有前导。跳过获得补偿,但是——描述一下说领导在场,请问你有什么解决办法吗?谢谢
Kafka经纪人状态变化日志说:

[timestamp] ERROR [Controller id=****epoch=**] Controller****epoch**failed to change state for partition*********from OfflinePartition to OnlinePartition (state.change.logger)
kafka.common.StateChangeFailedException: Failed to elect leader for partition**********under strategy OfflinePartitionLeaderElectionStrategy

再次感谢,总代理计数是4,分区计数是3,复制因子是4。
请注意,使用者并没有在zookeeper上写入偏移量

./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list broker1:6667,broker2:6667 --topic topic1 --time -1

Error: partition 2 does not have a leader. Skip getting offsets 
Error: partition 1 does not have a leader. Skip getting offsets 
Error: partition 0 does not have a leader. Skip getting offsets

./kafka-topics.sh --describe --zookeeper zookeepernode01:2181 --topic topic1 

Topic: topic1 PartitionCount:3 ReplicationFactor:4 Configs: Topic: topic1

Partition: 0 Leader: 2 Replicas: 2,4,6,7 Isr: 2,4,6 Topic: topic1 
Partition: 1 Leader: 3 Replicas: 3,6,7,8 Isr: 3,7,8 Topic: topic1 
Partition: 2 Leader: 4 Replicas: 4,7,8,1001 Isr: 4,7 Topic: topic1
llew8vvj

llew8vvj1#

解决了,问题是基础设施从4个代理更改为3个,主题相同。所以有一些主题不存在的领导人,他们也不可能删除,所以删除是通过强制删除:
如何删除apache kafka中的主题

相关问题