2

I have zookeeper.version=3.4.10, and I see:

https://issues.apache.org/jira/browse/ZOOKEEPER-2307

that is however in unresolved status. The problem appeared because of filling up the disk space. Now that I deleted some logs, and freed space, I would like to start zookeeper but it won't start due to this error:

[2019-01-22 09:07:32,646] ERROR Unable to load database on disk 
(org.apache.zookeeper.server.quorum.QuorumPeer)
java.io.IOException: The accepted epoch, 13 is less than the current epoch, 
14
    at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:645)
    at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:591)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:164)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
[2019-01-22 09:07:32,648] ERROR Unexpected exception, exiting abnormally 
(org.apache.zookeeper.server.quorum.QuorumPeerMain)
java.lang.RuntimeException: Unable to run quorum server
    at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:649)
    at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:591)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:164)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
    at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Caused by: java.io.IOException: The accepted epoch, 13 is less than the current epoch, 14
    at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:645)
    ... 4 more

Do I have to patch it (I'm not sure there is a patch ready), or can I just fix zookeeper data (like, make it somehow to accept new epoch) and continue with the same version?

hdjur_jcv
  • 191
  • 1
  • 4

3 Answers3

7

It worked, I just did:

cp currentEpoch acceptedEpoch

in a zookeeper data directory, and it started without any problem.

hdjur_jcv
  • 191
  • 1
  • 4
1

This did solve the problem,

cp ~/zookeeper/version-2/currentEpoch ~/zookeeper/version-2/acceptedEpoch

actual reason for this is issue is time sync b/w the zookeeper nodes

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
Malasani
  • 11
  • 1
0

I noticed this http://zookeeper-user.578899.n2.nabble.com/acceptedEpoch-and-currentEpoch-values-not-matching-exception-message-td7581567.html, Otis Gospodnetic says I could delete both files (currentEpoch and acceptedEpoch) and restart and it might recover zookeeper, but Flavio Junqueira says I should not. I guess I'm going to try anyway.

hdjur_jcv
  • 191
  • 1
  • 4