Mogos stuck and not started

this my mongos.conf file:
sharding:
configDB: m103-csrs/192.168.103.100:26001
security:
keyFile: /var/mongodb/pki/m103-keyfile
net:
bindIp: localhost,192.168.103.100
port: 28000
systemLog:
destination: file
path: /var/mongodb/db/mongos.log
logAppend: true
processManagement:
fork: true

I ran my all csrs file and run command mongos -f mongos.conf it’s stuck as below

vagrant@m103:~/shard_conf$ mongos -f mongos.conf
2019-11-29T04:24:34.541+0000 W SHARDING [main] Running a sharded cluster with fewer than 3 config servers should only be done for testing purposes and is not recommended for production.
about to fork child process, waiting until server is ready for connections.
forked process: 2881.

how to start the mongos?

Are your 3 config servers up and running?
Looks like your mongos is already up and waiting
Did you check mongos.log
Please check your mongo processes ps -ef|grep mongo
Also is your mongos port correct?
If you are doing some test that’s fine but if you are doing a lab please follow the instructions strictly else your validation will fail

Hi @Milind_19368,

You are seeing this error message because you have just provided the reference of one config server node in the mongos.conf file.

If you will add the reference of the other two nodes then the warning message will go away.

configDB: m103-csrs/192.168.103.100:26001,192.168.103.100:26002,192.168.103.100:26003

One more thing, if you are doing it for the lab then please make sure you are running the mongos on the port 26000.

Hope it helps!

If you have any other query then please feel free to get back to us.

Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer