Recently, I came across a problem with mongodb replica set where I was not able to connect to replicaSet using the replicaSet url. Probably many of you have already overcome this problem. But for some reason, I could not find a solution that exactly worked for me. In the process, I managed to find a solution that worked for me. Documenting here if it helps anyone else. I was using docker to setup the cluster. The steps to setup a…