1. 程式人生 > >解決ntp的錯誤 no server suitable for synchronization found

解決ntp的錯誤 no server suitable for synchronization found

 當用ntpdate -d 來查詢時會發現導致 no server suitable for synchronization found 的錯誤的資訊有以下2個: 

錯誤1.Server dropped: Strata too high

ntp客戶端執行ntpdate serverIP,出現no server suitable for synchronization found的錯誤。

ntp客戶端用ntpdate –d serverIP檢視,發現有“Server dropped: strata too high”的錯誤,並且顯示“stratum 16”。而正常情況下stratum這個值得範圍是“0~15”。

這是因為NTP server還沒有和其自身或者它的server同步上。

以下的定義是讓NTP Server和其自身保持同步,如果在/ntp.conf中定義的

server都不可用時,將使用local時間作為ntp服務提供給ntp客戶端。

server 127.127.1.0
fudge 
127.127.1.0 stratum 8 

ntp server上重新啟動ntp服務後,ntp server自身或者與其server的同步的需要一個時間段,這個過程可能是5分鐘,在這個時間之內在客戶端執行ntpdate命令時會產生no server suitable for synchronization found的錯誤。

那麼如何知道何時ntp server完成了和自身同步的過程呢?

ntp server上使用命令:

# watch ntpq -p


出現畫面:

Every 2.0s: ntpq -p                                                                                                             Thu Jul 10 02:28:32 2008

     remote           refid      st t when poll reach   delay   offset jitter

==============================================================================

 192.168.30.22   LOCAL(0)         8 u   22   64    1    2.113 179133.   0.001

 LOCAL(0)        LOCAL(0)        10 l   21   64    1    0.000   0.000  0.001

注意LOCAL的這個就是與自身同步的ntp server

注意reach這個值,在啟動ntp server服務後,這個值就從0開始不斷增加,當增加到17的時候,從0175次的變更,每一次是poll的值的秒數,是64*5=320秒的時間。

如果之後從ntp客戶端同步ntp server還失敗的話,用ntpdate –d來查詢詳細錯誤資訊,再做判斷。

錯誤2.Server dropped: no data

從客戶端執行
netdate –d時有錯誤資訊如下:

transmit(192.168.30.22)

transmit(192.168.30.22)

transmit(192.168.30.22)

transmit(192.168.30.22)

transmit(192.168.30.22)

192.168.30.22: Server dropped: no data

server 192.168.30.22, port 123

.....
28 Jul 17:42:24 ntpdate[14148]: no server suitable for synchronization found

出現這個問題的原因可能有2

1。檢查ntp的版本,如果你使用的是ntp4.2(包括4.2)之後的版本,在restrict的定義中使用了notrust的話,會導致以上錯誤。

使用以下命令檢查ntp的版本:

# ntpq -c version


下面是來自ntp官方網站的說明:
The behavior of
notrust changed between versions 4.1 and 4.2.

In 4.1 (and earlier) notrust meant "Don't trust this host/subnet for time".

In 4.2 (and later) notrust means "Ignore all NTP packets that are not cryptographically authenticated." This forces remote time servers to authenticate themselves to your (client) ntpd

解決:

notrust去掉。(這個位置不是太懂,先記住,再確認)


2
。檢查ntp server的防火牆。可能是server的防火牆遮蔽了upd 123埠。

可以用命令

#service iptables stop


來關掉iptables服務後再嘗試從ntp客戶端的同步,如果成功,證明是防火牆的問題,需要更改iptables的設定。

相關推薦

解決ntp錯誤 no server suitable for synchronization found

 當用ntpdate -d 來查詢時會發現導致 no server suitable for synchronization found 的錯誤的資訊有以下2個:  錯誤1.Server dropped: Strata

ntpdate 同步時間錯誤no server suitable for synchronization found

在一臺centos最小化安裝的機器上面,yum -y install ntpdate安裝ntpdate同步時間。然而執行ntpdate -u ntp.sjtu.edu.cn的時候,死活調不了時間。並報以下錯誤 30 Oct 23:30:56 ntpdate[8200]: no se

Tomcat啟動失敗錯誤解決Could not publish server configuration for Tomcat v7.0 Server at localhost

for fig conf 百度 cat nbsp 裏的 image multiple 今天又碰到了Tomcat啟動失敗的錯誤,錯誤提示如下: Could not publish server configuration for Tomcat v7.0 Server

Tomcat啟動失敗錯誤解決Could not publish server configuration for Tomcat v8.0 Server at localhost.

兩個 eclipse text 8.0 重名 servers tex tails img 這個問題本質是我們有多個重名項目,為什麽我們會有多個重名項目,其實一般都是我們刪除以前的項目,然後再把它重新導進eclipse時以前的項目刪除不徹底造成的,以前的項目在"Servers

解決There is no Action mapped for namespace [/] and action name [userAction!add]等問題

      今天初步學了一下Struct2的Action物件,在接近完成的時候,總是出現There is no Action mapped for namespace [/] and action name [userAction!add]的這個錯誤,排除了網上所說的(1)檔

SpringBoot2.x整合Security5(完美解決 There is no PasswordEncoder mapped for the id "null")

問題描述 以前做過一次SpringBoot整合Security的專案,但最近重新嘗試SpringBoot整合Security的專案時卻碰到了問題 java.lang.IllegalArgumentException: There is no PasswordEn

Sublime如何安裝插件並且解決There are no packages available for installation問題方案

ctr pack and 並且 class ann 添加 load https 打開命令面板 Ctrl (Command)+Shift+p 找到並打開:Preferences: Package Control sublime Settings - User 添加一行

Eclipse 啟動出現錯誤 no java virtual machine was found

lips 報錯 msi file java pat 2.x default lan 在打開eclipse時,報錯信息如下: 出現此問題的原因是eclipse找不到javaw.exe的path 打開eclipse.ini文件: -startup plugins/org.ec

解決 LLVM 錯誤 fatal error: ‘csignal’ file not found

/Users/exchen/Downloads/Unity-iPhone/Classes/main.mm:3:10: fatal error: ‘csignal’ file not found#include ^~~~~~~~~1 error generated.————————–解決方法:由於專案

PCL點雲處理視覺化——法向顯示錯誤no override found for vtk actor”解決方法

一、環境 Win10 X64 VS2015 PCL1.8.0AllinOne 二、程式碼 #include "stdafx.h" #include <pcl/point_types.h> #include <pcl/io/pcd_io.h> #inc

【我的Android進階之旅】解決編譯出現錯誤:Error: In DataSet 'main', no data file for changedFile.

一、問題描述 晚上在Android Studio上,切換分支之後,重新編譯執行的時候,報錯了,錯誤資訊如下所示: 錯誤資訊文字: FAILURE: Build failed with an excep

使用WebSocket導致jUnit單元測試報No suitable default RequestUpgradeStrategy found錯誤解決方法 小記

廢話不多說直接貼圖 我們只需要在依賴中新增 <dependency> <groupId>org.apache.tomcat.embed</groupId> &

用eclipse啟動tomcat時報Could not publish server configuration for Tomcat v8.0 Server at localhost..錯誤

ecg avd metadata ber cli for hbm aac tlb Could not publish server configuration for Tomcat v8.0 Server at localhost. Context with path “

Maven出現錯誤No plugin found for prefix 'jetty' in the current

jetty jpress Maven出現錯誤No plugin found for prefix ‘jetty‘ in the current project and in the plugin groups的問題解決只需在maven的setting.xml文件上加入如下節點:<pluginGr

validators配置要點及No result defined for action報錯解決方案

result 文件 con 屬性 得到 驗證類型 name 命名 請求 在做JavaEE SSH項目時,接觸到validators驗證。 需要了解validators配置,或者遇到No result defined for action 這個錯誤時,可查閱本文得到有效解決

解決 There are no resources that can be added or removed from the server

nbsp source hat remove 沒有 部署項目 eclipse 中項 cli 網上下載了一個項目,在eclipse中部署時,加載項目到tomcat中項目名稱無法顯示,報出There are no resources that can be added or r

安裝mysql後連接出錯(錯誤:Access denied for user 'root'@'localhost' (using password: YES)")的解決辦法

access 設置 lec 提示 回車 eight png varchar oot   前幾天下載了mysql5.7正常安裝後,用navicat for mysql連接時提示“Access denied for user [email protec

"There is no tracking information for the current branch" 解決方法

col pan gin ranch eas code pre 解決方法 git 因為新創建的分支push到遠程倉庫後沒有與本地分支關聯,下面語句可以令遠程分支與本地分支關聯起來 git branch --set-upstream-to=origin/release_3

更新MySQL數據庫( java.sql.SQLException: No value specified for parameter 1) 異常 解決方法

lex eal on() cut list data ram ast 圖片 package com.swift; import java.io.File; import java.sql.Connection; import java.sql.PreparedState

MySQL check the manual that corresponds to your MySQL server version for the right syntax錯誤

bat sqli jdbc call wrap base defaults org dsta 今配置Mybatis框架測試的時候報了這個錯:以下是錯誤的信息:org.apache.ibatis.exceptions.PersistenceException: ### Err