I always receive ECONNREFUSED error

Hi there !

I have a backend app hosted in O2 Switch and my database on Render.
I used the external connection link provide by render. But I already reveived error like that :

{"name":"cosyworking-api","hostname":"loss.o2switch.net","pid":14733,"level":50,"err":{"message":"connect ECONNREFUSED","name":"Error","stack":"Error: connect ECONNREFUSED\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16)","code":"ECONNREFUSED"},"msg":"connect ECONNREFUSED","time":"2022-10-28T09:45:05.271Z","v":0}

If someone have an idea to solve this problem :frowning:

Hi there,

Thanks for reaching out.

A few things to check/try:

  • Do the “Access Control” settings covers the IP of the connecting machine?

  • Does the “psql Command” work to connect to the database from your machine locally ? (again, you’d need to have Access Control allowing your machine’s public IP)

  • Double-check the connection settings/credentials.

Kind regards


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