I am trying to use the MongoClient GUI app to connect to a MongoDB replica set. This is the structure of my URL but it is not working:
mongodb://username:password@host-01:27017,host-02:27017,host-03:27017/mydb?authSource=mydb&replicaSet=rs0&ssl=true&sslValidate=false
I get an error similar to this:
Couldn't connect: server host-03:27017 received an error {"name":"MongoError","message":"read ECONNRESET"}
This was on a Mac. host-01, host-02 and host-03 were pointing to the wrong ip addresses in /etc/hosts
The servers were responding to ping requests, but the wrong servers were responding. So make sure your servers are pointing to actual MongoDB nodes.