Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

解決 NTP 錯誤:no server suitable for synchronization found

編輯:Linux 教學

錯誤現象

執行 ntpdate -d serverIP 時出現 no server suitable for synchronization found,常見兩類原因:

錯誤一:Server dropped: Strata too high

現象

Server dropped: strata too high
stratum 16

正常 stratum 範圍 0~15,16 表示未同步。

原因

NTP 伺服器尚未與上層時源或本地時鐘完成同步。

解決方案

  1. 在 /etc/ntp.conf 加入本地參考時鐘配置:
    server 127.127.1.0
    fudge 127.127.1.0 stratum 8
  2. 重啟 NTP 服務:service ntpd restart
  3. 等待同步完成(約 5 分鐘),使用 watch ntpq -p 監控:
    reach 值從 0 遞增至 17(約 320 秒)表示同步完成

錯誤二:Server dropped: no data

現象

transmit(192.168.30.22) ... Server dropped: no data

可能原因與排查

  1. NTP 版本 ≥ 4.2 且配置了 notrust
    notrust 在 4.2+ 版本意義變更為「忽略未加密認證的封包」。
    解決:移除 restrict 行中的 notrust 參數。
  2. 防火牆阻擋 UDP 123 端口
    測試:service iptables stop 後嘗試同步。若成功,需在防火牆開放 UDP 123。

驗證命令

ntpq -c version          # 查看 NTP 版本
ntpdate -d serverIP      # 除錯模式查看詳細錯誤
watch ntpq -p            # 即時監控同步狀態
Copyright © Windows教程網 All Rights Reserved