Not able to connect Sandbox cluster

Hey! I’m trying to connect to sandbox cluster but I’m facing the following issue:

C:\Users\Rachel>mongo “mongodb+srv://sandbox.xxxxx.mongodb.net/test” --username m001-student
DNSHostNotFound: Failed to look up service “”:This operation returned because the timeout period expired.
try ‘mongo --help’ for more information

C:\Users\Rachel>mongo “mongodb+srv://sandbox.xxxxx.mongodb.net/test” --username m001-student --password m001-mongodb-basics
DNSHostNotFound: Failed to look up service “”:This operation returned because the timeout period expired.
try ‘mongo --help’ for more information

Please help me with this :slight_smile:

2 Likes

Just getting the same issue.
all was working fine then the error.
trying to reconnect but not working.
Got any help on this?
Normand

The connect string you are trying is a sample one
You need to replace xxxx with the substring of your own cluster
xxxx is just a place holder

Yes, I have put xxxxx for security reasons. Otherwise I’m trying with the original string given to me.

if you are certain that the cluster name is fine, then most likely your internet or vpn provider uses a old DNS server. try 8.8.8.8 from google.

Hi @Rachel_Shirin,

In addition to @steevej-1495, you could also try to connect using standard connection string by going to Atlas and selecting the MongoDB version to be 3.4 or earlier .

~ Shubham

Try instead this : mongo “mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/test?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics

@Rachel_Shirin see lecture notes in course M001 https://university.mongodb.com/mercury/M001/2020_August_18/chapter/Chapter_0_Setup/lesson/595aae2236942e83e9a361b9/lecture .
“If in case you are unable to connect using the srv connection string then please use the standard connection string as not all DNS providers or routing systems support the SRV protocol.”

1 Like

Hey I got exactly the same issue too

Hi @Medhanie_Gebru,

Please take a look at this thread.

Let me know if you are still facing any issues.

~ Shubham

Hi Ramachandra would you please tell me where can I find the substring XXXXX of my own cluster?

Yes Khalid the link you share gives me “MongoDB Enterprise Cluster0-shard-0:PRIMARY>”. But I am looking for "MongoDB Enterprise Sandbox-shard-0:PRIMARY> "

Please follow the instructions mentioned in this lecture - Chapter 2: Connecting to Your Sandbox Cluster from the mongo Shell for getting the connection string of your sandbox cluster .

This is just the prompt. It reflects the name of your replica set. If your cluster name is different the prompt will be different.

I’m having the same problem.

Can someone help me, please?!

I’m using both database name and cluster name for replacing the (xxxxxx) in the string, but the time runs out and I can’t get through.

Is there any other alternative?!

Thanks everyone in advance.

Post a screenshot that shows how you try to connect that also shows the issue you are having.

Hi @Marcelo_Rayel,

This :point_down:

At the top, the string.

I needed to use the password in the same string, because I’m not allowed to type the password right after I enter the primary screen (the cursor gets stuck.)

Have you whitelisted your IP address or all IPs?

Are you sure that the m001-student user has been created with the given password?