Enable an NTP Service

You must configure a Network Time Protocol (NTP) service on each node in your cluster. Most operating systems include the ntpd service for time synchronization.

RHEL 7 compatible operating systems use chronyd by default instead of ntpd. If chronyd is running (on any OS), Cloudera Manager uses it to determine whether the host clock is synchronized. Otherwise, Cloudera Manager uses ntpd.

To use ntpd for time synchronization:

  1. Install the ntp package:
    • RHEL compatible:
      yum install ntp
    • Ubuntu:
      apt-get install ntp
  2. Edit the /etc/ntp.conf file to add NTP servers, as in the following example:
    server 0.pool.ntp.org
    server 1.pool.ntp.org
    server 2.pool.ntp.org
  3. Start the ntpd service:
    • RHEL 7 Compatible:
      sudo systemctl start ntpd
    • Ubuntu:
      sudo service ntpd start
  4. Configure the ntpd service to run at boot:
    • RHEL 7 Compatible:
      sudo systemctl enable ntpd
    • Ubuntu:
      chkconfig ntpd on
  5. Synchronize the system clock to the NTP server:
    ntpdate -u <ntp_server>
  6. Synchronize the hardware clock to the system clock:
    hwclock --systohc