MongoDB 學習 — error以及解決方案

來源:互聯網
上載者:User

-- 在建立shardcollection的時候報錯

mongos> db.runCommand({shardcollection:'test.test',key:{_id:1}})

{

        "assertion" : "invalid parameter: expected an object ()",

        "assertionCode" : 10065,

        "errmsg" : "db assertion failure",

        "ok" : 0

-- 原因:啟動mongod的時候添加了replSet的選項導致找不到master

-- 解決:重新啟動mongod,將replSet選項取消

 

-------------------------------------------------------------------------------------------------------------------------------------

 

-- 由於伺服器時間不同步導致auto sharding失敗

Fri Jan  6 12:46:09 [Balancer] caught exception while doing balance: error checking clock skew of cluster 10.192.9.110:20000,10.192.

136.242:20000,10.192.9.90:20000 :: caused by :: 13650 clock skew of the cluster 10.192.9.110:20000,10.192.136.242:20000,10.192.9.90:

20000 is too far out of bounds to allow distributed locking.

 

Fri Jan  6 13:14:24 [conn2] warning:   - cmd: { splitChunk: "test1.test1", keyPattern: { _id: 1.0 }, min: { _id: Min

Key }, max: { _id: MaxKey }, from: "10.192.9.110:10000", splitKeys: [ { _id: 0.0 } ], shardId: "test1.test1-_id_MinKey", configdb: "

10.192.9.110:20000,10.192.136.242:20000,10.192.9.90:20000" } result: { errmsg: "Error locking distributed lock for split. :: caused

by :: 13651 error checking clock skew of cluster 10.192.9.110:20000,10.192.136.242:20000,10.192.9....", ok: 0.0 }

 

cp /usr/share/zoneinfo/GMT /etc/localtime

ntpdate 10.192.0.12 -- 時間伺服器

---------------------------------------------------------------------------------------------------------------------

 

-- config服務一直無緣無故停止

Mon Jan  9 07:04:56 [Balancer] moveChunk result: { cause: { assertion: "Can't take a write lock while out of disk space", assertionCode: 14031, errmsg: "db assertion failure", ok: 0.0 }, errmsg: "moveChunk failed to engage TO-shard in the data transfer: db assertion failure", ok: 0.0 }

Mon Jan  9 07:04:56 [Balancer] balancer move failed: { cause: { assertion: "Can't take a write lock while out of disk space", assertionCode: 14031, errmsg: "db assertion failure", ok: 0.0 }, errmsg: "moveChunk failed to engage TO-shard in the data transfer: db assertion failure", ok: 0.0 } from: s2 to: s1 chunk: { _id: "test.test-_id_16690.0", lastmod: Timestamp 3000|1, ns: "test.test", min: { _id: 16690.0 }, max: { _id: 50791.0 }, shard: "s2" }

問題原因:10.192.9.90磁碟空間滿

解決方案:增加磁碟空間

相關文章

聯繫我們

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