Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
mongodb平衡器由于模糊错误而不移动块_Mongodb - Fatal编程技术网

mongodb平衡器由于模糊错误而不移动块

mongodb平衡器由于模糊错误而不移动块,mongodb,Mongodb,在仔细了解了如何将3个成员的副本集迁移到包含2 X 3个成员副本集的分片后,在对我的一个集合进行分片后,什么也没有发生。查看日志,我发现: 2014-06-22T16:49:55.467+0000 [Balancer] distributed lock 'balancer/vt-mongo-6:27018:1403429707:1804289383' unlocked. 2014-06-22T16:50:01.830+0000 [Balancer] distributed lock 'balan

在仔细了解了如何将3个成员的副本集迁移到包含2 X 3个成员副本集的分片后,在对我的一个集合进行分片后,什么也没有发生。查看日志,我发现:

2014-06-22T16:49:55.467+0000 [Balancer] distributed lock 'balancer/vt-mongo-6:27018:1403429707:1804289383' unlocked.
2014-06-22T16:50:01.830+0000 [Balancer] distributed lock 'balancer/vt-mongo-6:27018:1403429707:1804289383' acquired, ts : 53a70939025c137381ef2126
2014-06-22T16:50:01.945+0000 [Balancer]  ns: database.emailevents going to move { _id: "database.emailevents-_id_MinKey", lastmod: Timestamp 1000|0, lastmodEpoch: ObjectId('53a6d810089f342ad32992d4'), ns: "database.emailevents", min: { _id: MinKey }, max: { _id: -9199836772564449863 }, shard: "replicaset2" } from: replicaset2 to: replicaset4 tag []
2014-06-22T16:50:01.945+0000 [Balancer] moving chunk ns: database.emailevents moving ( ns: database.emailevents, shard: replicaset2:replicaset2/vt-mongo-4:27017,vt-mongo-5:27017,vt-mongo-6:27017, lastmod: 1|0||000000000000000000000000, min: { _id: MinKey }, max: { _id: -9199836772564449863 }) replicaset2:database_replicaset2/vt-mongo-4:27017,vt-mongo-5:27017,vt-mongo-6:27017 -> replicaset4:replicaset4/vt-mongo-1:27017,vt-mongo-2:27017,vt-mongo-3:27017
2014-06-22T16:50:01.954+0000 [Balancer] moveChunk result: { errmsg: "exception: no primary shard configured for db: config", code: 8041, ok: 0.0 }
2014-06-22T16:50:01.955+0000 [Balancer] balancer move failed: { errmsg: "exception: no primary shard configured for db: config", code: 8041, ok: 0.0 } from: replicaset2 to: replicaset4 chunk:  min: { _id: MinKey } max: { _id: -9199836772564449863 }
2014-06-22T16:50:02.166+0000 [Balancer] distributed lock 'balancer/vt-mongo-6:27018:1403429707:1804289383' unlocked.
通常,此错误:

result: { errmsg: "exception: no primary shard configured for db: config", code: 8041, ok: 0.0 }

这是因为机器之间无法相互通信,但事实并非如此。我已经手动检查过了,所有的机器都可以相互对话。

您可能应该在dba.stackexchange.com上尝试。您应该列出副本集中rs.status()的输出,mongos中sh.status()的输出,以及启动mongos时使用的选项。这可以是任意数量的内容,但我的第一个怀疑是配置服务器的问题(它们应该是配置数据库的“主要碎片”)。真是巧合。顺便说一句,我也有同样的问题。找到解决方法了吗?在我发布后,我放弃了。您正在使用mongo 3.0系列吗?