Zookeeper Failed to process transaction type: 1 error: KeeperErrorCode = NoNode

zookeeper启动,错误log如下:2016-02-25 10:19:32,895 - ERROR - Parent /consumers/shopGroup/ids missing for /consumers/javaGroup/ids/javaGroup_tsbpocdata-1451549590930-686fd918
2016-02-25 10:19:32,897 - ERROR - Unexpected exception, exiting abnormally
java.io.IOException: Failed to process transaction type: 1 error: KeeperErrorCode = NoNode for /consumers/shopGroup/ids
at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:153)
at org.apache.zookeeper.server.ZKDatabase.loadDataBase(ZKDatabase.java:223)
at org.apache.zookeeper.server.ZooKeeperServer.loadData(ZooKeeperServer.java:250)
at org.apache.zookeeper.server.ZooKeeperServer.startdata(ZooKeeperServer.java:377)
at org.apache.zookeeper.server.NIOServerCnxnFactory.startup(NIOServerCnxnFactory.java:122)
at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:112)
at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86)
at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:52)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)
Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /consumers/javaGroup/ids
at org.apache.zookeeper.server.persistence.FileTxnSnapLog.processTransaction(FileTxnSnapLog.java:211)
at org.apache.zookeeper.server.persistence.FileTxnSnapLog.restore(FileTxnSnapLog.java:151)
... 9 more
已邀请:

chris - 喜欢自由散漫的我

赞同来自: Ansible

这是一个zk已知的bug,目前解决的方法就是让zookeeper重头开始。删除你dataDir/version-2/*,然后再重新启动zookeeper。   但是你如果是生产线上环境,看看还有更好的解决方案吗,线上环境你应该也是集群,所以一个节点从头开始,也不会有太大问题。

要回复问题请先登录注册