当前位置:Gxlcms >
数据库问题 >
zookeeper无法启动"Unable to load database on disk"
zookeeper无法启动"Unable to load database on disk"
时间:2021-07-01 10:21:17
帮助过:74人阅读
点
29:
53.411 INFO org
.apache.zookeeper.server.quorum.QuorumPeerConfig
Reading configuration from: /var/run/cloudera-scm-agent/process/
517-zookeeper-server/zoo
.cfg
下午
5点
29:
53.420 INFO org
.apache.zookeeper.server.quorum.QuorumPeerConfig
Defaulting to majority quorums
下午
5点
29:
53.423 INFO org
.apache.zookeeper.server.DatadirCleanupManager
autopurge
.snapRetainCount set to
5
下午
5点
29:
53.424 INFO org
.apache.zookeeper.server.DatadirCleanupManager
autopurge
.purgeInterval set to
24
下午
5点
29:
53.430 INFO org
.apache.zookeeper.server.DatadirCleanupManager
Purge task started.
下午
5点
29:
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