SUSE Support

Here When You Need Us

Chronyd exiting after couple minutes running

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

Environment

SUSE Linux Enterprise Server 15 SP4
SUSE Linux Enterprise Server 15 SP3
SUSE Linux Enterprise Server 15 SP2
SUSE Linux Enterprise Server for SAP Applications 15 SP4
SUSE Linux Enterprise Server for SAP Applications 15 SP3
SUSE Linux Enterprise Server for SAP Applications 15 SP2

Situation

The chronyd.service was enabled and started manually and after couple minutes it exits like an orderly shutdown.

The chronyd.service status shows an orderly shutdown and the service in an inactive state.

# systemctl status chronyd.service
○ chronyd.service - NTP client/server
     Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: disabled)
     Active: inactive (dead) since Thu 2022-09-15 13:22:24 MDT; 8s ago
       Docs: man:chronyd(8)
             man:chrony.conf(5)
    Process: 5568 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS)
    Process: 5572 ExecStartPost=/usr/lib/chrony/helper update-daemon (code=exited, status=0/SUCCESS)
   Main PID: 5570 (code=exited, status=0/SUCCESS)

Sep 15 13:20:36 sles15sp4 systemd[1]: Starting NTP client/server...
Sep 15 13:20:36 sles15sp4 chronyd[5570]: chronyd version 4.1 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS >
Sep 15 13:20:36 sles15sp4 chronyd[5570]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/drift
Sep 15 13:20:36 sles15sp4 systemd[1]: Started NTP client/server.
Sep 15 13:20:41 sles15sp4 chronyd[5570]: Selected source 165.140.142.118 (2.suse.pool.ntp.org)
Sep 15 13:22:24 sles15sp4 systemd[1]: Stopping NTP client/server...
Sep 15 13:22:24 sles15sp4 chronyd[5570]: chronyd exiting
Sep 15 13:22:24 sles15sp4 systemd[1]: chronyd.service: Deactivated successfully.
Sep 15 13:22:24 sles15sp4 systemd[1]: Stopped NTP client/server.

Both chronyd.service and yast-timesync.timer are enabled on systemd:

# systemctl show chronyd.service | grep UnitFileState
UnitFileState=enabled

# systemctl show yast-timesync.timer | grep UnitFileState
UnitFileState=enabled

The yast-timesync.timer is running:

# systemctl status yast-timesync.timer 
● yast-timesync.timer
   Loaded: loaded (/etc/systemd/system/yast-timesync.timer; enabled; vendor pre>
   Active: active (waiting) since Thu 2022-09-15 14:47:16 -03; 36s ago
  Trigger: Thu 2022-09-15 14:52:16 -03; 4min 23s left

Sep 15 14:47:16 localhost systemd[1]: Started yast-timesync.timer.

 

Resolution

systemctl stop yast-timesync.timer
systemctl disable yast-timesync.timer
systemctl restart chronyd.service
or

yast ntp-client and set Now and on Boot

Cause

The root cause is both yast-timesync.timer and chronyd.service are active at the same time and yast-timesync.service (triggered by yast-timesync.timer) runs a single instance of chronyd to update the system time and then exit. This shuts down the chronyd.service.

Additional Information

The yast-timesync.service enabled and gets triggered by yast-timesync.timer every 5 minutes. It runs chronyd in single-shot mode (-q) to set the system time once and then exits. yast-timesync.service conflicts with chronyd.service, because only one instance of chronyd can run at any given time.

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:000020765
  • Creation Date: 15-Sep-2022
  • Modified Date:15-Sep-2022
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

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

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.

Open an Incident

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