Unable to connect using Compass

Hi there,
I’ve downloaded Compass 1.16.3 (Stable) and followed the given configuration and passed the firewall test without an issue (http://portquiz.net:27017/) but still can’t connect and got the error : MongoDB not running on the provided host and port.
Hostname: cluster0-shard-00-00-jxeqq.mongodb.net
Port: 27017

Any clues please ?

Regards,
Atef

Failed for me too

Try this one

vagrant@m103:/dataset$ mongo “mongodb://cluster0-shard-00-00-excga.mongodb.net:27017,cluster0-shard-00-01-excga.mongodb.net:27017,cluster0-shard-00-02-excga.mongodb.net:27017/test?replicaSet=Cluster0-shard-0” --ssl --authenticationDatabase admin --username m001-student --password m001-mongodb-basics
MongoDB shell version v3.6.9
connecting to: mongodb://cluster0-shard-00-00-excga.mongodb.net:27017,cluster0-shard-00-01-excga.mongodb.net:27017,cluster0-shard-00-02-excga.mongodb.net:27017/test?replicaSet=Cluster0-shard-0
2019-01-30T06:24:17.414+0000 I NETWORK [thread1] Starting new replica set monitor for Cluster0-shard-0/cluster0-shard-00-00-excga.mongodb.net:27017,cluster0-shard-00-01-excga.mongodb.net:27017,cluster0-shard-00-02-excga.mongodb.net:27017
2019-01-30T06:24:17.908+0000 I NETWORK [ReplicaSetMonitor-TaskExecutor-0] Successfully connected to cluster0-shard-00-00-excga.mongodb.net:27017 (1 connections now open to cluster0-shard-00-00-excga.mongodb.net:27017 with a 5 second timeout)
2019-01-30T06:24:18.165+0000 I NETWORK [thread1] Successfully connected to cluster0-shard-00-02-excga.mongodb.net:27017 (1 connections now open to cluster0-shard-00-02-excga.mongodb.net:27017 with a 5 second timeout)
Implicit session: session { “id” : UUID(“7807968c-b9fe-4d4d-9431-5237270f168d”) }
2019-01-30T06:24:18.415+0000 I NETWORK [ReplicaSetMonitor-TaskExecutor-0] Successfully connected to cluster0-shard-00-01-excga.mongodb.net:27017 (1 connections now open to cluster0-shard-00-01-excga.mongodb.net:27017 with a 5 second timeout)
MongoDB server version: 4.0.5
WARNING: shell and server versions do not match
Error while trying to show server startup warnings: user is not allowed to do action [getLog] on [admin.]
MongoDB Enterprise Cluster0-shard-0:PRIMARY> db
test
MongoDB Enterprise Cluster0-shard-0:PRIMARY> show dbs
admin 0.000GB
local 2.860GB
video 0.002GB
MongoDB Enterprise Cluster0-shard-0:PRIMARY>

Can you please specify the working hostname/Port/Replica set name in the above command ?
Sorry still not working for me.
Thanks.

Please try running this command from the terminal / command line:

 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/video?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics

If you are able to connect from the above command, then view this post if it help you: About the Chapter 1: Compass Connection [Solution]

Kanika

1 Like

Hi Kanika,
Just wondering how I can run the mongo command from my Windows machine.
It is not recognised as a valid command.
Thanks & Regards,
Atef

Your connection did NOT fail @Ramachandra_37567. You clearly show that you can query the database.

The Mongo shell is not part of the Compass installation. You will need to install MongoDB itself for that.

On Linux the shell is a separate package, so you won’t have to install the full MongoDB. But for Windows I don’t believe there’s a separate installer for just the shell.

Agree
What i meant was the earlier attempt with the command given by Atef_97460 had failed
The one i pasted is a successful connection with one change
So i was suggesting Atef_97460 to use this one
Please note i have changed jxeqq to excga in my command

1 Like

I’m sorry, I totally misread your post. Thanks for helping out!