zkServer.sh management commands¶
zkServer.sh is the primary script used to manage Apache ZooKeeper server processes.^[600-developer__big-data__zookpeeper__zookpeeeper-01.md]
Commands¶
The script supports several standard operations to control the state of the ZooKeeper service^[600-developer__big-data__zookpeeper__zookpeeeper-01.md]:
- Start: Launches the ZooKeeper server in the background.
- Status: Queries and displays the current state of the server (e.g., leader, follower, or standalone).
- Stop: Gracefully shuts down the running ZooKeeper server.
Usage Examples¶
To execute these commands, navigate to the bin directory of your ZooKeeper installation or use the full path. The syntax requires the command name as an argument^[600-developer__big-data__zookpeeper__zookpeeeper-01.md]:
bin/zkServer.sh start
bin/zkServer.sh status
bin/zkServer.sh stop
It is common practice to use the jps command before or after these operations to verify that the QuorumPeerMain process is running^[600-developer__big-data__zookpeeper__zookpeeeper-01.md].
Related Concepts¶
- [[Apache ZooKeeper]]
- [[zoo.cfg]]
- [[zkCli.sh]]
Sources¶
^[600-developer__big-data__zookpeeper__zookpeeeper-01.md]