码迷,mamicode.com
首页 > 数据库 > 详细

zookeeper无法启动"Unable to load database on disk"

时间:2015-07-27 18:54:00      阅读:939      评论:0      收藏:0      [点我收藏+]

标签:zookeeper   cloudera   hadoop   

自己的虚拟机集群,一次强制关机后,发现slave2的zookeeper起不来了
http://blog.csdn.net/ashic/article/details/47088299

下午529:53.411   INFO    org.apache.zookeeper.server.quorum.QuorumPeerConfig 
Reading configuration from: /var/run/cloudera-scm-agent/process/517-zookeeper-server/zoo.cfg
下午529:53.420   INFO    org.apache.zookeeper.server.quorum.QuorumPeerConfig 
Defaulting to majority quorums
下午529:53.423   INFO    org.apache.zookeeper.server.DatadirCleanupManager   
autopurge.snapRetainCount set to 5
下午529:53.424   INFO    org.apache.zookeeper.server.DatadirCleanupManager   
autopurge.purgeInterval set to 24
下午529:53.430   INFO    org.apache.zookeeper.server.DatadirCleanupManager   
Purge task started.
下午529:53.434   ERROR   org.apache.zookeeper.server.DatadirCleanupManager   
Error occured while purging.
org.apache.zookeeper.server.persistence.FileTxnSnapLog$DatadirException: Missing data directory /var/lib/zookeeper/version-2, automatic data directory creation is disabled (zookeeper.datadir.autocreate is false). Please create this directory manually.
    at org.apache.zookeeper.server.persistence.FileTxnSnapLog.<init>(FileTxnSnapLog.java:102)
    at org.apache.zookeeper.server.PurgeTxnLog.purge(PurgeTxnLog.java:68)
    at org.apache.zookeeper.server.DatadirCleanupManager$PurgeTask.run(DatadirCleanupManager.java:140)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)

来源: http://192.168.40.205:7180/cmf/process/all/logs/context?timestamp=1437989392521&port=9000&host=slave2.cloudera&path=%2Fvar%2Flog%2Fzookeeper%2Fzookeeper-cmf-zookeeper1-SERVER-slave2.cloudera.log&roleId=113

Removing data from /var/zookeeper/version-2 then restart seems to “fix” the problem (it gets a snapshot from one of the other nodes in the quorum).
This is Zookeeper 3.3.5+19.5-1~squeeze-cdh3, i.e. from Cloudera’s distribution.

来源: https://issues.apache.org/jira/browse/ZOOKEEPER-1546

看了老外的文章,下面上是处理方法

more /etc/zookeeper/conf.dist/zoo.cfg
找到datadir
[root@slave2 zookeeper]# pwd
/var/lib/zookeeper
[root@slave2 zookeeper]# ls
myid version-2 version-2.bak
清空version-2目录下的所有文件

版权声明:本文为博主原创文章,未经博主允许不得转载。linux公社盗转死妈

zookeeper无法启动"Unable to load database on disk"

标签:zookeeper   cloudera   hadoop   

原文地址:http://blog.csdn.net/ashic/article/details/47088299

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!