Exception: Connection Failed

Hi!
I’m getting this error whenever I enter the password for connecting Atlas Cluster.

Here is the error I’m getting:

connecting to: mongodb://127.0.0.1:27017/mongosh?gssapiServiceName=mongodb
2021-09-12T18:02:41.531+0000 E QUERY [js] Error: couldn’t connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:328:13
@(connect):1:6
exception: connect failed

Please help me to resolve it.

The Error connecting to 127.0.0.1:27017 indicates that you are not

When you enter the mongo command you are supposed to specify the URI of your cluster.

Post a screenshot that shows how you try to connect.

Hi @Sumiti_Agarwal,

Welcome to the MongoDB Community Forums,

Kindly let us know if you were able to resolve your issue or not! As @steevej mentioned kindly share the snapshot of the IDE with the inputted command. It will help us to understand and provide you a resolution.

Regards,
Kushagra Kesav

Here, is the screenshot of the error. please help me to resolve it.

Hi @Sumiti_Agarwal, can you please provide the connection string that you have used?

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer