Zk-zookeeper Unable to start, reported "Unable to load database on dis"

Source: Internet
Author: User
Tags zookeeper

Problem Description:
Deployment Zookeeper server disk is full, causing the service exception, after the zookeeper process is killed, restart the zookeeper when the boot is displayed successfully:

[[email protected] bin]# ./zkServer.sh startZooKeeper JMX enabled by defaultUsing config: /usr/local/zookeeper-3.4.10/bin/../conf/zoo.cfgStarting zookeeper ... STARTED

But the zookeeper process and port are not up.

View Zookeeper.out, found the error message is as follows:

2018-05-07 10:33:58,556 [Myid:3]-INFO [main:[email protected]]-Reading snapshot/opt/data/zookeeper/version-2/ Snapshot.1900356f192018-05-07 10:33:58,966 [Myid:3]-ERROR [main:[email protected]]-Last transaction was partial .2018-05-07 10:33:58,968 [Myid:3]-ERROR [main:[email protected]]-Unable to load database on Diskjava.io.IOExcepti On:the accepted epoch, than the current epoch, 3a at Org.apache.zookeeper.server.quorum.QuorumPeer.loadData Base (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) 2018-05-07 10:33:58,970 [Myid:3]- ERROR [main:[email protected]]-Unexpected exception, exiting Abnormallyjava.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, than the current epoch, 3a at Org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase (Quo rumpeer.java:645) ...  4 More[[email protected] bin]#

After online query, get the solution:
Back up a copy of the Zookeeper Version-2 directory, recreate a new version-2 directory, and then restart zookeeper.

The operation is as follows:

[[email protected] zookeeper]# lltotal 28-rw-r--r-- 1 root root     2 Aug 30  2017 myiddrwxr-xr-x 2 root root 24576 May  7 10:36 version-2-rw-r--r-- 1 root root     5 May  7 10:42 zookeeper_server.pid[[email protected] zookeeper]# mv version-2 version-2.bak[[email protected] zookeeper]# lltotal 28-rw-r--r-- 1 root root     2 Aug 30  2017 myiddrwxr-xr-x 2 root root 24576 May  7 10:36 version-2.bak-rw-r--r-- 1 root root     5 May  7 10:42 zookeeper_server.pid[[email protected] zookeeper]# mkdir version-2[[email protected] zookeeper]# lltotal 28-rw-r--r-- 1 root root     2 Aug 30  2017 myiddrwxr-xr-x 2 root root     6 May  7 10:44 version-2drwxr-xr-x 2 root root 24576 May  7 10:36 version-2.bak-rw-r--r-- 1 root root     5 May  7 10:42 zookeeper_server.pid

Then restart Zookeeper:

[[email protected] bin]# ./zkServer.sh startZooKeeper JMX enabled by defaultUsing config: /usr/local/zookeeper-3.4.10/bin/../conf/zoo.cfgStarting zookeeper ... STARTED[[email protected] bin]# netstat -tlunp|grep 2181tcp6       0      0 :::2181                 :::*                    LISTEN      32695/java

Zk-zookeeper Unable to start, reported "Unable to load database on dis"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.