无法启动mongos [英] Unable to launch mongos

查看:553
本文介绍了无法启动mongos的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试进行简单的分片设置(在没有任何副本集的单个主机上).但是,我无法继续前进,因为这是我尝试启动mongos时发生的情况:

I am attempting a simple sharding set up (on a single host without any replica set). However I am unable to go any further because this is what happens when i try to start mongos:

C:\>mongos --configdb localhost:27010 --port 27011

我得到:

BadValue: configdb supports only replica set connection string  
try 'mongos --help' for more information   

我看不到缺少什么.我尝试了mongos --help,但是根据--configdb的有效参数是<config replset name>/<host1:port>, <host2:port>, etc.但这就是我所做的.

I am failing to see what is lacking. I tried mongos --help, but according to that valid arguments for --configdb are <config replset name>/<host1:port>, <host2:port>, etc. But this is what I've done.

除了启动配置服务器外,我没有做任何其他事情:

I have not done anything else than starting the config server:

mongod --configsvr --port 27010

这是我尝试将mongos连接到的那个.

which is the one I am trying to connect the mongos to.

关于如何解决此问题的任何想法?

Any ideas on how this can be resolved?

非常感谢您提前提出任何建议.

Thankful for any advice in advance.

推荐答案

您已将配置服务器设置为独立的mongod进程,但是从MongoDB 3.4开始,该服务器不支持:它必须成为副本集:

You have set up the config server as a standalone mongod process, but as of MongoDB 3.4 that isn't supported: it must be a replicaset:

配置服务器:配置服务器存储集群的元数据和配置设置.从MongoDB 3.4开始,配置服务器必须部署为副本集(CSRS).

最小设置是具有一个mongod进程,配置为

The minimum setup is to have a single mongod process, configured as a 1-member replica set; then your mongos process connects to the replica set:

mongos --configdb replsetname/localhost:27010 --port 27011

这篇关于无法启动mongos的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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