Azure PostgreSQL flexi sever local pgAdmin connection timeout

181 Views Asked by At

I'm currently integrating our database with the Azure PostgreSQL Flexi server in the cloud. I've successfully set up the server on the Azure platform, but I'm encountering connectivity issues when attempting to establish a connection using my local pgAdmin or PowerShell.

Unfortunately, I've been consistently experiencing request timeouts. Even when trying to connect via PowerShell using the command .\psql.exe -h app-domain-name-non-prod-server.postgres.database.azure.com -p 5432 -U dummyUser, I'm faced with the following error:

psql: error: connection to server at "app-domain-name-non-prod-server.postgres.database.azure.com" (1.0.0.5), port 5432 failed: Connection timed out (0x0000274C/10060) Is the server running on that host and accepting TCP/IP connections?

I also tried to ping the domain and I am getting 100% loss in the ping results

I have added a lot of IP addresses which I get from my PC when I type 'ipconfig` in the Firewall settings under Networking of my Postgres server but still, I am encountering connectivity issues see below snapshot

click to view image.

I have limited knowledge about firewall configurations, but as far as I understand, I need to include my PC's IP address. The challenge arises when I see numerous IP addresses listed after typing ipconfig, causing confusion about which one to select. Additionally, since I'm working on my company's PC, I'm uncertain whether I need to adjust my PC settings to permit outbound connections. If that's the case, could you provide guidance on where I can make these adjustments?

1

There are 1 best solutions below

0
On

Add the client IP address to the firewall rule as shown below:

enter image description here

Afterward, try connecting to the PostgreSQL server from pgAdmin by providing the required details and clicking on save while registering the server, as shown below:

enter image description here

This will successfully connect to pgAdmin, as shown below:

enter image description here

For more information, you can refer to this MS document.