我配置了mongo共享群集,但是当我输入sh.isBalancerRunning()
时,当我通过false
检查状态时,它还会给出sh.status()
回答。
balancer:
Currently enabled: yes
Currently running: no
Balancer lock taken at Wed Sep 13 2017 05:37:35 GMT+0000 (UTC) by ConfigServer:Balancer
Balancer active window is set between 23:00 and 18:00 server local time
Failed balancer rounds in last 5 attempts: 5
Last reported error: could not find host matching read preference { mode: "primary" } for set rs1
Time of Reported error: Tue Sep 12 2017 14:33:10 GMT+0000 (UTC)
Migration Results for the last 24 hours:
如何启动平衡器?
答案 0 :(得分:0)
您需要先检查连接性。
验证从Mongo的服务器到“ rs1”主mongod实例的连接。我相信应该可以。
第二,在没有Balancer活动窗口计划的情况下重试。我猜想MongoDB Balancer第二天要读18:00不太聪明。
您可以更改它:
use config
db.settings.update({_id: "balancer"}, {$unset: {activeWindow: {start: "23:00", stop:"18:00"}}})