According to our previous experience in dealing with similar scenarios, the controller node can be restarted for recovery. After the new controller is started successfully, the OfflinePartitionSelector election algorithm will be used to elect a leader from the ISR or living AR for the OfflinePartition。Hope it can help your problem。
Tom Bolitho <tboli...@gmail.com> 于2023年1月10日周二 00:58写道: > Dear Kafka Community, > > I'm hoping you can help with kafka topic partition that is missing a > leader. The topic in question is the '__consumer_offsets' topic > > The output of a '--describe' on that topic looks like: > > Topic: __consumer_offsets Partition: 7 Leader: none Replicas 5 Isr: > 5 > Topic: __consumer_offsets Partition: 11 Leader: none Replicas 5 Isr: > 5 > > The other 48 partitions are all ok and have an assigned leader (some with 5 > as the leader). > > I have tried running a --reassignment-json-file against the topic .e.g > > kafka-reassign-partitons.sh --bootstrap-server localhost:9092 > --reassignment-json-file /<reassignmentfilename>.json --execute > > but the reassignment just hangs, with the two partitions that are missing a > leader reporting: > 'Reassignment of partition __consumer_offsets-7 is still in progress' > > I've since had to --cancel that reassignment > > Can anyone advise on how I can overcome the issue of this missing leader > please? > > My eventual goal is to reassign this __consumer_offsets topic with a > replication factor of 3 to increase resiliency now that the cluster is in > production. I realise we should have set the > offets.topic.replication.factor to a value higher than 1 before we spun up > the prod cluster but this was missed so we're now looking to manually > reassign the __consumer_offsets with a higher replication factor. > > Any advice on how to overcome this 'Leader: none' issue would be greatly > appreciated. > > Many thanks, > > Tom >