【发布时间】:2016-12-09 06:54:10
【问题描述】:
ubuntu 16.04 服务器。我的第一个 ubuntu,所以是的,ubuntu 新手因素。
服务器上的系统时间快了大约 17 分钟。我可以在命令行以多种方式成功重置它。在任何情况下,在大约 15 秒内,它都会再次重置为错误的时间。 systemd 似乎是它的根源。在消息日志中:
systemd[20113]: Time has been changed
我认为罪魁祸首是 timedatectl。确保禁用并检查:
root@portal:~# systemctl status systemd-timesyncd.service
â systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; disabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
ââdisable-with-time-daemon.conf
Active: inactive (dead)
Docs: man:systemd-timesyncd.service(8)
root@portal:~# systemctl list-units|grep 'time-sync'
root@portal:~#
这个:
root@portal:~# ntpdate -s 0.north-america.pool.ntp.org
root@portal:~# journal -f
结果如下:
Dec 08 20:04:18 portal sudo[4486]: pam_unix(sudo:session): session opened
for user root by owen(uid=0)
Dec 08 19:46:44 portal systemd[2814]: Time has been changed
Dec 08 19:46:44 portal ntpdate[4502]: step time server 171.66.97.126 offset -1098.814353 sec
Dec 08 20:05:35 portal systemd[2814]: Time has been changed
注意每个日志条目的时间戳...
请告诉我,什么是重置时间,从哪里获取 ntp 服务器设置,为什么会出错???我认为大漂移可能是问题的一部分,但它与它关闭的分钟数不匹配...... TIA
【问题讨论】:
标签: ubuntu-16.04 systemd ntp