天天看點

常見報錯_NTP同步常見報錯之no server suitable for synchrnization found概述解決步驟

概述

在成功配置好NTP服務端後,在NTP用戶端執行ntpdate指令更新NTP用戶端的時間時,如果報以下錯誤:

no server suitable for synchronization found,可采用以下步驟檢查。

常見報錯_NTP同步常見報錯之no server suitable for synchrnization found概述解決步驟

解決步驟

1、在NTP服務端執行以下指令檢測NTP服務是否運作

#systemctl status ntpd
           
常見報錯_NTP同步常見報錯之no server suitable for synchrnization found概述解決步驟

2、運作ping指令檢測NTP用戶端與NTP服務端是否連通

#ping NTP服務端IP
           
常見報錯_NTP同步常見報錯之no server suitable for synchrnization found概述解決步驟

3、在NTP用戶端執行 ntpdate -d NTP服務端IP:

輸出結果如下:

常見報錯_NTP同步常見報錯之no server suitable for synchrnization found概述解決步驟

4、檢查NTP服務端使用的ntp版本

#ntpq -c version
           
常見報錯_NTP同步常見報錯之no server suitable for synchrnization found概述解決步驟

如果輸出版本是ntp4.2(包括4.2)之後的版本,檢測是否在restrict的定義中使用了notrust。如果有則删除notrust,再進行NTP時間同步。

5、檢查NTP服務端的防火牆是否開放NTP服務端口:udp 123

#systemctl stop firewalld
           

關閉防火牆測試NTP同步,如果成功,則需要修改iptables的設定,以開放NTP服務端口:

6、檢查restrict參數寫的IP對不

--之前寫的内容restrict 172.26.150.0 mask 255.255.255.192 nomodify notrap 
           

最後發現是mask寫錯了,修改成255.255.255.0即可。

常見報錯_NTP同步常見報錯之no server suitable for synchrnization found概述解決步驟

注意:在NTP Server重新啟動NTP服務後,NTP Server自身或與其他NTPServer的同步大概需要5分鐘左右,是以NTP用戶端在這個時間段運作ntpdate指令時會産生no server suitable for synchronization found錯誤。

覺得有用的朋友多幫忙轉發哦!後面會分享更多devops和DBA方面的内容,感興趣的朋友可以關注下~

常見報錯_NTP同步常見報錯之no server suitable for synchrnization found概述解決步驟

繼續閱讀