Deal all, I am trying to mount a sharded mongodb server. I configured a replica set, and a configure replicat set. Both replicate are composd from 3 servers

root     23792     1  0 14:43 ?        00:01:55 mongod --replSet rs01 --journal --port 27102 --shardsvr --dbpath /mongo/rs01i01/ --logpath /mongo/rs01i01/mongo_102.log --fork
root     23820     1  0 14:44 ?        00:01:56 mongod --replSet rs01 --journal --port 27103 --shardsvr --dbpath /mongo/rs01i02/ --logpath /mongo/rs01i02/mongo_103.log --fork
root     23852     1  0 14:45 ?        00:01:21 mongod --replSet rs01 --journal --port 27101 --shardsvr --dbpath /mongo/rs01iar/ --logpath /mongo/rs01iar/mongo_101.log --fork
root     25240     1  0 16:18 ?        00:01:37 mongod --replSet conf --journal --port 27201 --dbpath /mongo/config --logpath /mongo/config/mongo_201.log --fork
root     25269     1  0 16:19 ?        00:01:37 mongod --replSet conf --journal --port 27202 --dbpath /mongo/config2 --logpath /mongo/config2/mongo_202.log --fork
root     25297     1  0 16:19 ?        00:01:38 mongod --replSet conf --journal --port 27203 --dbpath /mongo/config3 --logpath /mongo/config3/mongo_203.log --fork

However, when I try in the last step, to start mongo, the process is lunched (3 times :O ) but is not listening on the corresponding port.

mongos --port 27301 --configdb conf/,, --logpath /mongo/mongos/mongos_27301.log --fork
about to fork child process, waiting until server is ready for connections.
forked process: 9803

but, mongo does not connect on that port

mongo --port 27301
MongoDB shell version v3.4.10
connecting to: mongodb://
2017-11-01T22:56:00.898+0000 W NETWORK  [thread1] Failed to connect to, in(checking socket for error after poll), reason: Connection refused
2017-11-01T22:56:00.899+0000 E QUERY    [thread1] Error: couldn't connect to server, connection attempt failed :
exception: connect failed

Please help

migrated from stackoverflow.com Nov 2 '17 at 5:44

This question came from our site for professional and enthusiast programmers.


Your config servers mongod should have --configsvr parameter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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