-- 在创建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磁盘空间满

解决方案:增加磁盘空间