Cannot connect to Atlas cluster from shell

  1. 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
    Failed global initialization: BadValue need to either provide sslCAFile or specify sslAllowInvalidCertificates

  2. Tried adding -sslAllowInvalidCerticates but did not work could not see databases with use got this at cmd

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 --sslAllowInvalidCertificates

sername m001-student --password m001-mongodb-basics --sslAllowInvalidCertificates
MongoDB shell version: 3.0.15
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-04-10T23:41:13.584+0100 I - Assertion failure _setName.size() C:\data\mci\ff41b5b39346c2db8b26583c398ddd68\src\src\mongo/client/dbclientinterface.h 240
2019-04-10T23:41:13.733+0100 I CONTROL mongo.exe ???
2019-04-10T23:41:13.733+0100 I CONTROL mongo.exe ???
2019-04-10T23:41:13.734+0100 I CONTROL mongo.exe ???
2019-04-10T23:41:13.734+0100 I CONTROL mongo.exe ???
2019-04-10T23:41:13.734+0100 I CONTROL mongo.exe ???
2019-04-10T23:41:13.734+0100 I CONTROL mongo.exe ???
2019-04-10T23:41:13.734+0100 I CONTROL mongo.exe ???
2019-04-10T23:41:13.734+0100 I CONTROL mongo.exe ???
2019-04-10T23:41:13.734+0100 I CONTROL mongo.exe ???
2019-04-10T23:41:13.734+0100 I CONTROL ???
2019-04-10T23:41:13.734+0100 I CONTROL ???
2019-04-10T23:41:13.734+0100 I CONTROL ???
2019-04-10T23:41:13.734+0100 I CONTROL ???
2019-04-10T23:41:13.735+0100 I CONTROL ???
2019-04-10T23:41:13.735+0100 I CONTROL ???
2019-04-10T23:41:13.735+0100 I CONTROL ???
2019-04-10T23:41:13.735+0100 I CONTROL ???
2019-04-10T23:41:13.735+0100 I CONTROL ???
2019-04-10T23:41:13.736+0100 I CONTROL ???
2019-04-10T23:41:13.736+0100 I CONTROL ???
2019-04-10T23:41:13.736+0100 I CONTROL ???
2019-04-10T23:41:13.737+0100 I CONTROL ???
2019-04-10T23:41:13.738+0100 I CONTROL ???
2019-04-10T23:41:13.738+0100 I CONTROL ???
2019-04-10T23:41:13.738+0100 I CONTROL ???
2019-04-10T23:41:13.739+0100 I CONTROL ???
2019-04-10T23:41:13.739+0100 I CONTROL ???
2019-04-10T23:41:13.740+0100 I CONTROL ???
2019-04-10T23:41:13.740+0100 I CONTROL ???
2019-04-10T23:41:13.741+0100 I CONTROL ???
2019-04-10T23:41:13.742+0100 I CONTROL ???
2019-04-10T23:41:13.747+0100 I CONTROL ???
2019-04-10T23:41:13.747+0100 I CONTROL ???
2019-04-10T23:41:13.747+0100 I CONTROL ???
2019-04-10T23:41:13.747+0100 I CONTROL ???
2019-04-10T23:41:13.748+0100 I CONTROL ???
2019-04-10T23:41:13.748+0100 I CONTROL ???
2019-04-10T23:41:13.749+0100 I CONTROL ???
2019-04-10T23:41:13.749+0100 I CONTROL ???
2019-04-10T23:41:13.750+0100 I CONTROL ???
2019-04-10T23:41:13.750+0100 I CONTROL ???
2019-04-10T23:41:13.751+0100 I CONTROL ???
2019-04-10T23:41:13.751+0100 I CONTROL ???
2019-04-10T23:41:13.752+0100 I CONTROL ???
2019-04-10T23:41:13.753+0100 I CONTROL ???
2019-04-10T23:41:13.755+0100 I CONTROL ???
2019-04-10T23:41:13.756+0100 I CONTROL ???
2019-04-10T23:41:13.757+0100 I CONTROL ???
2019-04-10T23:41:13.758+0100 I CONTROL ???
2019-04-10T23:41:13.758+0100 I CONTROL ???
2019-04-10T23:41:13.759+0100 I CONTROL ???
2019-04-10T23:41:13.759+0100 I CONTROL ???
2019-04-10T23:41:13.760+0100 I CONTROL ???
2019-04-10T23:41:13.760+0100 I CONTROL ???
2019-04-10T23:41:13.760+0100 I CONTROL ???
2019-04-10T23:41:13.761+0100 I CONTROL ???
2019-04-10T23:41:13.761+0100 I CONTROL ???
2019-04-10T23:41:13.761+0100 I CONTROL ???
2019-04-10T23:41:13.762+0100 I CONTROL ???
2019-04-10T23:41:13.762+0100 I CONTROL ???
2019-04-10T23:41:13.765+0100 I CONTROL ???
2019-04-10T23:41:13.765+0100 I CONTROL
2019-04-10T23:41:13.768+0100 E QUERY Error: assertion C:\data\mci\ff41b5b39346c2db8b26583c398ddd68\src\src\mongo/client/dbclientinterface.h:240
at connect (src/mongo/shell/mongo.js:181:14)
at (connect):1:6 at src/mongo/shell/mongo.js:181
exception: connect failed

I am able to connect with and without (sslAllowInvalidCertificates)
Please check our forums.Many threads on this type of issues
May be firewall issues preventing your connection

1 Like