NTP wont sync, fails to find systemd-timesyncd.service

Creating a bug report/issue


  • Date | Fri 15 Jul 2022 10:15:29 AEST
  • DietPi version | v8.5.1 (MichaIng/master)
  • Image creator | DietPi Core Team
  • Pre-image | Raspberry Pi OS Lite (64-bit)
  • Hardware | RPi 4 Model B (aarch64) (ID=4)
  • Kernel version | Linux pi-usenet 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux
  • Distro | bullseye (ID=6,RASPBIAN=0)
  • Command | systemctl restart systemd-timesyncd
  • Exit code | 5
  • Software title | DietPi-TimeSync

Steps to reproduce:

  1. Run systemctl restart systemd-timesyncd

Expected behaviour:

NTP should sync with NTP Server and set appropriate time.

Actual behaviour:

Command is failing.
pi@pi-usenet:~# /boot/dietpi/func/run_ntpd 1
[FAILED] DietPi-TimeSync | systemctl restart systemd-timesyncd
[ INFO ] DietPi-TimeSync | Executing alternative command: systemctl restart systemd-timesyncd
Failed to restart systemd-timesyncd.service: Unit systemd-timesyncd.service not found.

Extra details:

I’ve tried to set multiple different NTP Servers, the systemd-timesyncd.service is not found.
I’ve manually pinged each of the NTP servers, and ping is successful.

Additional logs:

Failed to restart systemd-timesyncd.service: Unit systemd-timesyncd.service not found.

Extra details

This has been working fine for ~6 months, but recently started getting issue. Have restarted the Pi 4-5 times, has not resolved the issue.
As a result, I cannot update any packages.

Did you perform a Debian version update from Buster to Bullseye?

In fact the time sync package is missing on your system. Therefore the service is failing. Following should bring it back

apt -y install systemd-timesyncd

It appears that did it - cheers!! No idea how it went missing.

I did perform the update to Bullseye, but that must have been 3-4 months ago? No idea why it went missing now.

did you followed our blog post for the Bullseye migration?