启动信息:

ZooKeeper JMX enabled by default
Using config: /home/appleyuchi/bigdata/apache-zookeeper-3.6.0-bin/conf/zoo_follower3.cfg
Starting zookeeper ... STARTED

尽管信息里面有STARTED但是并不代表启动成功,查看jps会发现没有QuorumPeerMain

/home/appleyuchi/bigdata/apache-zookeeper-3.6.0-bin/logs查看log,发现完整报错如下:

java.io.IOException: No snapshot found, but there are log entries. Something is broken!
	at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:281)
	at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:285)
	at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:1090)
	at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:1075)
	at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:227)
	at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:136)
	at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:90)
2020-05-17 19:03:42,299 [myid:1] - ERROR [main:QuorumPeerMain@113] - Unexpected exception, exiting abnormally
java.lang.RuntimeException: Unable to run quorum server 
	at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:1137)
	at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:1075)
	at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:227)
	at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:136)
	at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:90)
Caused by: java.io.IOException: No snapshot found, but there are log entries. Something is broken!
	at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:281)
	at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:285)
	at org.apache.zookeeper.server.quorum.QuorumPeer.loadDataBase(QuorumPeer.java:1090)

No snapshot found, but there are log entries. Something is broken

这个意思是说:

去把/home/appleyuchi/dfs/zookeeper/log/VERSION-2删了

然後重啟zookeeper

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐