A:10.240.210.233
B:10.240.180.171
C:10.240.210.60
A机器(ntp服务器端)
[email protected]ba ~$ntpq -c version ntpq [email protected] Fri Jul 24 10:56:21 UTC 2015 (1)
B机器(客户端,centos5.5) 同步失败
[email protected] ~$ntpq -c version ntpq [email protected] Sat Dec 20 02:52:15 UTC 2014 (1) [email protected] ~$ntpdate 10.240.210.233 21 Aug 15:27:05 ntpdate[20107]: no server suitable for synchronization found
C机器(客户端,centos6.6) 执行成功
[email protected] ~$ntpq -c version ntpq [email protected] Mon Mar 16 14:53:07 UTC 2015 (1) [email protected] ~$ntpdate 10.240.210.233 21 Aug 15:21:50 ntpdate[10574]: adjust time server 10.240.210.233 offset -0.008637 sec
总结,B机器同步失败可能是ntp版本较低,可尝试将其版本升级,或降低服务器(A机器)的NTP版本。
【附】
ntp配置文件
[email protected] ~$egrep -v "#|^\s*$" /etc/ntp.conf 指定NTP服务器日志文件 logfile /var/log/ntp driftfile /var/lib/ntp/drift restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict -6 ::1 restrict 10.240.210.0 mask 255.255.255.0 nomodify notrap server tiger.sina.com.cn prefer server 202.112.10.36 restrict 202.112.10.36 nomodify notrap noquery server 127.127.1.0 fudge 127.127.1.0 stratum 10 includefile /etc/ntp/crypto/pw keys /etc/ntp/keys
时间: 2024-10-30 10:19:25