Help Center/ MapReduce Service/ Troubleshooting/ Using ZooKeeper/ ZooKeeper Is Unavailable Because of Non-synchronized Time Between Active and Standby Master Nodes
Updated on 2022-12-09 GMT+08:00

ZooKeeper Is Unavailable Because of Non-synchronized Time Between Active and Standby Master Nodes

Symptom

The ZooKeeper service of the MRS cluster cannot be started, and an alarm is generated indicating that the ZooKeeper service is unavailable.

Cause Analysis

Log in to the active and standby master nodes as user root and run the ntpq -p command. The command output shows that the time on the two nodes is not synchronized.

Procedure

  1. Log in to the active OMS node as user root and run the ifconfig command to query the floating IP address of the current node.

    In the following command output, for example, the floating IP address is 192.168.0.3.

  2. Log in to the master node where the NTP time is abnormal and run the following command to stop the NTP service:

    service ntpd stop

  3. Run the following command to manually synchronize the time between the active and standby master nodes:

    /usr/sbin/ntpdate Floating IP address obtained in 1

  4. Run the following command to start NTP:

    service ntpd start

  5. Run the ntpstat command to check the time synchronization result.