Search code examples
azureazure-data-factoryazure-postgresql

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


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?


Solution

  • 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