佳木斯湛栽影视文化发展公司

主頁(yè) > 知識(shí)庫(kù) > 完美解決ntp的錯(cuò)誤問(wèn)題no server suitable for synchronization fo

完美解決ntp的錯(cuò)誤問(wèn)題no server suitable for synchronization fo

熱門(mén)標(biāo)簽:百度競(jìng)價(jià)排名 網(wǎng)站排名優(yōu)化 呼叫中心市場(chǎng)需求 Linux服務(wù)器 鐵路電話系統(tǒng) 地方門(mén)戶網(wǎng)站 AI電銷(xiāo) 服務(wù)外包

當(dāng)用ntpdate -d 來(lái)查詢時(shí)會(huì)發(fā)現(xiàn)導(dǎo)致 no server suitable for synchronization found 的錯(cuò)誤的信息有以下2個(gè): 

錯(cuò)誤1.Server dropped: Strata too high

在ntp客戶端運(yùn)行ntpdate serverIP,出現(xiàn)no server suitable for synchronization found的錯(cuò)誤。

在ntp客戶端用ntpdate –d serverIP查看,發(fā)現(xiàn)有“Server dropped: strata too high”的錯(cuò)誤,并且顯示“stratum 16”。而正常情況下stratum這個(gè)值得范圍是“0~15”。

這是因?yàn)镹TP server還沒(méi)有和其自身或者它的server同步上。

以下的定義是讓NTP Server和其自身保持同步,如果在/ntp.conf中定義的server都不可用時(shí),將使用local時(shí)間作為ntp服務(wù)提供給ntp客戶端。

server 127.127.1.0fudge

127.127.1.0 stratum 8 

 

在ntp server上重新啟動(dòng)ntp服務(wù)后,ntp server自身或者與其server的同步的需要一個(gè)時(shí)間段,這個(gè)過(guò)程可能是5分鐘,在這個(gè)時(shí)間之內(nèi)在客戶端運(yùn)行ntpdate命令時(shí)會(huì)產(chǎn)生no server suitable for synchronization found的錯(cuò)誤。

那么如何知道何時(shí)ntp server完成了和自身同步的過(guò)程呢?

在ntp server上使用命令:

 

# watch ntpq -p


出現(xiàn)畫(huà)面:

 

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的這個(gè)就是與自身同步的ntp server。

注意reach這個(gè)值,在啟動(dòng)ntp server服務(wù)后,這個(gè)值就從0開(kāi)始不斷增加,當(dāng)增加到17的時(shí)候,從0到17是5次的變更,每一次是poll的值的秒數(shù),是64秒*5=320秒的時(shí)間。

如果之后從ntp客戶端同步ntp server還失敗的話,用ntpdate –d來(lái)查詢?cè)敿?xì)錯(cuò)誤信息,再做判斷。


錯(cuò)誤2.Server dropped: no data
從客戶端執(zhí)行netdate –d時(shí)有錯(cuò)誤信息如下:

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

出現(xiàn)這個(gè)問(wèn)題的原因可能有2:

 

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

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

# ntpq -c version

下面是來(lái)自ntp官方網(wǎng)站的說(shuō)明:

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的防火墻??赡苁莝erver的防火墻屏蔽了upd 123端口。

可以用命令

#service iptables stop

來(lái)關(guān)掉iptables服務(wù)后再嘗試從ntp客戶端的同步,如果成功,證明是防火墻的問(wèn)題,需要更改iptables的設(shè)置。

以上這篇完美解決ntp的錯(cuò)誤問(wèn)題no server suitable for synchronization fo就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

標(biāo)簽:崇左 湖南 蘭州 黃山 銅川 湘潭 衡水 仙桃

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《完美解決ntp的錯(cuò)誤問(wèn)題no server suitable for synchronization fo》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    米泉市| 宜都市| 伊金霍洛旗| 尼木县| 虹口区| 山阴县| 屏南县| 无极县| 南通市| 新宁县| 达孜县| 肥西县| 山东省| 珠海市| 萨嘎县| 鹿邑县| 灵丘县| 五大连池市| 永平县| 合肥市| 化州市| 邵东县| 桃园市| 彭阳县| 潍坊市| 舒兰市| 鄂托克前旗| 兴业县| 温宿县| 武乡县| 新津县| 湘西| 育儿| 祥云县| 阿拉善盟| 远安县| 壶关县| 莫力| 平武县| 莎车县| 罗定市|