Question

Error: connect ETIMEDOUT 10.108.0.2:XXXXX

Posted September 22, 2021 65 views
Node.jsDigitalOceanDeploymentDigitalOcean Managed PostgreSQL Database

Getting this error Error: connect ETIMEDOUT 10.108.0.2:25060 I have deployed the nodejs app and connecting it to postgresql cloud database and getting this error.

Here is my setup using connection string: postgresql://XXXXXX:XXXXXXX@db-postgresql-nyc3-23855-do-user-9690131-0.b.db.ondigitalocean.com:25060/XXXXXX?sslmode=require

XXXXX are the credentials and I have checked these are correct. not sure what’s going on and further I am using pg.js package for postgresql

Thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hello,

I could suggest a few things here:

  • Make sure that you have added your Droplet to the Managed Database Access control list. That way you will make sure that the Droplet has network access to the Managed Database:

https://docs.digitalocean.com/products/databases/mysql/how-to/secure/

  • If you have a firewall enabled on your Droplet, make sure that port 25060 is open for outgoing TCP connections.

Let me know how it goes!
Regards,
Bobby