zoukankan      html  css  js  c++  java
  • MongoDB 学习 error以及解决方法

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

    解决方案:增加磁盘空间

  • 相关阅读:
    Bootstrap JS插件使用实例(2)-模态对话框
    Java常用正则表达式验证工具类RegexUtils.java
    程序员不是砌砖工人,他们是作家【转】
    js中继承的几种用法总结(apply,call,prototype)
    javascript中apply()方法解析-简单易懂!
    javascript方法 call()和apply()的用法
    高性能优化Web前端
    Javascript类继承-机制-代码Demo【原创】
    初识WEB:输入URL之后的故事【转】
    博客园添加网站统计访问量-操作简单很实用哦!
  • 原文地址:https://www.cnblogs.com/ylqmf/p/2719560.html
Copyright © 2011-2022 走看看