$ sntp 3.pool.ntp.org
4.2.8p15@1.3728-o Mon Mar 27 15:17:43 UTC 2023 (1)
kod_init_kod_db(): Cannot open KoD db file /var/lib/sntp/kod: No such file or directory
0.pool.ntp.org 81.16.177.123 no UCST response after 5 seconds
如您所说,前几步的设置检查了都没问题,最后这一步
$ sntp 132.163.96.1
sntp 4.2.8p15@1.3728-o Mon Mar 27 15:17:43 UTC 2023 (1)
kod_init_kod_db(): Cannot open KoD db file /var/lib/sntp/kod: No such file or directory
2023-07-07 18:05:01.123281 (-0800) +0.297009 +/- 0.198590 132.163.96.1 s1 no-leap
显示时间服务器也是通的。
就是不知道为什么ntp不能自动较时,尝试安装systemd-timesyncd来作为客户端自动较时,可是它不能在wsl中运行:
$ service systemd-timesyncd status
Redirecting to /bin/systemctl status systemd-timesyncd.service
○ systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Fri 2023-07-07 17:40:28 CST; 3s ago
└─ ConditionVirtualization=!container was not met
Docs: man:systemd-timesyncd.service(8)