Mongodb碎片平衡器卡在状态0中

Mongodb碎片平衡器卡在状态0中,mongodb,sharding,Mongodb,Sharding,我已经用2个碎片在一个集合上进行了切分。 Mongodb版本是2.6.4。 看起来一切正常,但100%的数据都在一个碎片上 当我这样做时: use config db.locks.find( { _id : "balancer" } ).pretty() 我得到: { "_id" : "balancer", "state" : 0, "who" : "ip-10-0-11-128:27018:1424099612:1804289383:Balancer:84693088

我已经用2个碎片在一个集合上进行了切分。 Mongodb版本是2.6.4。 看起来一切正常,但100%的数据都在一个碎片上

当我这样做时:

use config
db.locks.find( { _id : "balancer" } ).pretty()
我得到:

{
    "_id" : "balancer",
    "state" : 0,
    "who" : "ip-10-0-11-128:27018:1424099612:1804289383:Balancer:846930886",
    "ts" : ObjectId("553a1223e4d292075ec2a8a6"),
    "process" : "ip-10-0-11-128:27018:1424099612:1804289383",
    "when" : ISODate("2015-04-24T09:51:31.498Z"),
    "why" : "doing balance round"
}
因此,平衡器卡在状态0中。我已尝试重新启动它,但它仍处于状态0

此外:

但是:

我的日志文件中的错误:

    2015-04-24T10:15:47.921+0000 [Balancer] scoped connection to 10.0.11.128:20000,10.0.11.159:20000,10.0.11.240:20000 not being returned to the pool
2015-04-24T10:15:47.921+0000 [Balancer] caught exception while doing balance: error checking clock skew of cluster 10.0.11.128:20000,10.0.11.159:20000,10.0.11.240:20000 :: caused by :: 13650 clock skew of the cluster 10.0.11.128:20000,10.0.11.159:20000,10.0.11.240:20000 is too far out of bounds to allow distributed locking.
有人知道怎么解决这个问题吗? 谢谢,
伊万

快速查看代码,我们似乎可以容忍大约30个 群集中服务器之间的秒倾斜。在linux上,我们 建议人们使用ntp将倾斜保持在最小(ntp通常保持 它需要在一两秒钟内完成)。ntp通常已经安装在 大多数linux发行版

使用以下命令执行一次性ntp synx

ntpdate pool.ntp.org

看起来我的服务器在时间上不同步。其中一台碎片服务器延迟10分钟,这可能就是它失败的原因:/
    2015-04-24T10:15:47.921+0000 [Balancer] scoped connection to 10.0.11.128:20000,10.0.11.159:20000,10.0.11.240:20000 not being returned to the pool
2015-04-24T10:15:47.921+0000 [Balancer] caught exception while doing balance: error checking clock skew of cluster 10.0.11.128:20000,10.0.11.159:20000,10.0.11.240:20000 :: caused by :: 13650 clock skew of the cluster 10.0.11.128:20000,10.0.11.159:20000,10.0.11.240:20000 is too far out of bounds to allow distributed locking.
ntpdate pool.ntp.org