首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Debian上的NTP时间同步失败

Debian上的NTP时间同步失败
EN

Server Fault用户
提问于 2020-03-07 20:29:37
回答 1查看 15.2K关注 0票数 2

这是在HypriotOS (Debian /Linux10)上运行在RaPi上的。

代码语言:javascript
运行
复制
$ timedatectl show-timesync
Failed to parse bus message: Connection timed out

然后使用sudo执行此操作:

代码语言:javascript
运行
复制
$ sudo timedatectl timesync-status
Failed to query server: Failed to activate service 'org.freedesktop.timesync1': timed out (service_start_timeout=25000ms)

然后显示timedatectl状态,显示"NTP服务:非活动“。

代码语言:javascript
运行
复制
$ 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是行不通的--它不存在。

代码语言:javascript
运行
复制
$ 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.
EN

回答 1

Server Fault用户

发布于 2020-03-13 14:51:12

作为Ubuntu服务器指南 (Ubuntu基于Debian),在systemd中存在一个用于处理时间同步的服务。也许需要重新启动它来应用您的更改:

代码语言:javascript
运行
复制
systemctl restart timesyncd

或者,如果您想要一个完整的NTP服务器,您可以按建议安装chrony,或者将ntpd安装为传统的NTP守护进程(安装了NTP服务器的用户将具有时间同步的优先级)。

票数 2
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1006028

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档