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

自己的虚拟机集群,一次强制关机后,发现slave2的zookeeper起不来了

http://blog.csdn.net/ashic/article/details/47088299

下午5点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

[[email protected] zookeeper]# pwd

/var/lib/zookeeper

[[email protected] zookeeper]# ls

myid version-2 version-2.bak

清空version-2目录下的所有文件

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

时间: 2024-10-03 13:45:59

zookeeper无法启动"Unable to load database on disk"的相关文章

ZK—zookeeper无法启动,报“Unable to load database on dis”

问题描述:部署zookeeper的服务器磁盘满了,引起服务异常,将zookeeper进程杀掉之后,重新启动zookeeper启动的时候显示成功了: [[email protected] bin]# ./zkServer.sh start ZooKeeper JMX enabled by default Using config: /usr/local/zookeeper-3.4.10/bin/../conf/zoo.cfg Starting zookeeper ... STARTED 但是zoo

启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration.

启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration. 出现此异常是因为,struts.xml定义的版本和 struts2-core-2.1.6.jar里面的struts-default.xml版本不一致!! struts-default.xml文件里面定义的<!DOCTYPE ...>如下: <!DOCTYPE struts PUBLIC "-//Apach

xvfb启动PyQt4程序报Unable to load library icui18n错误

xvfb启动PyQt4程序报如下错误: Unable to load library icui18n "Cannot load library icui18n: (libicui18n.so.48: cannot open shared object file: No such file or directory)" 解决方法: sudo apt-get install libicu48 参考:https://forums.virtualbox.org/viewtopic.php?f=

启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration. - Class: java.net.PlainSocketImpl

今天刚好宿舍断网,打开电脑,打开ide工具,启动tomcat后,访问web项目工程,页面显示404,查看控制台,运行报错信息如下: 严重: Exception starting filter struts2Unable to load configuration. - Class: java.net.PlainSocketImplFile: PlainSocketImpl.javaMethod: connectLine: 177 - java/net/PlainSocketImpl.java:1

jenkins 启动slave,出现com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://127.0.0.1:8080/jnlpJars/remoting.jar

master: linux slave: win7 64位系统 在配置好系统后,采用jnlp的方式启动slave节点,报错如下: com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://127.0.0.1:8080/jnlpJars/remoting.jar at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source) at c

忘记导入struts2-xxx-plugin-x.x.x.jar导致服务器启动报Unable to load configuration.Caused by: Parent package is not defined: xxx-default

今天做的一个Struts2+MyFaces(JSF)+Spring的应用,为了使用JSF,我的struts.xml中使用了如下代码 <package name="jsf" extends="jsf-default"> <interceptors> <interceptor-stack name="jsfFullStack"> <interceptor-ref name="params"

uwsgi启动Django项目时:unable to load app 0 (mountpoint=&#39;&#39;) (callable not found or import error) *** no app loaded. going in full dynamic mode ***

说起来有点坑 用命令都能正常启动,但是用配置文件就是不行 提示 unable to load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in full dynamic mode *** 最后准备睡觉了了,无意间解决了 uwsgi.ini文件的wsgi模块是这样写的,一直报错,网上的都找遍了还是没解决 module = AutoTestSite.wsgi:applicati

react-native启动时红屏报错:Unable to load script.Make sure you&#39;re either running a metro server or that ....

一.报错信息内容 我是在Android Studio中运行启动react-native项目时报的这个错误 1.报错提示:Unable to load script.Make sure you're either running a metro server( run 'react-native start' ) or that your bundle 'index.android.bundle' is packaged correctly for release. 2.中文翻译:无法加载脚本.请

Node升级 启动RN报错:react-native启动时红屏报错:Unable to load script.Make sure you&#39;re either running a metro server or that

1. 项目中在android/app/src/main/创建文件夹  assets 2.项目中执行命令 1. 项目中在android/app/src/main/创建文件夹  assets 2.项目中执行命令 react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle