完美解决ntp的错误问题no server suitable for synchronization fo

2019-09-23 09:10:56王旭

192.168.30.22: Server dropped: no data

server 192.168.30.22, port 123

.....
28 Jul 17:42:24 ntpdate[14148]: no server suitable for synchronization found

出现这个问题的原因可能有2:

 

1。检查ntp的版本,如果你使用的是ntp4.2(包括4.2)之后的版本,在restrict的定义中使用了notrust的话,会导致以上错误。

使用以下命令检查ntp的版本:

# ntpq -c version

下面是来自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去掉。

2。检查ntp server的防火墙。可能是server的防火墙屏蔽了upd 123端口。

可以用命令

#service iptables stop

来关掉iptables服务后再尝试从ntp客户端的同步,如果成功,证明是防火墙的问题,需要更改iptables的设置。

以上这篇完美解决ntp的错误问题no server suitable for synchronization fo就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持易采站长站。