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

运维之家

 找回密码
 注册
搜索
查看: 7084|回复: 0

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

[复制链接]
dirtysea 发表于 2010-6-30 15:01:00 | 显示全部楼层 |阅读模式
30 Jun 22:49:31 ntpdate[4856]: 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。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|手机版|Archiver|运维之家

GMT+8, 2024-4-29 03:32 , Processed in 0.144143 second(s), 14 queries .

Powered by Dirtysea

© 2008-2020 Dirtysea.com.

快速回复 返回顶部 返回列表