Connecting to Your Sandbox Cluster from Compass - cannot connect

error message when attempting to connect:
setName from ismaster does not match provided connection setName

hostname is copy/paste from Atlas
form completed as per video
password reset in Atlas and Compass

There is probably a mismatch with the name of your Replica Set. Please use the exact connection command copied from Atlas.

Click on Connect -> Connect From Mongo Shell -> Copy

If still not able to run, please share the command here.

Kanika

1 Like

where can i find replica set name for putting it
in the compass app??

I can connect via the cmd.

I cannot connect to the sandbox cluster from compass as per the lecture immediately preceding Lab2.1 How many comedies?

Atlas > cluster view > cluster name > ‘primary’ > hostname
is where I am getting my ‘hostname’

Hi

As posted in the discussion forum

I can connect via cmd, that command is:
mongo "mongodb+srv://cluster0-qrswe.mongodb.net/test --username m001-student

When trying to connect to Compass using the hostname connect, I get an error. As per the instructional video, I open Atlas and copy/paste the cluster information
atlas > clusters > cluster0 > primary > dashboard

Again to be clear, I am referencing the stage immediately prior to Lab 2.1

I would appreciate a timely resolution to this as I cannot proceed with the lesson until this is resolved.

Thanks
DRW

[note: the cmd command initially posted was incorrect. To succesfully connect, --password [password] must be appended to the string.]

Hi everyone,
Trying to connect on my sandbox using compass and getting this error:

“An error occurred while loading navigation: ‘not master and slaveOk=false’: It is recommended to change your read preference in the connection dialog to Primary Preferred or Secondary Preferred or provide a replica set name for a full topology connection.”

Already changed as the message suggests but nothing works.

I’m having the same problem. Guess the whole thing is down?

I am having the same problem. But, I was able to connect using compass by following these steps:

  • Login to your atlas account
  • In your cluster overview page, click on ‘connect’ button
  • In the pop dialog, select ‘connect with MongoDB compass’
  • In the next dialog window, select ‘I am using compass 1.2 or later’
  • Copy the connection uri string to clipboard
  • Start mongodb compass, the connect dialog will be automatically filled in with details to connect to your cluster (Except the password). Fill in the password and click on connect.

hope this helps

1 Like

Teresa, i solved it just clicking on my cluster and finding which one is the primary to stablish the connection.

steps :

click on your cluster name.

find which one is primary, and then copy the URI to your cluster, something like that (
cluster0-shard-00-00-ejfqt.mongodb.net

).

That way you are going to connect again.

Hope it works for you.

After three days of repeating the same steps (repeatedly), I was able to access the Compass via the cluster address.

For those stuck in the same situation wondering what the solution is, I don’t know what changed. Perhaps a system restart did it. My next steps were uninstall/reinstall apps, and after that, uninstalling/quitting.

I was having this problem:
“An error occurred while loading navigation: ‘not master and slaveOk=false’: It is recommended to change your read preference in the connection dialog to Primary Preferred or Secondary Preferred or provide a replica set name for a full topology connection.”

Meera_49067’s solution worked for me. :grinning:
Thank you!

1 Like

@Rosa_38486, glad that it was helpful:smile:

Thanks Meera, that worked for me too