[kafka@manager-2 zookeeper-3.4.14]$ tailf zookeeper.out
2022-05-07 11:07:37,931 [myid:2] - ERROR [main:QuorumPeerMain@92] - Unexpected exception, exiting abnormally
java.lang.RuntimeException: Unable to run quorum server
at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:694)
at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:636)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:170)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:114)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:81)
Caused by: java.io.IOException: The accepted epoch, 1 is less than the current epoch, 2
at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:690)
... 4 more
解决方法:
删除 data 和 datalog 中的 version-2 即可