user15195363
user15195363

Reputation:

Timeout expired: Connecting Azure Postgres using local pdAmin

I am using psql on Azure. While I am successfully able to connect it on CLI and using Python psycopg2 or other modules and library, I am facing issue connecting it to the pgadmin Web UI.

The process to connect to the Azure POSTGRES in pgadmin is as follows:

  1. Click on Add New Server.
  2. Provide Name under General tab.
  3. Provide Host, Port, DB Name, Username, Password.

After clicking on Save, it always pops connection timeout error.

While with the above config I can connect to it in the python, create cursor and commit a query. Do we require additional settings to be done for connecting it to the pgadmin. I am new to cloud and not sure if there is some additional security checks like token access to be provided or something.

Upvotes: 1

Views: 8700

Answers (3)

Irtaza Waris
Irtaza Waris

Reputation: 149

Under settings. Click on Networking. you will find a link like '+ Add current client IP address ( 119.160.103.152 ) + Add 0.0.0.0 - 255.255.255.255' click on it and use 0.0.0.0 to allow all public ip addresses. Now try to connect. enter image description here

Above answer is correct but look at he above link now option for public ip is under Network option. Connected success fully after doing this.

Upvotes: 2

Shrey
Shrey

Reputation: 63

  1. Allow your IP address in Azure postgresDB Networking section. You can configure your VNET or firewall rules as needed.
  2. Check if your organization allows your IP to be visible to Azure. In my case, I was able to connect only when I was not connected to organization VPN. "Some network environments may not report the actual public-facing IP address needed to access your server. Contact your network administrator if adding your IP address does not allow access to your server."

Upvotes: 0

Stanley Gong
Stanley Gong

Reputation: 12153

Please have a check that have you enabled your local public IP address in Postgres DB Firewall rules? enter image description here After I created the new DB and added my local public IP to Firewall rules, I can connect to DB by local pgAdmin successfully:

enter image description here Configs: enter image description here enter image description here

Upvotes: 4

Related Questions