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
I get:
BadValue: configdb supports only replica set connection string
try 'mongos --help' for more information
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
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.
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:
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