无法升级分片的mongoDB或停止平衡器 [英] Cannot upgrade sharded mongoDB or stop the balancer

查看:75
本文介绍了无法升级分片的mongoDB或停止平衡器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

mongos开头没有运行.尝试启动mongos时,我看到以下日志:

mongos is not running in the beginning. When tried to start the mongos I see the following log:

3月22日星期五17:43:13.383 [mongosMain]错误:升级配置时出错 数据库到v4 ::由:: mongo config的较新版本4引起 元数据是必需的,当前版本是3,需要使用以下命令运行mongos -升级

Fri Mar 22 17:43:13.383 [mongosMain] ERROR: error upgrading config database to v4 :: caused by :: newer version 4 of mongo config metadata is required, current version is 3, need to run mongos with --upgrade

但是使用--upgrade参数,我看到以下日志:

But with --upgrade parameter, I see the following log:

3月22日星期五17:43:39.273 [mongosMain]错误:升级配置时出错 由::平衡器引起的数据库到v4 ::必须停止进行配置 升级

Fri Mar 22 17:43:39.273 [mongosMain] ERROR: error upgrading config database to v4 :: caused by :: balancer must be stopped for config upgrade

现在的问题是:我无法通过sh.stopBalancer()停止平衡器,因为我无法启动mongos.现在对我来说是一个僵局.请帮忙.

Now the problem is: I cannot stop the balancer by sh.stopBalancer() because I cannot start mongos. It's a deadlock to me now. Please help.

推荐答案

我找到了问题所在.我应该为configsrv连接到端口27019.这样,我不需要启动mongos.相反,可以仅在mongo解释器中执行sh.stopBalancer().

I found the the problem. I should connect to port 27019 for a configsrv. In this way I don't need to start mongos. Instead the sh.stopBalancer() could be executed simply in mongo interpreter.

这篇关于无法升级分片的mongoDB或停止平衡器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆