Hello everyone,
I’m new to n8n and im trying to build a workflow within a sql query to an external postgres database.
When i try to create credentials with correct informations, i get an error “Connection refused” and i don’t understand why.
My n8n version is a self hosted docker container and database server is on the same local network. any help would be appreciated
I think the first thing to check is that firewall is open on the postgres server to allow the connection, If that is all good it might be worth making sure your docker network is able to talk to other things a quick option for that might be to set it to bridge to see if that changes anything.
@Jon ,
there is no firewall and the connection is already set on bridge. When i do docker exec -it n8n sh then i ping my psql server there is a response
A ping is not really a good test for this as it doesn’t test the same protocol or port so all you really learn icmp traffic is allowed.
Does the postgres log show any attempt to access it? Connection refused is pretty standard so we know the connection is being refused on the other side we just need to work out why.