Updated on 2022-12-14 GMT+08:00

Accessing ZooKeeper from an MRS Cluster

Issue

An error is reported when a user attempts to access ZooKeeper from an MRS cluster.

Symptom

The customer uses zkcli.sh to access ZooKeeper on the MRS Master node, but an error is reported.

Cause Analysis

The command used by the customer is incorrect. As a result, an error is reported.

Procedure

  1. Obtain the ZooKeeper IP address.
  2. Log in to the Master node as user root.
  3. Run the following command to initialize environment variables:

    source /opt/client/bigdata_env

  4. Run the zkCli.sh -server IP address of the node where ZooKeeper is located:2181 command to connect to ZooKeeper of the MRS cluster.

    The IP address of the node where ZooKeeper is located is the one queried in 1. Use commas (,) to separate multiple IP addresses.

  5. Run common commands such as ls / to view ZooKeeper information.