我的时钟已关闭,因此我想使用ntpdate. 我尝试了几个不同的 NTP 服务器,但由于某种原因,我总是收到以下错误消息:
$ sudo ntpdate ntp.ubuntu.com
4 Mar 12:27:35 ntpdate[1258]: no server suitable for synchronization found
$ sudo ntpdate pool.ntp.org
4 Mar 12:27:50 ntpdate[1267]: no server suitable for synchronization found
$ sudo ntpdate de.pool.ntp.org
4 Mar 12:28:01 ntpdate[1273]: no server suitable for synchronization found
$ sudo ntpdate us.pool.ntp.org
4 Mar 12:28:12 ntpdate[1276]: no server suitable for synchronization found
Run Code Online (Sandbox Code Playgroud)
我查看了相关问题,但没有一个能解决我的问题:
ntpd守护进程的冲突。我根本没有安装这个ntp包(包括ntpd守护进程)。当我ntpdate自己运行时,我得到以下输出:
6 月 8 日 15:47:46 ntpdate[31251]:无法使用服务器,退出
如果我用-q ntp.ubuntu.com开关运行它,它似乎查询得很好。
我一直在寻找许多文件,我发现的最相关的文件是/etc/default/ntpdate,但是,即使NTPDATE_USE_CONF设置为 no,我也无法理解/查看此错误是如何发生的
有任何想法吗?
更新 -
看起来ntpdate-debian工作正常并且是使用的实际命令/etc/default/ntpdate,但这并没有回答主要问题,我仍然找不到它......
我的 ntp.conf 文件:
user@pc[0][07:37:40]:/etc$ cat /etc/ntp.conf
idriftfile /var/lib/ntp/ntp.drift
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server pool.ntp.org
Run Code Online (Sandbox Code Playgroud)
命令输出:
user@pc[0][07:37:24]:/etc$ sudo ntpdate -dv pool.ntp.org
18 Jun 07:37:35 ntpdate[10737]: ntpdate 4.2.4p8@1.1612-o Tue Apr 19 07:15:05 UTC 2011 (1)
Looking for host pool.ntp.org and service ntp
host found : conquest.kjsl.com
transmit(198.137.202.16)
transmit(216.45.57.38)
transmit(64.6.144.6)
transmit(198.137.202.16)
transmit(216.45.57.38)
transmit(64.6.144.6)
transmit(198.137.202.16)
transmit(216.45.57.38)
transmit(64.6.144.6)
transmit(198.137.202.16)
transmit(216.45.57.38)
transmit(64.6.144.6)
transmit(198.137.202.16)
transmit(216.45.57.38)
transmit(64.6.144.6)
198.137.202.16: Server dropped: no data
216.45.57.38: Server dropped: no data
64.6.144.6: Server dropped: no data
server 198.137.202.16, port 123 …Run Code Online (Sandbox Code Playgroud)