Connecting to Our Class Atlas Cluster Issue

i dont think you have to worry about this to much. it is happening because your mongoDB shell version is probably 4.0.3 and the databases that we are connecting to have servers that are running mongoDB on a different version like 3.6.8. from what i can see it should be okay not to worry about this warning. A way to fix it is by installing a version of mongoDB that matches the one running on the server.

I had to reinstall and restart the system, it works fine now.

Hi alice_ching,

Not sure if you got your problem resolved or not.

  • You are using version 3.2.1 ? Please upgrade to latest one i.e 4.0.3
  • You have to start mongod first and then mongo command will work, for testing purpose you can always use mongo --nodb

Let me know more about the problem so that I can help better!

Kanika

Hi Jeran,

This is just a warning. Explanation is here.

Kanika

i am getting connection failed error

1 Like

Which cluster are you trying to connect to @rehan_59764? To your private cluster on Atlas, or the shared student cluster?

I have the same problem.

mongo “mongodb+srv://cluster0-uvhmm.mongodb.net/test” --username m001-student
MongoDB shell version v4.0.3
Enter password:
connecting to: mongodb+srv://cluster0-uvhmm.mongodb.net/test
2018-11-13T09:26:19.903-0600 I NETWORK [js] Starting new replica set monitor for Cluster0-shard-0/cluster0-shard-00-00-uvhmm.mongodb.net.:27017,cluster0-shard-00-01-uvhmm.mongodb.net.:27017,cluster0-shard-00-02-uvhmm.mongodb.net.:27017
2018-11-13T09:26:20.472-0600 W NETWORK [js] Unable to reach primary for set Cluster0-shard-0

eng001:~ dspell$ ping -c 1 cluster0-uvhmm.mongodb.net
ping: cannot resolve cluster0-uvhmm.mongodb.net: Unknown host
eng001:~ dspell$ ping -c 1 mongodb.net
ping: cannot resolve mongodb.net: Unknown host

i am connecting to student shared cluster.

sorry its my fault , i am connecting to student shared cluster but i was copying the connection string of my private cluster.

its my bad :smiley::smiley::smiley::smiley::smiley::smiley::smiley:

1 Like

Hi ddspell,

If you are trying to connect to our shared student cluster and getting the error like “Request Timed Out”.
Then check this link here. It will give you hint on how to test through ping or telnet etc.

If you are unable to ping your own cluster, then probably its because of “IP Whitelisting”. You need to whitelist your IP in your cluster. You can do this by Security -> IP Whitelist -> Click on “Add IP Address” -> Either 2 of the options: “Add current IP Address” or “Allow access from Anywhere”

Kanika

Thanks, I had made a mistake on my IP whitelist.
I had stupidly entered 0.0.0.0/32 instead of 0.0.0.0/0.
All good now.

2 Likes

Glad you got it working!

1 Like

I tried my best to decipher your statement.

1 Like

I’m doing this course behind a firewall, can not ping cluster0-shard-00-00-jxeqq.mongodb.net and such. I have mongoDB installed locally, just wondering if I can do this coure without connecting to outside, or do I have ? thanks

Hi ian_59438,

If you cannot ping our Atlas cluster, I would recommend you to download the Atlas data and import it into your local database.

Then you will be able to complete this course.

Here is the post containing details on how to import the data.

Let me know if you have any queries.

Kanika

1 Like

I am also getting below error when try to connect to my new created cluster

FYI: I am using window 7 and I have insatlled this version mongodb-win32-x86_64-2008plus-ssl-4.0.5-signed

2019-01-19T17:21:38.798+0530 E QUERY [js] Error: can’t authenticate against r

eplica set node cluster0-shard-00-01-jxeqq.mongodb.net:27017 :: caused by :: can

't connect to new replica set master [cluster0-shard-00-01-jxeqq.mongodb.net:270

17], err: couldn’t connect to server cluster0-shard-00-01-jxeqq.mongodb.net:2701

7, connection attempt failed: SSLHandshakeFailed: QueryContextAttributes for con

nection info failed with-2146893055 :

connect@src/mongo/shell/mongo.js:328:13

@(connect):1:6

exception: connect failed

please can you help me ASAP so I can complete chapter 2 on time

I am getting below mentioned error when i am trying to connect using 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/100YWeatherSmall?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics

ERROR
2019-09-23T13:54:37.962+0530 Error: assertion src/mongo/client/dbclientinterface.h:231 at src/mongo/shell/mongo.js:148
exception: connect failed

Please help

Hi @vaibhsa,

Please use the connection string given below for connecting to our Atlas class cluster

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

If the issue still persists, please feel free to get back to us.

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Hello @Shubham_Ranjan,
i have used the below connection string which you provided ;

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

but still i am getting the error! as shown in below image.
MongoDB_error|690x341

Please help.

Hi @vaibhsa,

It seems that you are using a very old version (2.6.10) of mongo shell. I would recommend you to upgrade it to the newer version.

Please refer this post for the installation of mongo shell on your linux system.

Thanks,
Shubham Ranjan
Curriculum Support Engineer