服务器维护,服务器代维,安全设置,漏洞扫描,入侵检测服务

dirtysea 发表于 2010-6-30 15:01:00

解决ntp的错误 no server suitable for synchronization found

30 Jun 22:49:31 ntpdate: 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的设置。
如果关闭的防火墙问题依旧, 很可能是上层路由的设置有问题, 如果这种情况, 我们就只能通过tcp来更新时间啦


tcp来更新时间那肯定是rdate查看时间服务器的时间:
# rdate time-b.nist.gov
设置时间和时间服务器同步:
# rdate -s time-b.nist.gov
有什么不明白的, 请 # man rdate
下面附送系列时间服务器的列表, 有的不一定可以使用哈
time.nist.gov
time-b.nist.gov
216.118.116.105
rdate.darkorb.net
202.106.196.19
time-b.timefreq.bldrdoc.gov
注意:最后还要用hwclock -w。
页: [1]
查看完整版本: 解决ntp的错误 no server suitable for synchronization found