[Solved] zookeeper Startup Error: already running as process

1. Problem description

Zookeeper has been able to start normally before, but an error is reported in a startup. Already running as process

2. Problem description

Enter the command JPS to check whether it is really started. It is found that it is not started (the process name of zookeeper is QuorumPeerMain)

This is usually caused by the machine abnormally closing the residual PID file in the cache directory (forced shutdown for the closing process, etc.)
just clean up the cache directory

3. Problem handling

Enter the file directory (this directory is the dataDir directory when setting zoo.cfg(cd /export/server/zookeeper-3.4.9/conf)):

(base) [ [email protected] zkdatas]# cd /export/server/apache-zookeeper-3.5.6-bin/zkdatas

(base) [ [email protected]2 zkdatas]# ll

Clean up cache files

(base) [[email protected] zkdatas]# rm -rf zookeeper_server.pid

Restart andyou can start normally

(base) [[email protected] apache-zookeeper-3.5.6-bin]# bin/zkServer.sh start

Read More: