Getting error: MongoServerSelectionError: connection <monitor> to 54.71.237.255:27017 closed

Expected behavior: Pull data from my database “test” on MongoDB w. docker

Actual behavior:

I keep getting the error even when I changed to all access.

Failure Logs

Note: I tried changing IP to all access. Still not working. Also extra info: I pulled the host credentials from. Connect, Connect using MongoDB Compass:(not sure if this was the right place to get the host. name)

Context

*I’m new to mongodb.

  • Package Version: ??

  • Express Version:

  • Sequelize Version:

  • Database Dialect:

  • Database Version: Mongodb 5/Atlas

  • Project Name: PP Data

  • I installed Docker Desktop —> Terminal/docker(everything worked untill I added:

Hello @Tula

Thanks for your feedback and welcome in the community!

Can you please take the time to fully complete the template for reporting your issue? Your post still contain some placeholder text and strange empty section, in addition to that you did not provide the technical details at the end.

Thanks

1 Like

Does the above edit help? Also please keep in mine that I’m new to mongodb. There’s a fix for the error: Change network access to all but it’s not working for me. In case you wanted to replicate the error, I left in the pass/user.

mongodb://test:test123@cluster0-shard-00-00.fucqg.mongodb.net:27017/test

Also the blank before “~ %” has my full name…

Thanks for the edits.

Can you try to paste all server names in the host field on Forest Admin, in order to generate the right connection string?

In the screenshot you shared, we can see that there are multiple host names corresponding to shards, but you only pasted one of them in the field. I don’t know if there is a validation here that will prevent you from doing that. If it’s not supported, you’ll have to modify the generated command before launching it, by editing the parameter --databaseConnectionURL and setting the complete connection string.

1 Like

Good point! Will try that and give update later. Thanks for your help! :slight_smile: