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 :

D 18.196.138.205:5432","time":"2022-10-28T09:34:48.055Z","v":0}
{"name":"cosyworking-api","hostname":"loss.o2switch.net","pid":14733,"level":50,"err":{"message":"connect ECONNREFUSED 3.65.142.85:5432","name":"Error","stack":"Error: connect ECONNREFUSED 3.65.142.85:5432\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16)","code":"ECONNREFUSED"},"msg":"connect ECONNREFUSED 3.65.142.85:5432","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

Alan

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