在做一个集群实验,克隆的虚拟机,然后使用ntpdate就抛出了错误。机器之间可以互相ping通,selinux和iptables都已经关闭。
[root@Server_2 ~]# service ntpd stop
Shutting down ntpd: [ OK ]
[root@Server_2 ~]# ntpdate Server_1
17 Apr 21:30:18 ntpdate[3113]: no server suitable for synchronization found
[root@Server_2 ~]# ntpdate -d Server_1
17 Apr 21:30:53 ntpdate[3115]: ntpdate 4.2.6p5@1.2349-o Mon Feb 6 07:22:46 UTC 2017 (1)
Looking for host Server_1 and service ntp
host found : Server_1
transmit(192.168.30.130)
receive(192.168.30.130)
transmit(192.168.30.130)
receive(192.168.30.130)
transmit(192.168.30.130)
receive(192.168.30.130)
transmit(192.168.30.130)
receive(192.168.30.130)
192.168.30.130: Server dropped: Leap not in sync
server 192.168.30.130, port 123
stratum 2, precision -24, leap 11, trust 000
refid [192.168.30.130], delay 0.02629, dispersion 0.00018
transmitted 4, in filter 4
reference time: de807515.a49f3f25 Tue, Apr 17 2018 21:28:53.643
originate timestamp: de80758d.672d9b0d Tue, Apr 17 2018 21:30:53.403
transmit timestamp: de80758d.5d4ac5ea Tue, Apr 17 2018 21:30:53.364
filter delay: 0.02629 0.02710 0.02734 0.02632
0.00000 0.00000 0.00000 0.00000
filter offset: 0.038197 0.037718 0.037627 0.038198
0.000000 0.000000 0.000000 0.000000
delay 0.02629, dispersion 0.00018
offset 0.038197
17 Apr 21:30:53 ntpdate[3115]: no server suitable for synchronization found
折腾了差不多20分钟,悲吹的结局是重启了下机器,然后什么都没有做,又好了。
[root@Server_2 ~]# ntpdate Server_1
17 Apr 21:36:24 ntpdate[3143]: adjust time server 192.168.30.130 offset -0.005873 sec