19 Jan 10:33:11 ntpdate[29616]: no server suitable for synchronization found
这种问题从下面几个点开始验证
1.查看防火墙是否开通udp的123端口,是udp 无法使用telnet来验证,只能看iptables和硬墙是否有策略
2.如果端口开通,查看服务器端的ntp.conf文件中server是否正常,如果配置有问题,肯定无法使用
3.修改配置是否重新启动ntpd服务
4.查看服务端ntpd进程是否正常
遇到的几个问题
处理办法:网络不通,检查防火墙的udp端口123是否能用,查看服务端的ntpd服务是否启动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[root@ip-192.168.25.10 ~]# ntpdate -d 192.168.25.10 19 Jan 10:24:16 ntpdate[27838]: ntpdate 4.2.6p5@1.2349-o Tue Jun 23 15:38:19 UTC 2020 (1) Looking for host 192.168.25.10 and service ntp host found : ip-192.168.25.10.ap-southeast-1.compute.internal transmit(192.168.25.10) transmit(192.168.25.10) transmit(192.168.25.10) transmit(192.168.25.10) transmit(192.168.25.10) 192.168.25.10: Server dropped: no data server 192.168.25.10, port 123 stratum 0, precision 0, leap 00, trust 000 refid [192.168.25.10], delay 0.00000, dispersion 64.00000 ansmitted 4, in filter 4 ▽ference time: 00000000.00000000 Mon, Jan 1 1900 8:05:43.000 originate timestamp: 00000000.00000000 Mon, Jan 1 1900 8:05:43.000 transmit timestamp: e3b0c156.2402fb9d Tue, Jan 19 2021 10:24:22.140 filter delay: 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 filter offset: 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 delay 0.00000, dispersion 64.00000 offset 0.000000 19 Jan 10:24:24 ntpdate[27838]: no server suitable for synchronization found |
这个问题一般都是server端ntp.conf中server行配置了网络ntp的服务端url导致,可以收到ntp的包,但是延迟很高。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
1 [root@ip-192.168.25.10 ~]# ntpdate -d 192.168.25.10 2 19 Jan 10:33:32 ntpdate[29681]: ntpdate 4.2.6p5@1.2349-o Tue Jun 23 15:38:19 UTC 2020 (1) 3 Looking for host 192.168.25.10 and service ntp 4 host found : ip-192.168.25.10.ap-southeast-1.compute.internal 5 transmit(192.168.25.10) 6 receive(192.168.25.10) 7 transmit(192.168.25.10) 8 receive(192.168.25.10) 9 transmit(192.168.25.10) 10 receive(192.168.25.10) 11 transmit(192.168.25.10) 12 receive(192.168.25.10) 13 192.168.25.10: Server dropped: strata too high 14 server 192.168.25.10, port 123 15 stratum 16, precision -24, leap 11, trust 000 16 refid [192.168.25.10], delay 0.02573, dispersion 0.00000 17 transmitted 4, in filter 4 18 reference time: 00000000.00000000 Mon, Jan 1 1900 8:05:43.000 19 originate timestamp: e3b0c382.6344a1b6 Tue, Jan 19 2021 10:33:38.387 20 transmit timestamp: e3b0c382.670289fb Tue, Jan 19 2021 10:33:38.402 21 filter delay: 0.02574 0.02573 0.02574 0.02573 22 0.00000 0.00000 0.00000 0.00000 23 filter offset: -0.01470 -0.01471 -0.01471 -0.01471 24 0.000000 0.000000 0.000000 0.000000 25 delay 0.02573, dispersion 0.00000 26 offset -0.014712 27 28 19 Jan 10:33:38 ntpdate[29681]: no server suitable for synchronization found |
解决办法就是将服务端也开启ntpdate 然后通过ntpdate链接网络url的ntp服务器,然后在ntp.conf中配置server 127.127.1.0 (记住 不是127.0.0.1 这个无效)
在打开ntpq -p 查看是否转为LOCAL了
1 2 3 4 |
[root@ip-192.168.25.10 ~]# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *LOCAL(0) .LOCL. 8 l 11 64 17 0.000 0.000 0.000 |
正确的ntpdate -d 应该是下面的
ps:以上ip均已做脱敏处理
from:https://www.cnblogs.com/zclinux/p/14296884.html