I can help fix this as its happening for us in DISH Upgrade,please direct me accordingly.
Please see email from Bob.
From: Bello, Bob Bob.Bello@dish.com
Sent: Tuesday, April 15, 2014 10:00 AM
Cc: Bello, Bob
Subject: RE: Kafka upgrade 0.8.0 to 0.8.1 - kafka-preferred-replica-election failure
I performed another test. I build a single Kafka 0.8.1 Broker with a single ZK instance. Brand new, no topics.
Upon start up of the Kafka broker, the zookeeper /admin node only contains "/admin/delete_topics".
Even without creating a topic, I run a perfered replica election, and it's successful. After the run, I check the node for /admin/preferred_replica_election and it exists.
[zk: tm1mwwm001:2181(CONNECTED) 0] get /admin/preferred_replica_election
cZxid = 0x19 ctime = Tue Apr 15 09:53:22 MDT 2014 mZxid = 0x19 mtime = Tue Apr 15 09:53:22 MDT 2014 pZxid = 0x19 cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x0 dataLength = 29 numChildren = 0
If I run the election again, I get the following error (the same error as my original post).
Failed to start preferred replica election
kafka.common.AdminCommandFailedException: Admin command failed
Caused by: kafka.admin.AdminOperationException: Preferred replica leader election currently in progress for Set(). Aborting operation
... 2 more
The zookeeper log shows the following:
2014-04-15 09:53:44 INFO server.PrepRequestProcessor - Got user-level KeeperException when processing sessionid:0x1456615e7770006 type:create cxid:0x2 zxid:0x1e txntype:-1 reqpath:n/a Error Path:/admin/preferred_replica_election Error:KeeperErrorCode = NodeExists for /admin/preferred_replica_election
It looks like the preferred election process is not removing the node after completion.
Middleware Applications Administrator