NTP not working properly in Cloud (NTP)
This document (7024239) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Checking the system time with
ntpq -p
shows an offset that is higher than 1000.
Trying to set the time again with ntpdate or other tools is only of temporary use as the time drifts again and soon out of range.
Resolution
zypper in chrony
systemctl disable ntpd
systemctl stop ntpd
edit the config file
/etc/chrony.conf
******* SNIP *******
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
#! pool pool.ntp.org iburst
server <put_in_IP_of_1st_timeserver> iburst
server <put_in_IP_of_2nd_timeserver> iburst
server <put_in_IP_of_3rd_timeserver> iburst
maxdistance 16.0
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift
# In first three updates step the system clock instead of slew
# if the adjustment is larger than 1 second.
makestep 1.0 3
# Enable kernel synchronization of the real-time clock (RTC).
rtcsync
# Allow NTP client access from local network.
#allow 192.168/16
# Serve time even if not synchronized to any NTP server.
#local stratum 10
# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys
# Specify directory for log files.
logdir /var/log/chrony
# Select which information is logged.
#log measurements statistics tracking
******* SNAP *******
systemctl start chronyd
Cause
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7024239
- Creation Date: 05-Nov-2019
- Modified Date:02-Apr-2021
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com