mongodb-mongos問題記錄

來源:互聯網
上載者:User

標籤:mongodb

mongodb 啟動mongos時報以下錯誤

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


這個錯誤是各個節點之間時間不同步,以下為設定時間同步方法

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime  #設定時區為北京時間,這裡為上海,因為centos裡面只有上海。。。    ntpdate us.pool.ntp.org  #時間同步

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

加入定時計劃任務,每隔10分鐘同步一下時鐘   

crontab -e    

把下面的內容粘貼進去儲存即可 

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


mongodb-mongos問題記錄

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.