Can't connect to cluster from integrated development environment (Lab)

I’m following the lab instructions to connect to my sandbox cluster, but every attempt I make generates a “Failed to connect” error.


  • My connection command is mongo "mongodb+srv://" --username m001-student
  • My MongoDB shell version is v4.4.3
  • I’ve whitelisted my IP
  • I can successfully connect from my macbook using mongosh

Here’s the full error message

MongoDB shell version v4.4.3
Enter password: 
connecting to: mongodb://,,

*** You have failed to connect to a MongoDB Atlas cluster. Please ensure that your IP whitelist allows connections from your network.

Error: connect failed to replica set atlas-su1srg-shard-0/,, :
exception: connect failed
exiting with code 1

Appreciate any help


Hello @Ben_Gorman and welcome to the MongoDB community forums.

Have you tried setting the IP range of to test to see if the MongoDB University IDE can connect to your cluster? I know you added your IP address, but the web based IDE (I assume that’s what you’re having issues with) will be using a different IP address. You can set that to expire after a certain period by toggling the This entry is temporary and will be deleted in xxx slider. 6 hours is the smallest amount of time, but it allows you to not have to worry to remember to remove that entry later.

Give that a try and see if you can then continue on with your course using the IDE.

One thing to note is that you don’t have to use the IDE to complete the course. That is there for those who don’t want to install software on their local machines. If you’ve got mongosh or Compass installed locally already, you can use those tools. Doing this, there would be no need to allow any IP other than your local IP.


Derp, how did I miss this? Thank you!

you don’t have to use the IDE to complete the course.

That’s great.

1 Like