Not able to connect to class cluster

Hello,

I am trying to connect to class cluster with the below command
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/aggregations?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl -u m121 -p aggregations --norc

It is giving the error below
image

In addition I tried testing using portquiz, it displays SITE CANNOT BE REACHED

I was able to connect while doing M001: MongoDB Basics course.
Please help me.

Thanks and regards,

I also have some strange connection issues here and there. What worked for me was to close the shell and try again. Maybe even restart.

Hi,

It looks like a transitory problem, it might be a connection issue. As @kobiebisschoff suggested, please try again and let us know if you are able to reach the Atlas instance.

José Carlos

Hello,

It is working in home network, looks like some restrictions in office.

Thank you for the suggestions provided.

Thx

You are welcome!

José Carlos

Hi, I was able to connect but after db.movies.findOne() I get:
"errmsg" : "not authorized on movies to execute command { find: \"movies\", filter: {}, $clusterTime: { clusterTime: Timestamp(1535513975, 1), signature: { hash: BinData(0, A10BD925C40797D7CAA204DDAA3C08587E484CDE), keyId: 6559514413705986049 } }, $db: \"movies\" }"
Is this an error on my end?

I can’t show collections either:
"errmsg" : "not authorized on movies to execute command { listCollections: 1.0, filter: {}, $clusterTime: { clusterTime: Timestamp(1535514127, 131), signature: { hash: BinData(0, 0B6890E0D69AEB48839FC93467F86EA769BE006D), keyId: 6559514413705986049 } }, $db: \"movies\" }",
Any solution? @jcarlosgarcia

It’s working now. Go into aggregations and then use the collection.

Glad you got it! Indeed you are connected to the aggregations database if you use the connection string provided in the first week. All the collections needed for this course should be there.

José Carlos

i have issue connecting to atlas
this is my error message
Microsoft Windows [Version 10.0.17134.706]
© 2018 Microsoft Corporation. All rights reserved.

C:\Users\Sus>mongo “mongodb+srv://cluster0-jn24q.mongodb.net/test” --username m220student
MongoDB shell version v4.0.8
Enter password:
connecting to: mongodb://cluster0-shard-00-02-jn24q.mongodb.net.:27017,cluster0-shard-00-00-jn24q.mongodb.net.:27017,cluster0-shard-00-01-jn24q.mongodb.net.:27017/test?authSource=admin&gssapiServiceName=mongodb&replicaSet=Cluster0-shard-0&ssl=true
2019-04-12T11:02:56.864-0400 I NETWORK [js] Starting new replica set monitor for Cluster0-shard-0/cluster0-shard-00-02-jn24q.mongodb.net.:27017,cluster0-shard-00-00-jn24q.mongodb.net.:27017,cluster0-shard-00-01-jn24q.mongodb.net.:27017
2019-04-12T11:02:57.367-0400 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to cluster0-shard-00-02-jn24q.mongodb.net.:27017 (1 connections now open to cluster0-shard-00-02-jn24q.mongodb.net.:27017 with a 5 second timeout)
2019-04-12T11:02:57.368-0400 I NETWORK [js] Successfully connected to cluster0-shard-00-00-jn24q.mongodb.net.:27017 (1 connections now open to cluster0-shard-00-00-jn24q.mongodb.net.:27017 with a 5 second timeout)
2019-04-12T11:02:57.404-0400 I NETWORK [js] changing hosts to Cluster0-shard-0/cluster0-shard-00-00-jn24q.mongodb.net:27017,cluster0-shard-00-01-jn24q.mongodb.net:27017,cluster0-shard-00-02-jn24q.mongodb.net:27017 from Cluster0-shard-0/cluster0-shard-00-00-jn24q.mongodb.net.:27017,cluster0-shard-00-01-jn24q.mongodb.net.:27017,cluster0-shard-00-02-jn24q.mongodb.net.:27017
2019-04-12T11:02:57.578-0400 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to cluster0-shard-00-00-jn24q.mongodb.net:27017 (1 connections now open to cluster0-shard-00-00-jn24q.mongodb.net:27017 with a 5 second timeout)
2019-04-12T11:02:57.680-0400 I NETWORK [js] Successfully connected to cluster0-shard-00-01-jn24q.mongodb.net:27017 (1 connections now open to cluster0-shard-00-01-jn24q.mongodb.net:27017 with a 5 second timeout)
2019-04-12T11:02:57.785-0400 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to cluster0-shard-00-02-jn24q.mongodb.net:27017 (1 connections now open to cluster0-shard-00-02-jn24q.mongodb.net:27017 with a 5 second timeout)
2019-04-12T11:02:58.022-0400 I NETWORK [js] Marking host cluster0-shard-00-00-jn24q.mongodb.net:27017 as failed :: caused by :: Location40659: can’t connect to new replica set master [cluster0-shard-00-00-jn24q.mongodb.net:27017], err: Location8000: bad auth Authentication failed.
2019-04-12T11:02:58.327-0400 I NETWORK [js] Marking host cluster0-shard-00-02-jn24q.mongodb.net:27017 as failed :: caused by :: Location8000: can’t authenticate against replica set node cluster0-shard-00-02-jn24q.mongodb.net:27017 :: caused by :: bad auth Authentication failed.
2019-04-12T11:02:58.626-0400 I NETWORK [js] Marking host cluster0-shard-00-01-jn24q.mongodb.net:27017 as failed :: caused by :: Location8000: can’t authenticate against replica set node cluster0-shard-00-01-jn24q.mongodb.net:27017 :: caused by :: bad auth Authentication failed.
2019-04-12T11:02:58.914-0400 I NETWORK [js] Marking host cluster0-shard-00-00-jn24q.mongodb.net:27017 as failed :: caused by :: Location40659: can’t connect to new replica set master [cluster0-shard-00-00-jn24q.mongodb.net:27017], err: Location8000: bad auth Authentication failed.
2019-04-12T11:02:58.919-0400 E QUERY [js] Error: can’t authenticate against replica set node cluster0-shard-00-00-jn24q.mongodb.net:27017 :: caused by :: can’t connect to new replica set master [cluster0-shard-00-00-jn24q.mongodb.net:27017], err: Location8000: bad auth Authentication failed. :
connect@src/mongo/shell/mongo.js:343:13
@(connect):2:6
exception: connect failed

i keep trying since 3 days same issue
using wifi from home

after keeping trying this is the other error

Implicit session: session { “id” : UUID(“856363b2-0c29-4d4d-90a2-3a3fcd34a5d4”) }
MongoDB server version: 4.0.8
Error while trying to show server startup warnings: user is not allowed to do action [getLog] on [admin.]
MongoDB Enterprise Cluster0-shard-0:PRIMARY> mvn test -Dtest=Connection Test
2019-04-12T11:42:48.792-0400 E QUERY [js] SyntaxError: missing ; before statement @(shell):1:4
MongoDB Enterprise Cluster0-shard-0:PRIMARY> mvn spring-boot:run
2019-04-12T11:43:46.997-0400 E QUERY [js] SyntaxError: missing ; before statement @(shell):1:4
MongoDB Enterprise Cluster0-shard-0:PRIMARY>

You are already at mongo prompt
Please continue working
Ignore those messages
It is just a warning that you cannot query admin DB