Mongodb node: Error creating connection

I’m trying to create a connection to a Mongodb database, but I always get the error: connect ECONNREFUSED 127.0.0.1:27017, the strange thing is that in the connection string I’m not informing the host 127.0.0.1, but no matter how I inform it, I always get the same error, as if I always tried in the local host, this also happens when using the “Values” option.

String: mongodb://test:[email protected]:27017/?authSource=admin&readPreference=primary&appname=n8n&ssl=false

N8N Version 0.228.1

Hi @joaopedrofernandes, welcome to the community!

I am sorry for the trouble. Can you check if the MongoDB connection is working in the regular node (outside of the credentials screen)? I wonder if this might be just a problem with the logic of the quick credentials check.

I just tested it, and the problem is not only with validation, the conventional use of node is also always trying the local host, ignoring the informed host.

Thanks for confirming @joaopedrofernandes. I gave this a go on my own end and was not able to reproduce this on [email protected].

Can you try deleting your current set of MongoDB credentials, create a new set from scratch and confirm if the issue still persists?

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