I am setting up a replica set of three members in mongodb. All three members of replica set are running mongod instances Active: active (running)
But when i try to check the connectivity using
mongo --host 172.x.x.x --port 27017
by following the instructions given on https://docs.mongodb.com/manual/tutorial/troubleshoot-replica-sets/#replica-set-troubleshooting-check-connection i get,
MongoDB shell version v3.4.4
connecting to: mongodb://172.x.x.x:27017/
2017-05-18T10:11:01.466-0500 W NETWORK [thread1] Failed to connect to 172.x.x.x:27017, in(checking socket for error after poll), reason: Connection refused
2017-05-18T10:11:01.467-0500 E QUERY [thread1] Error: couldn't connect to server 172.x.x.x:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed
Due to this i am unable to perform rs.add(), i always get the error on server did not responded
Please help!!