ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. Germain relies on ZooKeeper.


ZooKeeper 3.6.3 or later is supported.

Download Apache ZooKeeper


  • Extract the archive to a directory of your choice

    • In this example we will use /opt/zookeeper

  • Create a clone of the sample config:

    • cp /opt/zookeeper/conf/zoo_sample.cfg /opt/zookeeper/conf/zoo.cfg

  • Update dataDir= setting in zoo.cfg to match data directory:

    • dataDir=/opt/zookeeper/data

  • Add the following entries to the end of zoo.cfg to disable ZK admin server:

    • admin.enableServer=false

    • admin.serverPort=9080

Start Zookeeper

  • This startup method is sufficient for a dev or test environment. For a production environment, we recommend running ZooKeeper instances as a service.

  • Run ZooKeeper via the shell (on Linux):

    • /opt/zookeeper/bin/zkServer.sh start

  • Run ZooKeeper via command (on Windows):

    • c:\opt\zookeeper\bin\zkServer.cmd

Run Zookeeper as a service on Windows

  • Copy ZooKeeperService.exe and ZooKeeperService.xml from {serviceDistroDirectory}\install\zookeeper\ to your ZooKeeper bin directory.

  • From an administrative command line, run:

    • ZooKeeperService.exe install

  • Start the Apache ZooKeeper Window Service using your preferred method


Bootstrap a Zookeeper deployment

  • Start ZK command line via:

    • /opt/zookeeper/bin/zkCli.sh

  • Execute the below commands from within zkCli to populate required bootstrap entries.

    • The name of the environment in this case will be "germain". You only need to change this value if you are planning to host multiple APM environments on the same ZooKeeper cluster (i.e., "prod" and "stage").

    • create /config ""
      create /config/germain ""
      create /config/germain/rest-services ""
      create /config/germain/rest-services/logging.config "${catalina.base}/conf/rest-logback.xml"
      create /config/germain/ingestion-services ""
      create /config/germain/ingestion-services/logging.config "${catalina.base}/conf/ingestion-logback.xml"

  • To import the existing settings from common.properties, build and run the germain-apm\Util\ZkConfig module. The utility requires 3 arguments:

1. ZooKeeper target IP and port

2. Config root to store setting under

3. Path to common.properties file to import

  • Example: java com.germainsoftware.apm.zkconfig.ZKConfig /config/germain/application common.properties

  • Alternatively, use the commands found in {serviceDistroDirectory}\install\zookeeper\bootstap.zk to populate common bootstrap settings.