Apache kafka 错误:分区x没有引线。跳过获取偏移量-但描述显示引线存在

Apache kafka 错误:分区x没有引线。跳过获取偏移量-但描述显示引线存在,apache-kafka,Apache Kafka,错误:分区0没有引线。跳过获取偏移量-但描述显示引线存在 我也遇到了同样的问题,但是,描述说领导在场,你有什么解决办法吗?谢谢 卡夫卡经纪人状态变更日志显示: [timestamp] ERROR [Controller id=**** epoch=**] Controller **** epoch ** failed to change state for partition ********* from OfflinePartition to OnlinePartition (state.ch

错误:分区0没有引线。跳过获取偏移量-但描述显示引线存在

我也遇到了同样的问题,但是,描述说领导在场,你有什么解决办法吗?谢谢

卡夫卡经纪人状态变更日志显示:

[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,partitioncount为3,replicationfactor为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

问题解决了,基础设施从4个代理更改为3个代理,主题相同。因此,有些主题不存在leader,也无法删除,因此通过zookeeper cli强制删除:


解决了,问题是基础架构从4个代理更改为3个代理,主题相同。因此,有些主题不存在leader,也无法删除,因此通过zookeeper cli强制删除: