NTP not working properly in Cloud (NTP)

This document (7024239) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12

Situation

It appears that the wrong server time is causing applications to fail. For example SAP Applications.
The issue described is only seen in cloud enviroments.

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

To solve this it is advised to use chrony instead of ntp

   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 *******
 
and start the service
 
   systemctl enable chronyd
   systemctl start chronyd

Cause

It is unclear at this moment, why the ntp cannot cope and the drift gets out of control.
Once it surpasses 1000 ntp cannot cope anymore.
It seems that chrony works better in the cloud enviroment.

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

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center