溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

mongodb-mongos問題記錄

發(fā)布時間:2020-07-20 06:09:10 來源:網(wǎng)絡(luò) 閱讀:659 作者:蓋世英雄iii 欄目:MongoDB數(shù)據(jù)庫

mongodb 啟動mongos時報(bào)以下錯誤

Error initializing sharding system: DistributedClockSkewed: clock skew of the cluster ambari01:20000,ambari02:20000,ambari03:20000 is too far out of bounds to allow distributed locking


這個錯誤是各個節(jié)點(diǎn)之間時間不同步,以下為設(shè)置時間同步方法

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime  #設(shè)置時區(qū)為北京時間,這里為上海,因?yàn)閏entos里面只有上海。。。    ntpdate us.pool.ntp.org  #時間同步

沒有安裝ntpdate的可以yum一下    yum install -y ntpdate   

加入定時計(jì)劃任務(wù),每隔10分鐘同步一下時鐘   

crontab -e    

把下面的內(nèi)容粘貼進(jìn)去保存即可 

0-59/10 * * * * /usr/sbin/ntpdate us.pool.ntp.org | logger -t NTP


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI