Connect ECONNREFUSED

This appears to be common and I have visited many of the topics for this and none of them have helped. I am trying to connect to postgres database container from retool to set as a resource. I have even set the hostname parameter during run start of the postgres container and confirmed when I inspect it. Retool still refuses to connect to the host. I can connect to the database just fine from pgadmin app. Why can't I connect with retool. I even bridged the ports 5432:5432 with the host. I confirmed credentials. What am I missing? I even tried the IP indicated within the container for the host. Any recommendations?

I just figured it out. I'm still learning as I go with this docker stuff but the retool documentation should indicate this. Basically I had installed a separate postgres container for my data outside of retool and that postgres container needed to be on the same network as Retool. I simply did the following:

  • Inspected the networks for my docker to see what they are with docker network ls
  • Inspected the retool api container - docker inspect to see what network it's on
  • Added the retool-onpremise-master_frontend-network to my postgres container
  • Inspected my postgres container to confirm the network was added
  • Retested connection from the form on the Retool resource page and it was successful

This post can be closed.

1 Like