cat /etc/zookeeper/conf/zoo.cfg
Find dataDir=/var/lib/zookeeper
Switch to the path /var/lib/zookeeper
cd / var / lib / zookeeper
View the files in the directory:
ls
version-2 exists
remove version-2
mv ./version-2 ./version-2.bak
Then add the role host to the instance of zookeeper and start successfully.
ref: https://blog.csdn.net/nma_123456/article/details/50435248