Unable to connect to mongo shell

I am getting below error connecting to mongo shell

2018-10-20T21:38:39.610-0700 E QUERY [js] Error: connect failed to replica set Cluster0-shard-0/cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017 :
connect@src/mongo/shell/mongo.js:257:13
@(connect):1:6
exception: connect failed

Me too. I use this command tin the terminal mongorestore --drop --gzip --uri "mongodb+srv://cluster0-5pf8u.mongodb.net/ etc " data also this
WARNING: shell and server versions do not match
Error while trying to show server startup warnings: user is not allowed to doaction [getLog] on [admin.]

I am also getting same error .
Though I was able to login by following ::
mongo “mongodb+srv://sandbox-8mcrk.mongodb.net/test” --ssl
–sslAllowInvalidCertificates --username m001-student

Still Mongodb documents states it as not safe option for poduction.

Please suggest if anyone able to resolve the same.

1 Like

Yeah, don’t do that. You’re allowing the shell to connect to a server that could be impersonating the actual server. Do not disable certificate verification unless you are absolutely certain that the server can be trusted (for example, because you built it yourself)