Not able to connect to Atlas cluster given

Upon trying to connect to Atlas cluster given, I am getting below error. Tried using both mongosh and compass but no luck.

connection to closed

Please suggest how can we make it success.

I am using the below command to connect
mongodb://,," --authenticationDatabase admin --ssl -u m121 -p aggregations --norc

@Sandeep_Gupta would you be able to help here pls.

Hi @siva_kumar6, and welcome to the MongoDB Community forums! :wave:

I have no problems connecting using that connection string:

Are you connecting from a machine that might have its traffic going through a firewall (some wore networks block certain network traffic)?

Can you show a screenshot showing the full issue?

Hi @Doug_Duncan , thanks for the response.
connection is not having any firewalls, since I am just using my home wifi connection to connect my pc.

Can you go at with your web browser on the same machine you are trying to connect?

Hi @steevej , yes able to connect to the portquiz url, PFA SS

You should be good to go.

Try with the SRV connection string:

1 Like

It worked, able to connect now. Thanks @steevej .

Could you pls let us know what is the magic worked here.

The only thing I suspect is that the list of hosts in the replica set have changed and that the old style connection string was referring to an host that is not part of the replica set anymore.

But I have no certainty. The SRV connection string is a better way to connect anyway.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.