Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Dickbale
New Member

Difficulties setting up Postgres in OnPrem Data Gateway

Hello, 

I am currently facing an issue with connecting a postgres database via the OnPrem Data Gateway. 

The MSSQL Databases worked instantly but PostgresSQL constantly throws the error:

Unable to create connection for the following reason: Unable to connect to the data source. Either the data source is inaccessible, a connection timeout occurred, or the data source credentials are invalid. Please verify the data source configuration and contact a data source administrator to troubleshoot this issue.

I ruled out the following things:

  • Invalid Credetials -> I could connect to the DB using them
  • Internal Firewall issues -> Connection works from the server the gateway is installed on.Tested via telnet, dbbeaver and odbc user dsn
  • Driver issues -> PostgresSQL drivers updated to the latest version
  • Gateway outdated -> Updated Gateway to the latest version

Did anyone else encounter such an issue connecting a PostgresSQL DB?

Thanks, 

Alex

1 ACCEPTED SOLUTION

Hi @Dickbale

 

In this scenario i suggest you to raise a support ticket here. so, that they can assit you in addressing the issue you are facing. please follow below link on how to raise a support ticket:

How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn

 

 

Thanks,

Prashanth Are

View solution in original post

9 REPLIES 9
v-prasare
Community Support
Community Support

Hi,

We are following up once again regarding your query. Could you please confirm if the issue has been resolved through the support ticket with Microsoft?

If the issue has been resolved, we kindly request you to share the resolution or key insights here to help others in the community. If we don’t hear back, we’ll go ahead and close this thread.

Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.

 

Thank you for your understanding and participation.

burakkaragoz
Community Champion
Community Champion

Hi @Dickbale ,

Thanks for the detailed breakdown—sounds like you've already ruled out most of the common issues. Here are a few additional things you might want to check:

  1. Gateway Service Account Permissions
    Ensure that the On-Premises Data Gateway service account has the necessary permissions to access the PostgreSQL database. Sometimes, even if the connection works manually, the gateway service might be running under a different context.

  2. Connection Encryption Settings
    PostgreSQL may require or reject SSL connections depending on its configuration. Try toggling the "Require SSL" option in the gateway connection settings and see if that makes a difference.

  3. Connection String Format
    Double-check the format of the connection string in the gateway. Some versions of the gateway are sensitive to parameters like sslmode, timeout, or even the port number format.

  4. Regional Settings or Locale Issues
    Rarely, locale or regional settings on the gateway server can affect how credentials or connection strings are parsed—especially with special characters.

  5. Gateway Logs
    Check the gateway logs (located in C:\Program Files\On-premises data gateway\GatewayLogs) for more detailed error messages. They might reveal something not shown in the UI.

  6. Try Creating the Connection via Power BI Desktop
    As a test, try connecting to the same PostgreSQL DB using Power BI Desktop with the same credentials and settings. If it works there, it might help isolate whether the issue is with the gateway or the connection config.

Let us know if any of these help—or feel free to share the exact connection string format you're using (without credentials), and we can take a closer look.

 

v-prasare
Community Support
Community Support

Hi @Dickbale,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for your issue worked? or let us know if you need any further assistance here?

 

 

 

Thanks,

Prashanth Are

MS Fabric community support

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query

Hi sorry for the late reply, I was not able to access my work pc. 

No sadly this didn 't work, however after doing that and replacing the driver from the gateway with the one from PowerBI I get a new error now:
GW-Fabric: Please install Npgsql version 4.0.17.0 or earlier.
This is odd because I have this driver installed on the pc, and the dll inside of the gateway is this version as well.

Also I can connect to the database with PowerBi from that VM without issue. 

In rebooted the service multiple times now but it still doesn't work. 

thanks, 
Alex

Hi @Dickbale

 

In this scenario i suggest you to raise a support ticket here. so, that they can assit you in addressing the issue you are facing. please follow below link on how to raise a support ticket:

How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn

 

 

Thanks,

Prashanth Are

Hello !
I encounter the same error message when trying to connect to an On prem Data Gateway : "Please install Npgsql version 4.0.17.0 or earlier.".

Did you find the solution to the problem ?

 

Thank you for your help

v-prasare
Community Support
Community Support

@Dickbale,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for your issue worked? or let us know if you need any further assistance here?

 

@lbendlin, thanks for your prompt response

 

 

Thanks,

Prashanth Are

MS Fabric community support

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query

v-prasare
Community Support
Community Support

@Dickbale, As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for your issue worked? or let us know if you need any further assistance here?

 

@lbendlin, thanks for your prompt response

 

 

Thanks,

Prashanth Are

MS Fabric community support

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and give Kudos if helped you resolve your query

lbendlin
Super User
Super User

install Power BI Desktop on one of the gateway VMs and try to connect from there.  If that works then copy the npgsql files from the Desktop install folder to the Gateway install folder.  Restart the gateway service and try again.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.