You are viewing content for 4.5 | 4.4 | 4.3 | Previous Releases

Set Up a Zookeeper Cluster

Zookeeper v3.6.13 Cluster Setup

Zookeeper is a coordination service that allows for easy management of common services like naming, configuration management, synchronization and group services.

When installed with Incorta, there must be a Zookeeper instance on each Incorta node. Use the following steps to  configure Zookeeper with Incorta.

The following steps anticipate that the Zookeeper cluster is set up with the following information:

  1. On each Incorta node, navigate to the Incorta Incorta installation’s Zookeeper folder.
  2. Create a folder named data and navigate to that folder.
  3. Under data, create a file named myid.

The myid file must contain a numeric value that uniquely identifies the Zookeeper node.

\$ echo 12345 > myid

  1. Navigate to the Zookeeper conf directory and locate the zoo.cfg configuration file.
  2. Edit the zoo.cfg file to match the following:

Use the following properties and valid values:

  • tickTime: The basic time unit in milliseconds used by ZooKeeper. It is used to do heartbeats and the minimum session timeout will be twice the tickTime. In this example, the timeout for initLimit is 5 ticks at 2000 milliseconds a tick, or 10 seconds.
  • dataDir: The location to store the in-memory database snapshots.
  • clientPort: The port to listen for client connections.
  • initLimit: Timeouts ZooKeeper uses to limit the length of time the ZooKeeper servers have to connect to a leader.
  • syncLimit: Limits how far out of date a server can be from a leader.
  • server.X: The entries of the form server.X(X stands for the server ID which the numeric value that identifies a Zookeeper node, saved earlier in the myidfile) list the servers that make up the ZooKeeper service. When the server starts up, it knows which server it is by looking for the file myid in the data directory. That file contains the server number. Regarding the two port numbers after each server name: 2888and 3888. Peers use the former port to connect to other peers (i.e. 2888). The other port number (i.e. 3888) is for leader election.

If your Zookeeper cluster is setup as follows:

Server ID Node IP Client Port P2P Port Leader Election Port
1 2181 2888 3888
2 2181 2888 3888
3 2181 2888 3888
4 2181 2888 3888

With this configuration, the Incorta system tenant configuration key com.incorta.zk must have the following value:,,,

Start Zookeeper with the command:

bin/ start

Connect Zookeeper’s cluster with the command:

bin/ -server,,,

When you identify servers by name, these names need to be resolvable from each Zookeeper node. Ping the other servers by their names to make sure their names are resolvable.

You must configure each machine hosting a Zookeeper node to allow inbound/outbound connections between all Zookeeper nodes for the client, P2P, and Leader election ports (ports 2181, 2888 and 3888). Other process must not use for each Zookeeper node are not used by any other process.

When a Zookeeper node is started, a directory named name version-2 is automatically created in the configured data directory. When this does not occur the node has not started.

A file named zookeeper.out exists on top of the Zookeeper folder. This file contains useful logs in when debugging Zookeeper starting issues.

Use the Linux command echo srvr | nc localhost 2181 for the role of the tested node, whether it’s a leader or a follower node. The message “This ZooKeeper instance is not currently serving requests” message indicates that this node started but is not functioning.