I have a three node cluster with a mongos query router.
When connecting to the mongos instance it get’s stuck on connecting.
Connecting directly to the mongod instance works.
Is there anyway to increase the logging of mongos?
The logs just say it’s received a client connection.
I don’t understand the topology of your cluster. Usually a “3 nodes cluster” is a replica set (RS) and a RS doesn’t need a mongos. Only a sharded cluster would need a few mongos to work properly. If you are running a sharded cluster with 3 shards and they are not replicated, it’s really not safe. If one of the node fails, you will lose a third of your DB, given that you chose a shard key that distribute the data evenly across the 3 single node RS shards.
If this is really what you are doing:
I hope it’s not a production environment.
Did you add correctly the 3 single nodes RS as shards? Can you see them in the sh.status() command?
Sorry I was a bit unclear. It’s really a 8 node cluster. 3 replicated config nodes, 3 replicated shard nodes and two query routers.
I followed this guide while setting up the cluster with a few modifications of my own:
The only difference is that I have three shard nodes and it’s not open for Internet acess.
Thank you for the link to the verbosity settings. I will see if I can get some more info from the query router, seems like there is nothing wrong with the config replica set or the shard replica set. Since both replica sets have a working primary.
The command line you use to start the mongos and mongod and their respective configurations?
The command line you use when you try to connect to the mongos? The one that is failing.
If I understand correctly, you were never able to connect to the mongos and thus finish the setup by adding the 3 replica sets in the configuration. Correct?
Well it’s very strange I was running this setup without issues for over 6 months and all of a sudden I was unable to connect through mongos.
These are the commands I use to connect to the mongos instance: