IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

Alternative: Check at host level

edit

If the inline shell script command doesn’t work, you can run the check directly from the director host. This can happen for example when your user lacks permissions to access Docker. This approach avoids entering the container and doesn’t require installing additional tools like telnet or nc, relying instead on curl, which is typically available by default on most Linux systems.

  1. Run the equivalent inline shell script directly on the host terminal, outside of the zookeeper container

    for i in $(seq 2191 2199); do
      output=$(echo mntr | curl -s telnet://localhost:$i | grep -E "server_state|leader|follower|not currently serving|zk_znode_count");
      if [ -n "$output" ]; then
        echo "ZK mntr Response from port $i:";
        echo "$output";
        break;
      fi
    done
  2. Look for the following lines in the output:

    • zk_server_state leader or zk_server_state follower — indicates the node’s ZooKeeper role