Enable an NTP Service
CDH requires that you configure a Network Time Protocol (NTP) service on each machine 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:
- Install the ntp package:
- RHEL compatible:
yum install ntp
- SLES:
zypper install ntp
- Ubuntu:
apt-get install ntp
- RHEL compatible:
- 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
- Start the ntpd service:
- RHEL 7 Compatible:
sudo systemctl start ntpd
- RHEL 6 Compatible, SLES, Ubuntu:
sudo service ntpd start
- RHEL 7 Compatible:
- Configure the ntpd service to run at boot:
- RHEL 7 Compatible:
sudo systemctl enable ntpd
- RHEL 6 Compatible, SLES, Ubuntu:
chkconfig ntpd on
- RHEL 7 Compatible:
- Synchronize the system clock to the NTP server:
ntpdate -u <ntp_server>
- Synchronize the hardware clock to the system clock:
hwclock --systohc