Error : “Could not connect to any servers in your MongoDB Atlas cluster”

后端 未结 8 1745
长发绾君心
长发绾君心 2021-02-08 22:41

My node app gives me this message \"Could not connect to any servers in your MongoDB Atlas cluster. Make sure your current IP address is on your Atlas cluster\'s IP whitelist\"

相关标签:
8条回答
  • 2021-02-08 23:25

    Not sure if it is the right reason. But, its working for me when i disconnect the VPN.

    When connected to VPN, I'm getting below error message.

    Error: "Could not connect to any servers in your MongoDB Atlas cluster. Make sure your current IP address is on your Atlas cluster's IP whitelist".

    0 讨论(0)
  • 2021-02-08 23:37

    Try keeping these questions in mind when you face such an issue with your mongodB that:

    Did I changed my IP address before I started working with my mongodb again after a long break? If no, then please change it because usually mongodb removes it after every 6 hours.

    Did I moved from the place where I worked last time? If yes, then please change your IP again and activate it.

    Please do visit the link https://studio3t.com/knowledge-base/articles/mongodb-atlas-login-ip-whitelisting/#whitelist-multiple-or-additional-ip-addresses and learn more about why you get such error and how deal with them. It helps a lot.

    0 讨论(0)
  • 2021-02-08 23:37

    Are you using proxy?? please try with different internet connection first.

    0 讨论(0)
  • 2021-02-08 23:40

    Try doing this:- MongoDB Atlas -> NetworkAccess -> Edit -> Allow Any

    This worked for me!

    0 讨论(0)
  • 2021-02-08 23:41

    To whitelist an IP address, go to your target cluster on MongoDB Atlas. Next, go to Network Access under the Security tab. On the IP Whitelist tab, click on Add IP address. Type your IP address manually under Whitelist Entry, then click Confirm. run your code it should run without any problem.

    0 讨论(0)
  • 2021-02-08 23:42

    It's not always problem with the ip. Can have problem in db name , username or password.Then also connection failed.

    0 讨论(0)
提交回复
热议问题