Can't able to connect the VM installed postgresql from ADF

Aravind 20 Reputation points
2024-05-14T06:10:02.6633333+00:00

Hi Team,

We are unable to access the PostgreSQL from the ADF linked server. it's a azure PostgreSQL flexible server, and we have enabled the "Allow public services" setting within Azure for this server. However, we are still unable to create a linked server. Please find the snapshot below for the VM firewall properties and ADF-linked server error encountered while trying to test the connection.

Error: 08P01: login rejected Check the network connectivity setting of your Azure Postgre SQL flexible server, if Private Access(VNet integration) is selected, please use SHIR to connect.

08P01: login rejected

Please help us to connect the PostgreSQL from ADF

WhatsApp Image 2024-05-14 at 11.19.37_b3ddf0f0

Thanks & Regards

Aravind

Azure SQL Database
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,399 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,290 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,484 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,776 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sina Salam 4,296 Reputation points
    2024-05-14T11:31:24.7933333+00:00

    Hello Aravind,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    Problem

    Sequel to your questions, I understand that you are having difficulty to connect the VM installed PostgreSQL from ADF.

    Scenario

    Common scenario based on error code.

    Solution

    This prescribed solution was based on the scenario given and your questions, while focusing on the problem statement. Since you have verified that the "Allow public services" setting is enabled for the PostgreSQL server and has provided a snapshot of the VM firewall properties.

    Error Message:

    1. The encountered error (08P01) indicates login rejection during connection attempts.
    2. The error message suggests using Self-Hosted Integration Runtime (SHIR) if Private Access (VNet integration) is selected.

    Notice the number 2, have you? If yes.

    • So therefore, double-check the credentials used in the ADF linked server configuration to ensure they are correct and properly configured.
    • You can use tools like ping or telnet to verify connectivity between the ADF environment and the PostgreSQL server's endpoint.
    • Check the firewall rules on your PostgreSQL server to ensure that ADF's IP address or range is allowed to connect. Even if "Allow public services" is enabled, specific IP-based firewall rules might still be necessary.

    Finally

    Update connection settings in ADF to enable SSL encryption if necessary.

    References

    Read more from the additional resources available by the right side of this page. Especially,

    Accept Answer

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.

    Best Regards,

    Sina Salam


  2. ShaikMaheer-MSFT 38,206 Reputation points Microsoft Employee
    2024-05-20T10:52:45.1733333+00:00

    Hi Aravind,

    It seems there is something called pg_hba.conf specific to postgresql. In which, you might need to add IP details to allow access.
    Kindly try and see if that helps.