Skip to main content
ServiceEnterprise
Availability2024.1

Configure ZooKeeper

Prepare ZooKeeper for GermainUX

Run ZooKeeper as a Windows service

Install as Windows service

Bootstrap the GermainUX configuration

Create required configuration paths

Troubleshooting

Fix ZooKeeper startup problems
Apache ZooKeeper Setup Apache ZooKeeper is a centralized coordination service used by GermainUX to store configuration, synchronize distributed components, manage naming, and coordinate services.

Supported version

GermainUX supports Apache ZooKeeper 3.6.3 or later. Use the ZooKeeper version approved for your GermainUX release. Download it from the Apache ZooKeeper website.

Prerequisites

Before installing ZooKeeper, confirm that: The instructions below configure a single ZooKeeper instance. For production environments requiring high availability, deploy a ZooKeeper ensemble according to your organization’s infrastructure standards.

Install ZooKeeper

Extract the ZooKeeper archive to the desired directory. Example installation locations:
The remaining examples assume these paths.

Configure ZooKeeper

1 Create the configuration file

ZooKeeper includes a sample configuration. Copy it to zoo.cfg:
On Windows, copy:
to:

Configure the data directory

Open zoo.cfg and set:
On Windows, use an appropriate Windows path:
Create the directory if it does not already exist:
Ensure that the account running ZooKeeper can read and write to this directory.

Disable the ZooKeeper AdminServer

Add the following entries to zoo.cfg:
Disabling the AdminServer prevents its embedded HTTP interface from starting. The port setting has no effect while the AdminServer is disabled, but may be retained for consistency with the GermainUX configuration template.

Verify the client port

The standard ZooKeeper client port is:
If you change it, update the corresponding GermainUX connection configuration and firewall rules.

Start ZooKeeper manually

Manual startup is suitable for development, testing, and initial validation. Run ZooKeeper as an operating-system service in production.

Linux

Start ZooKeeper:
Check its status:
Stop ZooKeeper:

Windows

Open Command Prompt and run:
Keep the command window open while ZooKeeper is running.

Run ZooKeeper as a Windows service

GermainUX provides the files required to install ZooKeeper as a Windows service.

1 Copy the service files

Copy the following files from:
to the ZooKeeper bin directory:

Review the service configuration

Before installing the service, verify the following settings in ZooKeeperService.xml:
  • ZooKeeper installation directory
  • Java executable or Java home
  • zoo.cfg location
  • JVM memory settings
  • Log directory
  • Windows service name
  • Service account, when applicable

Install the service

Open Command Prompt as an administrator, navigate to the ZooKeeper bin directory, and run:

Start the service

Start the Apache ZooKeeper Windows service using the Windows Services console or your organization’s service-management process. Configure the startup type as Automatic when ZooKeeper must start with Windows.

Bootstrap the GermainUX configuration

After starting ZooKeeper, create the configuration paths required by GermainUX.

1 Open the ZooKeeper CLI

On Linux:
On Windows:
If ZooKeeper runs on another host, specify its address:

2 Create the required paths

Run the following commands inside the ZooKeeper CLI:
In this example, germain is the environment name. Change it only when multiple GermainUX environments share the same ZooKeeper cluster. For example:
Each GermainUX environment must be configured to use its corresponding configuration root.

Import an existing common.properties file

Existing settings can be imported using the GermainUX ZkConfig utility from:
The utility requires:
  • The ZooKeeper hostname and port
  • The ZooKeeper path under which the settings will be stored
  • The path to the common.properties file
Example:
Alternatively, execute the commands provided in:
Review the properties before importing them. The file may contain environment-specific URLs, credentials, or other sensitive configuration.

Startup order

Use the following startup sequence:

Validate the deployment

Test the ZooKeeper connection

Open the ZooKeeper CLI:
A successful connection displays a ZooKeeper command prompt.

Verify the GermainUX configuration

From the ZooKeeper CLI, run:
Confirm that the expected paths and values are present:

Verify the listening port

On Linux:
From a GermainUX host:

Production considerations

For production deployments:
  • Run ZooKeeper as an operating-system service.
  • Configure automatic startup and restart.
  • Use a three- or five-member ensemble when high availability is required.
  • Store ZooKeeper data on reliable, dedicated storage.
  • Monitor disk usage, JVM memory, latency, and ensemble health.
  • Restrict port 2181 to authorized systems.
  • Configure authentication and access-control lists where required.
  • Protect configuration values containing credentials or secrets.
  • Back up ZooKeeper configuration and data.
  • Keep all ensemble members on compatible ZooKeeper versions.
Do not expose ZooKeeper directly to the public internet.

Troubleshooting

ZooKeeper does not start

Check for:
  • Missing or incompatible Java runtime
  • Invalid zoo.cfg settings
  • An unavailable data directory
  • Incorrect directory permissions
  • A port conflict on 2181
  • Insufficient disk space
  • Incorrect Windows service paths or arguments
Review the ZooKeeper log and console output for the original startup error.

GermainUX cannot connect

Verify that:
  • ZooKeeper started before GermainUX.
  • The configured hostname resolves correctly.
  • The client port is listening.
  • Firewalls permit the connection.
  • GermainUX uses the correct environment root.
  • ZooKeeper is listening on an interface reachable from the GermainUX hosts.
  • Authentication settings match on both sides.

Bootstrap commands fail

If a command reports that a node already exists, inspect its value before changing or deleting it:
Do not overwrite or remove an existing production configuration until you have confirmed which GermainUX environment uses it and backed up its current value. Source: ZooKeeper Setup.

Get Help

Contact GermainUX Support

The GermainUX team helps you get up and running faster, empower your team, turn data into actionable insights, and optimize performance to deliver measurable business outcomes.

Can't find what you need?

Search all GermainUX docs with Ctrl + K, or use the feedback buttons at the bottom of this page to tell us what is missing.

The content of this document is proprietary to GERMAIN SOFTWARE.