5.3. Configuring Time Synchronization
OpenShift Enterprise requires NTP to synchronize the system and hardware clocks. This synchronization is necessary for communication between the broker and node hosts; if the clocks are not synchronized correctly, messages are dropped by MCollective. It is also helpful to have accurate time stamps on files and in log file entries.
On each host, use the
ntpdate
command to set the system clock, replacing the NTP servers to suit your environment:
# ntpdate clock.redhat.com
You must also configure the
/etc/ntp.conf
file to keep the clock synchronized during operation.
If the error message
"the NTP socket is in use, exiting"
is displayed after running the ntpdate
command, it means that the ntpd
daemon is already running. However, the clock may not be synchronized due to a substantial time difference. In this case, run the following commands to stop the ntpd
service, set the clock, and start the service again:
# service ntpd stop
# ntpdate clock.redhat.com
# service ntpd start
If you are installing OpenShift Enterprise on physical hardware, use the
hwclock
command to synchronize the hardware clock to the system clock. Skip this step if you are installing on a virtual machine, such as an Amazon EC2 instance. For a physical hardware installation, run the following command:
# hwclock --systohc
Note
If you use the kickstart or bash script, the
synchronize_clock
function performs these steps.