You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by manoj sharma <ma...@gmail.com> on 2016/07/28 21:27:25 UTC

Kafka invalid leader

Hi ,

I have a situation .

i have 3 broker(id) ==> 58,57,56,

some how broker 57 went invalid



hduser@node01:~$ kafka-topics --zookeeper node01:2181,node02:2181,rac1:2181
--describe

Topic:clouder PartitionCount:1 ReplicationFactor:2 Configs:
Topic: clouder Partition: 0 Leader: 56 Replicas: 56,57 Isr: 56
Topic:truckevent PartitionCount:2 ReplicationFactor:1 Configs:
Topic: truckevent Partition: 0 Leader: -1 Replicas: 57 Isr: 57
Topic: truckevent Partition: 1 Leader: 56 Replicas: 56 Isr: 56



 i moved to replica from 57 to 58



root@node01:/opt/TruckEvents# kafka-topics --zookeeper
node01:2181,node02:2181,rac1:2181 --describe
Topic:clouder PartitionCount:1 ReplicationFactor:2 Configs:
Topic: clouder Partition: 0 Leader: 56 Replicas: 56,57 Isr: 56
Topic:truckevent PartitionCount:2 ReplicationFactor:2 Configs:
Topic: truckevent Partition: 0 Leader: -1 Replicas: 58,57 Isr: 57
Topic: truckevent Partition: 1 Leader: 56 Replicas: 56 Isr: 56



but i also want to move leadership to 58 and tried



root@node01:/opt/TruckEvents# kafka-preferred-replica-election --zookeeper
node01:2181,node02:2181,rac1:2181
Successfully started preferred replica election for partitions
Set([truckevent,1], [truckevent,0], [clouder,0])

nothing changed and Leader is still 57 .



how can we change the leader is its invaid ?


-- 
Manoj