Mongodb 問題匯總

來源:互聯網
上載者:User


環境:centos 6.0   mongodb2.4.13


1.集合分區後無法刪除:

mongos> db.table.drop()Tue Apr 21 18:40:30.943 drop failed: {        "code" : 14022,        "ok" : 0,        "errmsg" : "exception: Error locking distributed lock for chunk drop. :: caused by :: 13651 error checking clock skew of cluster 192.168.100.201:21000,192.168.100.202:21000,192.168.100.204:21000 :: caused by :: 13650 clock skew of the cluster 192.168.100.201:21000,192.168.100.202:21000,192.168.100.204:21000 is too far out of bounds to allow distributed locking."} at src/mongo/shell/collection.js:383
原因:各主機時間不統一,修改統一ok。
與網路時間同步:cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime  //修改時區yum install -y ntpdatentpdate us.pool.ntp.org //同步時間mongos> db.table.drop()truemongos>

2.mongos 叢集無法啟動

./mongos  --configdb 192.168.100.201:21000,192.168.100.202:21000,192.168.100.204:21000  --port 20000   --logpath  /data/mongodbtest/mongos/log/mongos.log --forkabout to fork child process, waiting until server is ready for connections.forked process: 4394ERROR: child process failed, exited with error number 1

查看日誌如下:

error upgrading config database to v6 :: caused by :: DistributedClockSkewed clock skew of the cluster 192.168.100.201:21000,192.168.100.202:21000,192.168.100.204:21000 is too far out of bounds to allow distributed locking.
原因:主機之間時鐘有相差,約幾百毫秒吧。重新同步ok。參照問題1。

./mongos  --configdb 192.168.100.201:21000,192.168.100.202:21000,192.168.100.204:21000  --port 20000   --logpath  /data/mongodbtest/mongos/log/mongos.log --forkabout to fork child process, waiting until server is ready for connections.forked process: 5200child process started successfully, parent exiting




相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.