I want to upgrade my small MongoDB-Cluster (1 mongos, 3 config-servers, 2 shards a 3 nodes) running on OpenSuSe 13.1 (64bit) from 2.6.7 to 3.0.5. But it fails at the second step of the upgrade guide: upgrade a mongos instance

What I'm done:

  • downloaded a legacy-linux-64bit-version of MongoDB 3.0.5
  • deactivated load balancer
  • tried to start mongos with

    mongos --configdb data/configdb --config config/router.conf --upgrade

This is the output of mongos:

2015-08-07T15:41:43.281+0200 W SHARDING running with 1 config server should be done only for testing purposes and is not recommended for production
2015-08-07T15:41:43.290+0200 I SHARDING [mongosMain] MongoS version 3.0.5 starting: pid=22726 port=27027 64-bit host=myhostname (--help for usage)
2015-08-07T15:41:43.290+0200 I CONTROL  [mongosMain] db version v3.0.5
2015-08-07T15:41:43.290+0200 I CONTROL  [mongosMain] git version: 8bc4ae20708dbb493cb09338d9e7be6698e4a3a3
2015-08-07T15:41:43.290+0200 I CONTROL  [mongosMain] build info: Linux build2.ny.cbi.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-08-07T15:41:43.290+0200 I CONTROL  [mongosMain] allocator: tcmalloc
2015-08-07T15:41:43.290+0200 I CONTROL  [mongosMain] options: { config: "conf/router.conf", net: { bindIp: "myhostname", port: 27027 }, security: { keyFile: "res/mongodb.key" }, sharding: { configDB: "data/configdb/" }, upgrade: true }
uncaught DBException in mongos main:
9 Empty host component parsing HostAndPort from ""

I'm using the same settings as the already running instance, so the network settings should be correct.

Anyone a clue what I'm doing wrong here? Why is there a warning about one config server only, while I'm using three? And what does the exception mean?


1 Answer 1


The error/exception is because you point to a local database with --configdb. That should be a serverip:port:

mongod --shardsvr --replSet ReplName --dbpath /data/mongodb (--port 27018) --logpath /data/log/log.log ...
mongod --configsvr --dbpath /data/cfg (--port 27019) --logpath /data/log/log.cfg
##mongos routers:
mongos --configdb cfg1IP:cfg1PORT,cfg2IP:cfg2PORT,cfg3IP:cfg3PORT (--port 27017) --logpath /data/log/log.mongos

Or you can use a configuration file.

But here you seem to mix the configuration for configservers with mongos-routers.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.