[
https://issues.apache.org/jira/browse/ZOOKEEPER-2400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15208558#comment-15208558
]
Flavio Junqueira commented on ZOOKEEPER-2400:
---------------------------------------------
Thanks for reporting this issue. I don't recommend using the deprecated leader
election options, there are correctness issues with those options and we aren“t
maintaining them, that's why we have deprecated them. Please use the default.
> ZooKeeper not starting: Follower is ahead of the leader
> -------------------------------------------------------
>
> Key: ZOOKEEPER-2400
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2400
> Project: ZooKeeper
> Issue Type: Bug
> Components: quorum
> Affects Versions: 3.4.6
> Reporter: Andrey
>
> Steps to reproduce:
> # Select deprecated algorithm in zoo.cfg: {code}electionAlg=0{code}
> # Start zookeeper cluster: A(index 3),B(index 1),C(index 2) nodes
> # Stop A node.
> # Make some change to zk data. i.e. re-create ephemeral node. Make sure
> currentEpoch increased in B and C nodes.
> # currentEpoch/acceptedEpoch in node A less than B/C epoch
> # Stop node B. Zookeeper cluster is not available
> # Start node A. In A's node logs:
> {code}
> LEADING [quorum.QuorumPeer] [QuorumPeer[myid=3]/0:0:0:0:0:0:0:0:15523]
> LEADING - LEADER ELECTION TOOK - 1458721180995 [quorum.Leader]
> Follower sid: 2 : info :
> org.apache.zookeeper.server.quorum.QuorumPeer$QuorumServer@3a888c1
> java.io.IOException: Follower is ahead of the leader, leader summary: 10
> (current epoch), 42949672964 (last zxid)
> at
> org.apache.zookeeper.server.quorum.Leader.waitForEpochAck(Leader.java:894)
> at
> org.apache.zookeeper.server.quorum.LearnerHandler.run(LearnerHandler.java:365)
> ...
> Follower sid: 1 : info :
> org.apache.zookeeper.server.quorum.QuorumPeer$QuorumServer@5001b9f5
> ...
> java.lang.InterruptedException: Timeout while waiting for epoch to be acked
> by quorum
> at
> org.apache.zookeeper.server.quorum.Leader.waitForEpochAck(Leader.java:915)
> at org.apache.zookeeper.server.quorum.Leader.lead(Leader.java:394)
> at
> org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:799)
> {code}
> The logs above will be printed indefinitely and cluster won't recover.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)