ntpdate -d seems successful, but ntpdate returns no server suitable,show “no server suitable for synchronization found”

一台外地机房的机器,死活不能使用ntpdate同步时间,本机防火墙处于关闭的状态。

直接报错:

_no server suitable for synchronization found_

使用-d跟踪信息如下:

**ntpdate -d time.windows.com**

7 Dec 18:15:41 ntpdate[805]: ntpdate 4.2.4p8@1.1612-o Thu May 13 14:38:25 UTC 2010 (1)

Looking for host time.windows.com and service ntp

host found : 40.69.40.157

transmit(40.69.40.157)

transmit(40.69.40.157)

transmit(40.69.40.157)

receive(40.69.40.157)

transmit(40.69.40.157)

receive(40.69.40.157)

transmit(40.69.40.157)

server 40.69.40.157, port 123

stratum 2, precision -6, leap 00, trust 000

refid [40.69.40.157], delay 0.33365, dispersion 24.00294

transmitted 4, in filter 4

reference time: dbf25f41.e2a529f0 Wed, Dec 7 2016 18:13:21.885

originate timestamp: dbf25fd0.a67c342e Wed, Dec 7 2016 18:15:44.650

transmit timestamp: dbf25fd0.87404af8 Wed, Dec 7 2016 18:15:44.528

filter delay: 0.00000 0.00000 0.33395 0.33365

0.00000 0.00000 0.00000 0.00000

filter offset: 0.000000 0.000000 -0.01830 -0.02420

0.000000 0.000000 0.000000 0.000000

delay 0.33365, dispersion 24.00294

offset -0.024200

7 Dec 18:15:44 ntpdate[805]: adjust time server 40.69.40.157 offset -0.024200 sec

从上述跟踪ntpdate与上层服务之间服务也都正常,而且也未发现如下的2个错误

1. 没有发现“Server dropped: strata too high”的错误,而且stratum 2也在这个值的范围“0-15”

2. 没有发现“Server dropped: no data“的错误。出现该问题在ntp版本>=4.2,在restrict的定义中使用了notrust的话,会导致该错误,把notrust去掉即可。

可以使用ntpdate -u serverip去同步,-u 和 -d不能同时使用。

怀疑是该机房在防火墙的后面导致的,可以使用-u参数,如果怀疑是防火墙限制了,可以使用。

-u Direct ntpdate to use an unprivileged port for outgoing packets. This is most useful when behind a firewall that blocks incoming traffic to privileged ports, and you want to synchronize with hosts beyond the firewall. Note that the -d option always uses unprivileged ports.

此条目发表在Knowledge, Oprating-System分类目录,贴了标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注