systemd-timesyncd.service fails after snapshot 20190521

The 20190521 snapshot brought an update to systemd, after which systemd.timesyncd.service fails to start.

● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2019-05-23 08:33:39 BST; 2min 38s ago
     Docs: man:systemd-timesyncd.service(8)
  Process: 679 ExecStart=/usr/lib/systemd/systemd-timesyncd (code=exited, status=238/STATE_DIRECTORY)
 Main PID: 679 (code=exited, status=238/STATE_DIRECTORY)

May 23 08:33:39 Orion-15 systemd[1]: Failed to start Network Time Synchronization.
May 23 08:33:39 Orion-15 systemd[1]: systemd-timesyncd.service: Service has no hold-off time (RestartSec=0), scheduling restart.
May 23 08:33:39 Orion-15 systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 5.
May 23 08:33:39 Orion-15 systemd[1]: Stopped Network Time Synchronization.
May 23 08:33:39 Orion-15 systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
May 23 08:33:39 Orion-15 systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
May 23 08:33:39 Orion-15 systemd[1]: Failed to start Network Time Synchronization.
May 23 08:33:41 Orion-15 systemd[1]: systemd-timesyncd.service: Start request repeated too quickly.
May 23 08:33:41 Orion-15 systemd[1]: systemd-timesyncd.service: Failed with result 'exit-code'.
May 23 08:33:41 Orion-15 systemd[1]: Failed to start Network Time Synchronization.

For anyone else hit by this the solution is:

Remove the symlink “/var/lib/systemd/timesync”

Delete “/var/lib/private/systemd/timesync”

Then restart the service.

(Needs only to be done once, subsequent re-boots are OK.)

Thanks for the guidance, I do not check the boot logs every time, but checking today I found this problem related to systemd-timesyncd.service

Following the instructions:


> sudo rm /var/lib/systemd/timesync
> sudo rm -rf /var/lib/private/systemd/timesync
> sudo systemctl restart systemd-timesyncd
> sudo systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2019-06-23 13:12:00 CEST; 55s ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 12192 (systemd-timesyn)
   Status: "Synchronized to time server for the first time 163.172.223.2:123 (0.opensuse.pool.ntp.org)."
    Tasks: 2 (limit: 4915)
   Memory: 1.1M
   CGroup: /system.slice/systemd-timesyncd.service
           └─12192 /usr/lib/systemd/systemd-timesyncd

Jun 23 13:11:59 systemd[1]: Starting Network Time Synchronization...
Jun 23 13:12:00 systemd[1]: Started Network Time Synchronization.
Jun 23 13:12:47 systemd-timesyncd[12192]: Synchronized to time server for the first time 163.172.223.2:123 (0.opensuse.pool.ntp.org).

/var/lib/private/systemd/timesync is a directory so a normal rm will not do.

I was wondering if I was the only one … I’m not feeling so lonesome now :slight_smile:

/var/lib/private/systemd/timesync is a directory so a normal rm will not do.

Indeed.

I subsequently discovered that removing the symlink is sufficient to restore normal operation, that directory then becoming redundant - but for the sake of keeping things tidy I’d still remove it.