Forum Discussion
Connect PowerBI Desktop with PostgreSQL
I'm having similar issues connecting to my AWS-hosted PostgreSQL database.
At first, I was just getting "The target machine actively refused the connection". I was able to overcome this by putting the port number from Heroku's config info on the end of the server name (sorry if this is obvious to everyone else).
e.g. ec2-54-247-242-8.compute-1.amazonaws.com:5500
Once I resolved this, I was able to input my username & password & now get a different error:
Details: "TlsClientStream.ClientAlertException: CertificateUnknown: Server certificate was not accepted. Chain status: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
. The specified hostname was not present in the certificate.
at TlsClientStream.TlsClientStream.ParseCertificateMessage(Byte[] buf, Int32& pos)
at TlsClientStream.TlsClientStream.TraverseHandshakeMessages()
at TlsClientStream.TlsClientStream.GetInitialHandshakeMessages(Boolean allowApplicationData)
at TlsClientStream.TlsClientStream.PerformInitialHandshake(String hostName, X509CertificateCollection clientCertificates, RemoteCertificateValidationCallback remoteCertificateValidationCallback, Boolean checkCertificateRevocation)"
From what I can tell, this means there's an incompatibility between the version of NgpSQL I have (3.1.6) and Power BI since Power BI seems to want SSL connections & a certificate but even though I followed the steps outlined here of un-checking the Encryption setting in File > Options & settings > Data Source Settings > Global Settings, I couldn't resolve this error.
I eventually gave up & went with the ODBC connection method outlined here & connected to the database after installing the PostgreSQL database drivers & setting up a user DSN. After upgrading to the lates (June 2016) Power BI desktop, I was able to use this method to see all my tables in my database.
Download from https://www.postgresql.org/download/
If the certificate issues are resolved, I'd be happy to use this method as it seems like it's a better option than ODBC but at least it's working for now.
- erikskov9 years agoAdvocate II
Same issue. ODBC DSN works, PostgreSQL 3.1.7 native does not (with or without Encryption selected)
- kschaefers9 years agoResolver I
I have the same issue with npgsql 3.18. Doesn't work even when selection the "no encryption" setting.
I've also tried installing the certificates from the server without any luck.