ShomeNL's avatar
ShomeNL
New Member
4 years ago
Status:
Investigating

Unable to make a connection to my postgresql server through the online environment

Hello,

 

Despite quite the troubleshooting online, I have not found a solution to the issue I have. 

 

I store and retrieve my data from my postgres server hosted on the same machine I make my reports on. To connect, I use the localhost IP-address and the port number would be 5432 in this case. This works fine through the Power BI Desktop app. However, since I want to setup a scheduled refresh, I have to configure a connection through the online environment as well. 

 

I downloaded the standard gateway and that - seemingly - works well. I can connect my local excel files without any hassle. The issue starts when I want to configure my postgres database server. The following error shows up:

 

"Failed to update data source credentials: An error happened while reading data from the provider: 'No connection could be made because the target machine actively refused it'"

 

 

 

Now I have tried turning off the firewall to see whether that was the issue; no luck there. I also checked my command prompt with the help of netstat -anb, which did show something that I thought might be the issue:

 

 

postgres seems to be listening on a different port than the one initialized in the configuration files and the port that it should be on, is occupied by a different program. However, Power BI Desktop can still connect to the database without any issue and svchost.exe seems to just be Windows' way of handling things on the back-end. 

 

I have also granted access to other IP-addresses through the configuration files in my postgres folder hoping that that would help, but nothing seems to. 

 

Anyone who might be able to assist me? 

2 Comments

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi!

    I'm experiencing same problem.

    In my case  I'm connected to a postgre DB hosted in a cloud server. The connection is done through a bitvise tunnel which is working fine in Powerbi Desktop, I can retrieve all data and connection is good. This generates the connection in "localhost:5005".

    After uploading the file to PowerBi Service I get problem even to validate credentials getting the same error:

     

    By the way, ODBC connection works fine but it's extremly slow this is why I need to go to direct connection, which is definitively faster at least in desktop.

    Thanks in avdance for your support.

    Best

    David