Getting ReplicasetNoPrimary error, while trying to connect to mongodb atlas

Viewed 12

This is my code for connecting to mongodb

This is my error:

My Ip is whitelisted in network access section of MongoDB Atlas.

I reconfigured my firewall too, so that it will allow the requests. [As given in 2nd solution https://stackoverflow.com/questions/60063820/getting-replicasetnoprimary-and-mongoserverselectionerror-error-while-connecting]

But, still I am getting the error.

Thanks in Advance.

0 Answers
Related