zookeeper问题

启动zk的时候,发现zk起来就秒挂

2024-10-11 15:12:58,532 [myid:1]- ERROR [main:QuorumPeer@692] - Unable to load database on disk java.io.I0Exception: The current epoch, 6, is older than the last zxid, 30064771079
at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:674)
at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:
635)

2024-10-11 15:12:58,533 [myid:1]-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:693)
at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:
 

将zookeeper的version-2目录(忘记这个目录在哪,就看一下zoo.cfg的配置文件,找到datadir的位置,就能找到version-2的位置)备份一份,再重新创建一个新的version-2日录,然后重新启动zookeeper。

[root@slave-2 zookeeper]# mv version-2 version-2.bak
[root@slave-2 zookeeper]# mkdir version-2

上一篇:【无标题】


下一篇:爬虫实战总结