Getting cluster information from ZooKeeper

3 minute read

Use ClusterInfoTool to get information on the running CloudBees Flow server cluster from ZooKeeper.


  • The CloudBees Flow server cluster must be installed and running on the network.

  • Configuration files that all CloudBees Flow server nodes will use in a clustered configuration must be uploaded to the Apache ZooKeeper server using the ZKConfigTool.

  • The ZooKeeper cluster must be running an odd number of Zookeeper nodes, and there must be a leader node.

  • The system must be running a version of Java supported by CloudBees Flow.

    For the correct version requirement, see Java Requirements . Java is automatically installed with the CloudBees Flow software as part of the Tools installation.


The CloudBees Flow installer adds the ClusterInfoTool to the following default locations:

  • Windows: C:\Program Files\Electric Cloud\ElectricCommander\server\bin\cluster-info-tool-jar-with-dependencies.jar

  • Linux: /opt/electriccloud/electriccommander/server/bin/cluster-info-tool-jar-with-dependencies.jar

ClusterInfoTool Command Syntax

ClusterInfoTool requires that the DCOMMANDER_ZK_CONNECTION environment variable is set so that it can locate your ZooKeeper nodes. You can set the variable by using the Linux export command beforehand or inline as part of the command for the ClusterInfoTool command itself:

$ export COMMANDER_ZK_CONNECTION=<ZooKeeper_Server1_IP>:2181,<ZooKeeper_Server2_IP>:2181,<ZooKeeper_Server3_IP>:2181 $ java -jar cluster-info-tool-jar-with-dependencies.jar [<arguments>]


$ java -DCOMMANDER_ZK_CONNECTION=<ZooKeeper_Server1_IP>:2181,<ZooKeeper_Server2_IP>:2181,<ZooKeeper_Server3_IP>:2181 -jar cluster-info-tool-jar-with-dependencies.jar [<arguments>]
Argument Description

--user < flow_username >

(Optional) Specifies the CloudBees Flow server username to connect. You are prompted for a username if you do not specify this argument.

--password < flow_password >

(Optional) Specifies the CloudBees Flow server user password to connect. You are prompted for a password if you do not specify this argument.

--serverUrl < flow_server_url >

(Optional) Specifies the CloudBees Flow server URL to connect. You are prompted for the URL if you do not specify this argument.


(Optional) Ignores non-trusted self-signed certificates


(Optional) Clears out JGroups cluster data


(Optional) Shows usage information

Sample Command Usage and Output

This is sample output generated by ClusterInfoTool :

$ cd /opt/electriccloud/electriccommander/server/bin $ export COMMANDER_ZK_CONNECTION=chronic3-zk1:2181,chronic3-zk2:2181,chronic3-zk3:2181 $ java -jar cluster-info-tool-jar-with-dependencies.jar --user charvey --ignoreCerts --serverUrl \https://chronic3java Using ZooKeeper connection string: chronic3-zk1:2181,chronic3-zk2:2181,chronic3-zk3:2181 Please enter the CloudBees Flow User Password: myPassword1 There are 3 ZooKeeper nodes in the ensemble: chronic3-zk1:2181, chronic3-zk2:2181, chronic3-zk3:2181 Connecting to ZooKeeper node chronic3-zk1:2181 Connected to chronic3-zk1:2181, attempting to get status chronic3-zk1:2181 is a follower Connecting to ZooKeeper node chronic3-zk2:2181 Connected to chronic3-zk2:2181, attempting to get status chronic3-zk2:2181 is a follower Connecting to ZooKeeper node chronic3-zk3:2181 Connected to chronic3-zk3:2181, attempting to get status chronic3-zk3:2181 is a leader ZooKeeper ensemble looks healthy, chronic3-zk3:2181 is the leader Connecting to ZooKeeper ensemble at chronic3-zk1:2181,chronic3-zk2:2181,chronic3-zk3:2181 Connected to ZooKeeper ensemble Reading data at /commander/conf/ Loaded data at /commander/conf/ Parsed data at /commander/conf/ COMMANDER_SERVER_NAME property value: Reading data at /commander/conf/ Loaded data at /commander/conf/ Parsed data at /commander/conf/ Reading data at /commander/conf/passkey Loaded data at /commander/conf/passkey Parsed passkey at /commander/conf/passkey Reading data at /commander/conf/keystore Loaded data at /commander/conf/keystore Parsed keystore at /commander/conf/keystore Checking JGroups data in ZooKeepr Checking /commander/jgroups/activeMQ: e3f11bbd-5773-34b5-cb23-328fb873e266 -> chronic3e-34229 e4a26872-9a45-8110-de5d-cc6786ffae92 F chronic3d-47613 e3f11bbd-5773-34b5-cb23-328fb873e266 T chronic3c-52982 31a5e860-f30f-6e27-ff7c-de746332f742 F chronic3a-10319 7e0ecd44-02f7-8441-4fcc-134a192784c8 F Checking /commander/jgroups/commander: 9678311d-68ed-eaf5-e887-c3c3e4f0c645 -> chronic3a-35854 3c114e9a-4fb4-cdb0-9542-3f03611cb9d0 F chronic3c-29085 4978a555-9278-e0af-0f70-73af1eadc7c0 F chronic3e-12173 30269f49-0bbe-bc9b-86c9-09c525d7cffb F chronic3d-25124 9678311d-68ed-eaf5-e887-c3c3e4f0c645 T Server IP address (This server property should be set with a value that points to the CloudBees Flow Server Load Balancer FQDN): Stomp Client URI: stomp+ssl:// Use SSL for Stomp: false

Interpreting ClusterInfoTool Command Output

How to interpret ClusterInfoTool output:

  • The nodes /commander/jgroups/activeMQ and /commander/jgroups/commander contain information on these JGroups clusters:

    • commander for the CloudBees Flow server cluster

    • activeMQ for the activeMQ cluster

  • The child nodes under each JGroups node represent the participating CloudBees Flow servers in the cluster. Each child node entry is in this form:

    <Logical_Name> <UUID> <IP_address>:<port> T|F
  • The number of entries in both JGroups nodes should be the same, with matching IP addresses but with different port numbers and distinct logical names and UUIDs. The coordinator node in each JGroups cluster is identified with a ‘ T ’ against its entry.