couldn’t connect to new shard mongos connectionpool
Posted September 14, 2012on:
I was trying to add a new shard in the mongos, but came across this error repeatedly. From google, it says mongos (before a certain version, 2.2.11?) refuse to take in the new information if your first try missed a port. The solution? Google says quit and restart mongos. But in my case, I think you have to change some configuration of the current replica set to make mongos think it needs to reconsider the information it receives and compare with existing information it knows — it is not enough only restart and give it the correct information, you have to change the replica set/shard somehow too. In fact, in my case, that didn’t exactly work immediately either. But after a while, twenty minutes at least, I restarted mongos without doing anything different from the previous run but successfully added the shard/replica set.
Moral of the story: when you add a shard/replica set, do it right the first time, to save yourself all these frustrations. Here is the post where I figured out what I should do. It also has lots of commands you can learn from, definitely not a newbie.