Can't connect to manage database from my digital ocean droplet

September 21, 2019 811 views
DigitalOcean

I sipin off a digital ocean centOS droplet , configured and everything seems fine after going thorugh tutorials. I then purchased a managed digital ocean postgres db. It looks quite easy and so far so good. I manage to connect my DB with pgAdmin 4 from my PC, i even confirmed that my connection string is working from my nodejs app. I was able to connect and create y tables from my nodejs.

The problem is, my database refuse connection from within the droplet. I can test my manage database from local host and my PC, but the database and my droplet doesn’t communicate at all. My connection is always throwing timeout. I spent the whole day trying to figure out the problem, i even install pgsql on my droplet, tried the connections flags and couldn’t connect. I am confused and really wasn’t expecting the connect to be an issue here considering both my droplet and my manage DB comes from digital ocean. I couldn’t deploy because of this. Please what am i missing or doing wrong ? I confirmed by droplet has no firewall instance yet couldn’t communicate with the DB. Please any help would be appreciated, am really getting frustrated .

1 Answer

Setting up the same thing so I can try it, on the second page of “Securing your new database cluster” did you fill in the “Add trusted sources” part when you set yours up? If you added your home PC IP address, it will block all other connection attempts.

Continuing with the setup to see if there are any other similar configs.

Another thing for you to check is to make sure you dont have a firewall interfering. Be back soon with any updates.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!