recover from corrupt zookeeper (ZK) database

Document created by viavisupport on Aug 16, 2019
Version 1Show Document
  • View in full screen mode
ProblemZookeeper does not start after disk full --

2019-02-19 11:42:16,082 [myid:1] - INFO [main:FileSnap@86] - Reading snapshot /xsight/var/opt/zookeeper/data/version-2/snapshot.4700eddd9c
2019-02-19 11:42:16,189 [myid:1] - ERROR [main:Util@214] - Last transaction was partial.
2019-02-19 11:42:16,385 [myid:1] - ERROR [main:QuorumPeer@692] - Unable to load database on disk
To restart zookeeper when local files/DB corrupt - 


xs stop 
systemctl stop zookeeper 


move all current log/snopshot to tmp dir - 
mv /xsight/var/opt/zookeeper/data/version-2 /var/tmp/. 


systemctl start zookeeper 
(active log/snopshot will be copied from another ZK node) 


xs start