no server suitable for synchronization found
ntp同步提示no server suitable for synchronization found
操作方法
- 01
[root@byrd ~]# find / -name "ntpdate"/usr/sbin/ntpdate/etc/rc.d/init.d/ntpdate/etc/sysconfig/ntpdate[root@byrd ~]#
- 02
[byrd@nginx ~]$ /usr/sbin/ntpdate 210.72.145.4426 Mar 13:29:55 ntpdate[31944]: bind() fails: Permission denied[root@nginx ~]# /usr/sbin/ntpdate 210.72.145.4426 Mar 13:30:21 ntpdate[31963]: no server suitable for synchronization found[root@nginx ~]# /usr/sbin/ntpdate time.windows.com26 Mar 13:31:05 ntpdate[31964]: no server suitable for synchronization found
- 03
[root@nginx ~]# ntpdate -d time.windows.com26 Mar 13:33:59 ntpdate[31968]: ntpdate 4.2.6p5@1.2349-o Sat Nov 23 18:20:12 UTC 2013 (1)Looking for host time.windows.com and service ntphost found : 65.55.56.206transmit(65.55.56.206)transmit(65.55.56.206)transmit(65.55.56.206)transmit(65.55.56.206)transmit(65.55.56.206)65.55.56.206: Server dropped: no dataserver 65.55.56.206, port 123stratum 0, precision 0, leap 00, trust 000refid [65.55.56.206], delay 0.00000, dispersion 64.00000transmitted 4, in filter 4reference time: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000originate timestamp: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000transmit timestamp: d6dce54b.365b28c1 Wed, Mar 26 2014 13:34:03.212filter delay: 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 filter offset: 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000delay 0.00000, dispersion 64.00000offset 0.00000026 Mar 13:34:04 ntpdate[31968]: no server suitable for synchronization found
- 04
[root@nginx ~]# ntpdate -d time.windows.com26 Mar 13:53:38 ntpdate[32382]: ntpdate 4.2.6p5@1.2349-o Sat Nov 23 18:20:12 UTC 2013 (1)Looking for host time.windows.com and service ntphost found : 64.4.10.33transmit(64.4.10.33)receive(64.4.10.33)transmit(64.4.10.33)receive(64.4.10.33)transmit(64.4.10.33)receive(64.4.10.33)transmit(64.4.10.33)transmit(64.4.10.33)server 64.4.10.33, port 123stratum 2, precision -6, leap 00, trust 000refid [64.4.10.33], delay 0.24284, dispersion 8.01073transmitted 4, in filter 4reference time: d6dce8c8.aa822c95 Wed, Mar 26 2014 13:48:56.666originate timestamp: d6dce9e3.62928ee3 Wed, Mar 26 2014 13:53:39.385transmit timestamp: d6dce9e3.7b92f8de Wed, Mar 26 2014 13:53:39.482filter delay: 0.24370 0.24359 0.24284 0.00000 0.00000 0.00000 0.00000 0.00000 filter offset: 0.017055 0.017701 0.003164 0.000000 0.000000 0.000000 0.000000 0.000000delay 0.24284, dispersion 8.01073offset 0.00316426 Mar 13:53:40 ntpdate[32382]: adjust time server 64.4.10.33 offset 0.003164 sec
- 05
原因:①:开启防火墙后可以收到回应包,证明是防火墙的原因,生产环境中,开启udp123端口即可; ②:可能的因素是在/etc/ntp.conf中禁止了相关notrust参数。 1。检查ntp的版本,如果你使用的是ntp4.2(包括4.2)之后的版本,在restrict的定义中使用了notrust的话,会导致以上错误。 使用以下命令检查ntp的版本:
- 06
下面是来自ntp官方网站的说明:The behavior of notrust changed between versions 4.1 and 4.2. In 4.1 (and earlier) notrust meant "Don't trust this host/subnet for time". In 4.2 (and later) notrust means "Ignore all NTP packets that are not cryptographically authenticated." This forces remote time servers to authenticate themselves to your (client) ntpd 解决: 把notrust去掉。 补充内容(非原创):当用ntpdate -d 来查询时会发现导致 no server suitable for synchronization found 的错误的信息有以下2个: 错误1.Server dropped: Strata too high 在ntp客户端运行ntpdate serverIP,出现no server suitable for synchronization found的错误。 在ntp客户端用ntpdate –d serverIP查看,发现有“Server dropped: strata too high”的错误,并且显示“stratum 16”。而正常情况下stratum这个值得范围是“0~15”。 这是因为NTP server还没有和其自身或者它的server同步上。 以下的定义是让NTP Server和其自身保持同步,如果在/ntp.conf中定义的server都不可用时,将使用local时间作为ntp服务提供给ntp客户端。