Generated connection string not for cluster

When I use Atlas to generate a connection string for my Sandbox, it doesn’t include all three nodes. This is what I get:

mongo “mongodb+srv://” --username m001-student

What am I doing wrong here?

The cluster has three nodes:


I think I figured it out. Only older versions of the shell seems to need all node names specified so this is not an issue.

The main part is SRV. Notice that with srv it doesn’t require all nodes to be listed out and the hostname is shorter. There’s also an SRV button in Compass, tick and untick it to see how it behaves.

Hi @Magnus_58085,

I’m glad you got your answers :slight_smile:

In addition to @007_jb,

It’s correct that for MongoDB 3.4 or earlier version, the connection string contains the address of all the nodes in the replica set.

If you have any other query please feel free to get back to us.

Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer