Skip to main content
Skip table of contents

ZooKeeper Setup


ZooKeeper is a centralized service that plays a critical role in maintaining configuration information, providing distributed synchronization, managing naming services, and offering group services. Germain relies on ZooKeeper as an essential component of its infrastructure.


ZooKeeper 3.6.3 or later is supported.

Download Apache ZooKeeper


  1. Extract the archive to a directory of your choice. In this example, we will use /opt/zookeeper.

  2. Create a clone of the sample config:

    bashCopy codecp /opt/zookeeper/conf/zoo_sample.cfg /opt/zookeeper/conf/zoo.cfg
  3. Update the dataDir setting in zoo.cfg to match the data directory:

    javascriptCopy codedataDir=/opt/zookeeper/data
  4. Add the following entries to the end of zoo.cfg to disable the ZooKeeper admin server:

    arduinoCopy codeadmin.enableServer=false

Start ZooKeeper

This startup method is sufficient for a development or test environment. For a production environment, it is recommended to run ZooKeeper instances as a service.

  • Run ZooKeeper via the shell (on Linux):

    bashCopy code/opt/zookeeper/bin/ start
  • Run ZooKeeper via command (on Windows):

    makefileCopy codec:\opt\zookeeper\bin\zkServer.cmd

Run ZooKeeper as a service on Windows:

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

  2. From an administrative command line, run:

    Copy codeZooKeeperService.exe install
  3. Start the Apache ZooKeeper Windows Service using your preferred method.

Bootstrap a ZooKeeper deployment:

  1. Start the ZK command line via:

    bashCopy code/opt/zookeeper/bin/
  2. Execute the following commands from within zkCli to populate the required bootstrap entries.

    Note: The name of the environment in this case will be "germain". Change this value only if you plan to host multiple APM environments on the same ZooKeeper cluster, such as "prod" and "stage".

    luaCopy codecreate /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 existing settings from, build and run the germain-apm\Util\ZkConfig module. The utility requires three arguments:

  1. ZooKeeper target IP and port.

  2. Config root to store the setting under.

  3. Path to file to import.


arduinoCopy codejava com.germainsoftware.apm.zkconfig.ZKConfig /config/germain/application

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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.