这是在HypriotOS (Debian /Linux10)上运行在RaPi上的。
$ timedatectl show-timesync
Failed to parse bus message: Connection timed out
然后使用sudo
执行此操作:
$ sudo timedatectl timesync-status
Failed to query server: Failed to activate service 'org.freedesktop.timesync1': timed out (service_start_timeout=25000ms)
然后显示timedatectl
状态,显示"NTP服务:非活动“。
$ timedatectl status
Local time: Sat 2020-03-07 21:03:51 CET
Universal time: Sat 2020-03-07 20:03:51 UTC
RTC time: n/a
Time zone: Europe/Zurich (CET, +0100)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: no
解决这个问题的正确方法是什么?或者首先,从哪里提取信息进行分析?
我已经在/etc/systemd/timesyncd.conf
中设置了正确的NTP服务器,然后运行$ sudo timedatectl set-ntp false
,然后运行$ sudo timedatectl set-ntp true
。
Update 2020-03-23
按照建议重新启动timesyncd
是行不通的--它不存在。
$ systemctl restart timesyncd
Failed to restart timesyncd.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status timesyncd.service' for details.
$ sudo systemctl restart timesyncd
Failed to restart timesyncd.service: Unit timesyncd.service not found.
$ systemctl status timesyncd.service
Unit timesyncd.service could not be found.
发布于 2020-03-13 14:51:12
作为Ubuntu服务器指南 (Ubuntu基于Debian),在systemd中存在一个用于处理时间同步的服务。也许需要重新启动它来应用您的更改:
systemctl restart timesyncd
或者,如果您想要一个完整的NTP服务器,您可以按建议安装chrony,或者将ntpd安装为传统的NTP守护进程(安装了NTP服务器的用户将具有时间同步的优先级)。
https://serverfault.com/questions/1006028
复制相似问题