Unable to connect to MongoDB Atlas. Error in IP whitelisting

I’m trying to my MondoDB Atlas server. I’m a beginner to Node.js and MongoDB. While connecting, I get this error:-

UnhandledPromiseRejectionWarning: MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you’re trying to access the database from an IP that isn’t whitelisted. Make sure your current IP address is on your Atlas cluster’s IP whitelist:

I’ve tried whitelisting my IP as well as whitelisting every IP ( but then also it’s giving same error. Please help me on this

Try to choose : - allow from anywhere .

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.