如何解决 timesyncd 服务被终止并且无法找到的症状。
Timesyncd 已安装。
$ sudo apt -y install systemd-timesyncd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
systemd-timesyncd is already the newest version (249.11-0ubuntu3.11pop0~1704473387~22.04~3ce38bf).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
但是,找不到该服务。
$ sudo systemctl status systemd-timesyncd
Unit systemd-timesyncd.service could not be found.
看起来它已被杀死但不知道原因。
$ sudo journalctl -fu systemd-timesyncd.service
Jul 31 09:31:40 pop-os systemd-timesyncd[602]: Initial synchronization to time server 185.125.190.56:123 (ntp.ubuntu.com).
-- Boot 67e30f40b57c4eadae6ed5a5b4df8c13 --
Jul 31 09:35:32 pop-os systemd[1]: Starting Network Time Synchronization...
Jul 31 09:35:33 pop-os systemd[1]: Started Network Time Synchronization.
Jul 31 09:36:03 pop-os systemd-timesyncd[660]: Initial synchronization to time server 185.125.190.56:123 (ntp.ubuntu.com).
Jul 31 09:40:53 pop-os systemd[1]: systemd-timesyncd.service: Current command vanished from the unit file, execution of the command list won't be resumed.
Jul 31 09:41:42 pop-os systemd[1]: systemd-timesyncd.service: Got notification message from PID 660, but reception is disabled.
Jul 31 09:42:42 pop-os systemd[1]: systemd-timesyncd.service: Watchdog timeout (limit 3min)!
Jul 31 09:42:42 pop-os systemd[1]: systemd-timesyncd.service: Killing process 660 (systemd-timesyn) with signal SIGABRT.
Jul 31 09:42:43 pop-os systemd[1]: systemd-timesyncd.service: Main process exited, code=dumped, status=6/ABRT
Jul 31 09:42:43 pop-os systemd[1]: systemd-timesyncd.service: Failed with result 'watchdog'.
timdatectl 有效。
$ timedatectl
Local time: Wed 2024-01-17 15:00:42 AEDT
Universal time: Wed 2024-01-17 04:00:42 UTC
RTC time: Wed 2024-01-17 04:00:42
Time zone: Australia/Sydney (AEDT, +1100)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
环境
$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
更新
根据建议@paradin,操作系统使用 Chlony 作为 NTP 客户端。