Help Center/ MapReduce Service/ Troubleshooting/ Using ZooKeeper/ An Error Is Reported When the MRS Client Is Used to Connect to ZooKeeper
Updated on 2023-11-30 GMT+08:00

An Error Is Reported When the MRS Client Is Used to Connect to ZooKeeper

Issue

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

Symptom

When a user uses zkcli.sh to access ZooKeeper on the MRS master node, an error is reported.

Cause Analysis

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

Procedure

  1. Obtain the ZooKeeper IP address and port number. For details, see How Do I Obtain the ZooKeeper 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 following command to connect to ZooKeeper:

    zkCli.sh -server IP address of the ZooKeeper node:Port number

    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.