skip to Main Content

I am trying to connect from Azure data factory to a Postgres Flexible server. I sticked to the official Microsoft documentation to achieve it: https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-connect-to-data-factory-private-endpoint

I had a identical setup with a postgres single server which worked, however, using the flexible server leaves me with a connection timeout when testing the connection from adf side using the "Test connection" button on the "linked services" menu.

We checked for firewall rules and nsg settings, nothing is blocking the traffic. The only difference in setup is the postgres server itself, all other settings are identical.
Also, we can connect to the database successfully from other resources in azure as well as from local machines.

How can I connect a postgres flexible server to the adf?

2

Answers


  1. Chosen as BEST ANSWER

    According to Microsoft support, there is a bug in the underlying postgres flexible server container which prevents the postgres from refreshing it's internal network interface when new private endpoints are added.

    According to support, a stop and start of the server fixes the problem (NOT a restart). I did not test it on my own, they fixed it for us.

    They plan to fix the issue in August, there might be an entry for the issue in the official release notes:

    https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/release-notes#release-july-2024


  2. Unable to connect from Azure data factory to postgres flexible server using private endpoint

    The issue can cause because of several reasons like firewall issue, network issue between Postgres SQL and ADF instance or the azure Postgres SQL have timeout setting.

    To resolve this first check the firewall you are correctly allowing all services to connect the Azure Postgres flexible server and add the timeout parameter in connection string using Additional connection properties add property name as Timeout and vale in the seconds as below:

    enter image description here

    Also check your managed private endpoint is in approved sate and your selected target server is correct:

    enter image description here

    Here is my successful connection with Postgres flexible server using managed endpoint.

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search