Unable to connect mongo shell & closed the compess

Team,

I am getting following error message since today which is strange. I am able to see the successful connection of cluster

C:\Users\shara\M001\loadMovieDetailsDataset>mongo “mongodb+srv://cluster0-1ddjc.mongodb.net/test” --username mymongodb -password
MongoDB shell version v4.0.5
connecting to: mongodb://cluster0-shard-00-00-1ddjc.mongodb.net.:27017,cluster0-shard-00-02-1ddjc.mongodb.net.:27017,cluster0-shard-00-01-1ddjc.mongodb.net.:27017/test?authSource=admin&gssapiServiceName=mongodb&replicaSet=Cluster0-shard-0&ssl=true
2019-02-08T22:55:54.931-0700 I NETWORK [js] Starting new replica set monitor for Cluster0-shard-0/cluster0-shard-00-00-1ddjc.mongodb.net.:27017,cluster0-shard-00-02-1ddjc.mongodb.net.:27017,cluster0-shard-00-01-1ddjc.mongodb.net.:27017
2019-02-08T22:55:55.717-0700 W NETWORK [js] Unable to reach primary for set Cluster0-shard-0
2019-02-08T22:55:55.717-0700 I NETWORK [js] Cannot reach any nodes for set Cluster0-shard-0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2019-02-08T22:55:57.089-0700 W NETWORK [js] Unable to reach primary for set Cluster0-shard-0

You can ignore those messages as long as you are able to connect to cluster

vagrant@m103:/shared$ 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
MongoDB shell version v3.6.9
connecting to: 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

2019-02-09T09:16:23.901+0000 I NETWORK [thread1] Successfully connected to cluster0-shard-00-00-jxeqq.mongodb.net:27017 (1 connections now open to cluster0-shard-00-00-jxeqq.mongodb.net:27017 with a 5 second timeout)
Implicit session: session { “id” : UUID(“54e51b0c-503b-41e4-ae0e-be7e8a4ff021”) }
MongoDB server version: 3.6.10
MongoDB Enterprise Cluster0-shard-0:PRIMARY> db
test

But they didn’t connect :slight_smile: the messages say there were no active nodes found. :slight_smile:

@Sharavanan_06433 it looks like you are connecting to your personal cluster, correct? Did you copy the connection string straight from the Atkas UI?

Thank you very much for your support and help…

It worked after reboot and update my security settings.

1 Like