在centOS上装了桌面后,使用ntpdate cn.pool.ntp.org命令报如下错误:
当使用ntpdate 192.168.1.192 来进行与其它节点进行时间同步时报 no server suitable for synchronization found 错误:
使用chkconfig --list 发现本机上确实安装了ntpdate工具。
解决办法:①在本机上装ntpd服务
②启动ntpd服务
③检查ntp server完成了与自身的同步
④使用ntpdate让其它节点与ntp server进行同步
其它可能遇到的错误:
错误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客户端。
server 127.127.1.0
fudge 127.127.1.0 stratum 8
在ntp server上重新启动ntp服务后,ntp server自身或者与其server的同步的需要一个时间段,这个过程可能是5分钟,在这个时间之内在客户端运行ntpdate命令时会产生no server suitable for synchronization found的错误。
那么如何知道何时ntp server完成了和自身同步的过程呢?
在ntp server上使用命令:
# watch ntpq -p
出现画面:
Every 2.0s: ntpq -p Thu Jul 10 02:28:32 2008
remote refid st t when poll reach delay offset jitter
==============================================================================
192.168.30.22 LOCAL(0) 8 u 22 64 1 2.113 179133. 0.001
LOCAL(0) LOCAL(0) 10 l 21 64 1 0.000 0.000 0.001
注意LOCAL的这个就是与自身同步的ntp server。
注意reach这个值,在启动ntp server服务后,这个值就从0开始不断增加,当增加到17的时候,从0到17是5次的变更,每一次是poll的值的秒数,是64秒*5=320秒的时间。
如果之后从ntp客户端同步ntp server还失败的话,用ntpdate –d来查询详细错误信息,再做判断。
错误2.Server dropped: no data
从客户端执行netdate –d时有错误信息如下:
transmit(192.168.30.22)
transmit(192.168.30.22)
transmit(192.168.30.22)
transmit(192.168.30.22)
transmit(192.168.30.22)
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的设置。
参考:http://www.blogjava.net/spray/archive/2008/07/10/213964.html
相关推荐
下面小编就为大家带来一篇完美解决ntp的错误问题no server suitable for synchronization fo。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
Synchronization Techniques for Digital Receivers
latest results in the field of synchronization for OFDMA systems, with tutorial objectives foremost. After quantifying the effects of synchronization errors on the system performance, we review some ...
Robust frequency and timing synchronization for OFDM
A protocol is provided in this standard that enables precise synchronization of clocks in measurement and control systems implemented with technologies such as network communication, local computing, ...
信号的同步不仅包括时间同步,还有载波同步和帧同步、网同步等。先看懂别人的算法,再写代码,如果代码写出来并且仿真结果正确,那么就基本上对这个算法理解的差不多了。当然,实际中并不像说的那么简单,有的同步还...
本文主要介绍mybaits非配置原因出错,这里对这个出现的问题做了详细介绍,及解决办法,有兴趣的小伙伴可以参考下
A Robust Timing and Frequency Synchronization for OFDM Systems,发表在IEEE Transaction on wireless communication上,很著名的一篇文档。
介绍数字接收机同步技术的权威之作,涉及时间、相位、频率同步
WaitOnAddress synchronization.lib
Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems
Packet Synchronization
英文版的 详细介绍了syncrhonization的物理概念及意义
Process synchronization
NTPSync is a simple NTP time synchronization app for Android. For more information visit http://sufficientlysecure.org/android-apps/ Build with Gradle Have Android SDK "tools", "platform-tools", and...
White Paper: Precision Clock Synchronization
( Adaptive finite-time control for overlapping cluster synchronization in coupled complex networks.pdf )