Hello everyone,
I am unable to connect to my Aiven PostgreSQL DB using the connection string through my local machine’s terminal.
I added some IPs to the whitelist, before adding it was working fine and even after adding my local system’s IP it was able to access, recently I removed all the IPs so that I can access my DB from any network but it is not working now i.e. I an not able to access my DB through my local system’s terminal.
Hey Mohammed,
How are you trying to connect? Have you tried one of the options listed in the Quick Connect?
You can use the Aiven CLI. Here is the Aiven CLI setup guide
Hope that helps!
Yes I’ve tried the option of connecting via the psql connection string under the quick connect, in the terminal of my ubuntu machine but the connection times out and never connects
I’m curious if the issue you’re experiencing might be related to the local environment configuration rather than the database itself.
Could you try connecting through one of the other quick connect options to see if the connection goes through?
Feel free to share any error messages you’re seeing.
I tried to connect via DBeaver but still, the issue persists and the error says “Connection timed out”.
I knew it was something related to the “Allowed inbound IP addresses” setting, so I added my current public IP to it and I was able to connect to my DB via my Ubuntu terminal using the PostgreSQL connection string.
But the thing is that my application is hosted somewhere else and its request will be coming from another dynamic IPs so how am I supposed to add each of the IPs to the “Allowed inbound IP addresses”, every time my app hits a request to the DB? When I remove all the IPs from the “Allowed inbound IP addresses” setting, I cannot connect to my DB via the terminal.
Please help me resolve this issue.
Hi! I believe you deleted all the IP ranges allowed therefore your PG is not reacheable at all. If you check the Service settings you might see “Not accessible via public internet”. If that’s the case, can you add the `0.0.0.0/0’ address back that should provide the ability to any IP to ping the database and test you can connect. Once that is fixed, remember to secure the connection only to the range of IPs that should be allowed to talk to the DB
Thank you very much guys! Finally I got the resolution to my problem as mentioned by @ftisiot I can access my DB now via any network