Issue with connecting ADF to PostgreSQL

Igal Cohen | CMTrading 0 Reputation points
2024-04-24T06:20:25.3633333+00:00

Hey,

We are building our data factory on Azure and we are trying to connect a new dataset from PostgreSQL source.

We took the CRT files and generated a PFX file from it, we import it into azure key vault.

Then we went ahead and created the dataset, we insert the server, port, database name, user & password

User's image

Then we select the Azure Key Vault, selecting the secret name that we created with the certificate.

User's image

Once it's all configured I am clicking test connection and getting this error:
28000: no pg_hba.conf entry for host "40.74.27.93", user "dealio_rep", database "dealio", SSL off Check network connectivity setting of your Azure Postgre SQL flexible server, if Private Access(VNet integration) is selected, please use SHIR to connect.

28000: no pg_hba.conf entry for host "40.74.27.93", user "dealio_rep", database "dealio", SSL off

My question is, if it's something we missed while configuring things? or it's on the server the PostgreSQL is hosted on?

Thanks

Igal

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
Azure Database for PostgreSQL
{count} votes

2 answers

Sort by: Most helpful
  1. phemanth 15,755 Reputation points Microsoft External Staff Moderator
    2024-04-24T06:50:39.2133333+00:00

    @Igal Cohen | CMTrading

    Thanks for using MS Q&A platform and posting your query.

    The error message "28000: no pg_hba.conf entry for host ..., user ..., database ..., SSL off" indicates an issue with the access control configuration for your PostgreSQL database.

    1. Missing Configuration: The administrator of the PostgreSQL server might not have added an entry in the pg_hba.conf file to allow connections from your Azure Data Factory's IP address with the specified user and database.
    2. Network Restrictions: If you're using Azure Database for PostgreSQL with Private Access (VNet integration), the standard connection method might not work. In this case, you'll need to use Secure Sockets Layer with Hostname Resolution (SHIR) for connections.

    Here's how to troubleshoot the issue:

    • Check with the PostgreSQL Server Administrator: If you don't have access to the server yourself, you'll need to contact the administrator and inform them about the error message. They can check the pg_hba.conf file and add an appropriate entry to allow access from your Azure Data Factory.
    • Verify Network Connectivity: Make sure your Azure Data Factory can reach the PostgreSQL server. If you're using Azure Database for PostgreSQL with Private Access, refer to the Azure documentation for connecting using SHIR: https://learn.microsoft.com/en-us/azure/postgresql/
    • SSL/TLS Connection: If your PostgreSQL server requires TLS/SSL connections (which is on by default in Azure Database for PostgreSQL servers), you might need to ensure that your connection from Azure Data Factory is also using TLS/SSL
    • Firewall Settings: Check if the IP address 40.74.27.93 is allowed through any firewalls that might be in place. This could be on the network level or configured in the Azure settings.

    Hope this helps. Do let us know if you any further queries.

    1 person found this answer helpful.
    0 comments No comments

  2. Pranab Bijoypuri 80 Reputation points
    2025-04-09T17:20:27.68+00:00
    • I am also facing the similar issue. Here is my issue.

    Problem: I am using the PostgreSQL connector to connect to the on-premises PostgreSQL database. It was working fine and suddenly the connector giving us the problem(Message=Could not load type 'NpgsqlTypes.NpgsqlInterval' from assembly 'Npgsql, Version=4.0.9.2).

    Solution: In analysis I found that self-hosted integration run-time(IR) has been updated and problem started after that. I have restarted the self-hosted runtime from the server node.
    Now it is running perfectly fine.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.