Forum Discussion

gdev701's avatar
gdev701
Regular Visitor
1 year ago
Solved

Fabric On-Prem Gateway PostgreSQL Connector – Error Despite Correct Npgsql Version

Hi everyone,

I'm facing an issue while trying to connect my Azure VM–hosted PostgreSQL (Ubuntu 22.04) to Microsoft Fabric using the on-premises data gateway (installed on a separate Windows 11 Azure VM).

Here’s what I’ve done so far:

  • Installed the on-premises gateway and verified it's running.

  • Checked If Npgsql.dll version 4.0.17.0 present in the path: "G:\On-premises data gateway\FabricIntegrationRuntime\5.0\Gateway\sxs\PostgreSqlV2\1.0.0.0\Microsoft.Connectors.PostgreSqlV2\"

Despite all of this, I still get the following error while creating the connection in Fabric:

Any insights or help would be greatly appreciated!

Thanks in advance,
Gurudev

  • Hi gdev701,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Thank you NandanHegde for the prompt response.

     

    Thank you for the response and confirming the network connectivity and successful connection using pgAdmin. Based on the error message and the setup this is most likely related to a DLL binding issue with the Npgsql connector in the gateway. Please follow below steps:

    • Confirm that the Npgsql.dll version is 4.0.17.0, go to properties, details and confirm that the file version is 4.0.17.0. If not download the correct version from the official Npgsql GitHub releases and replace it in the correct directory.
      https://github.com/npgsql/npgsql/releases/tag/v4.0.17
    • Check for any other versions are present in the connector path, if any delete or move them temporarily to avoid binding conflicts.
    • After confirming the correct version and cleaning up, restart the On-premises data gateway service.
    • After that please try reconnecting in the fabric.

     

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

     

    Thanks and regards,

    Anjan Kumar Chippa

7 Replies

  • Login within the server hosting the gateway and check whether you are able to access the database from within that server and confirm back. Post that we can debug the next steps

    • gdev701's avatar
      gdev701
      Regular Visitor

      I logged into the Windows VM where the On-Premises Data Gateway is installed. From there, I was able to connect to the PostgreSQL server using pgAdmin with the server's IP address and successfully accessed the databases.

      Additionally, I confirmed that port 5432 is reachable using Test-NetConnection.

      This confirms that the gateway host VM has proper network connectivity to the PostgreSQL server and the credentials are valid.

      Could you please guide me on the next steps to troubleshoot the Fabric connector error?

      • v-achippa's avatar
        v-achippa
        Icon for Community Support rankCommunity Support

        Hi gdev701,

         

        Thank you for reaching out to Microsoft Fabric Community.

         

        Thank you NandanHegde for the prompt response.

         

        Thank you for the response and confirming the network connectivity and successful connection using pgAdmin. Based on the error message and the setup this is most likely related to a DLL binding issue with the Npgsql connector in the gateway. Please follow below steps:

        • Confirm that the Npgsql.dll version is 4.0.17.0, go to properties, details and confirm that the file version is 4.0.17.0. If not download the correct version from the official Npgsql GitHub releases and replace it in the correct directory.
          https://github.com/npgsql/npgsql/releases/tag/v4.0.17
        • Check for any other versions are present in the connector path, if any delete or move them temporarily to avoid binding conflicts.
        • After confirming the correct version and cleaning up, restart the On-premises data gateway service.
        • After that please try reconnecting in the fabric.

         

         

        If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

         

        Thanks and regards,

        Anjan Kumar Chippa

  • Hi,

    You can try resolving this by downloading Npgsql v4.0.10 from the official GitHub release page:

    Download the .msi installer from that page and install it. Then try reconnecting via the on-premises data gateway.

    ref: Release Npgsql v4.0.10 · npgsql/npgsql · GitHub

    🛠️ Note: Npgsql 4.0.10 fixes some minor issues and is recommended for compatibility with Microsoft Fabric's PostgreSQL connector.

    If you encounter an error like frontend.iu***, try the following steps:

    1. Uninstall both the On-Premises Data Gateway and Npgsql.
    2. Reinstall them in the correct order:
    3. First, install Npgsql v4.0.10.

    Then reinstall the gateway.

    Restart the gateway service and try connecting again.

    Thanks and Regards,
    Shreya