Npgsql 3.0.3 error with Power BI Desktop

Jon Capezzuto picture Jon Capezzuto · Oct 21, 2015 · Viewed 7.3k times · Source

I'm receiving the following error when connecting to an AWS Postgres database that requires SSL. I recently upgraded from npgsql 2.3.2 (which was buggy) to 3.0.3 which won't connect. Any suggestions would be appreciated.

DataSource.Error: TlsClientStream.ClientAlertException: CertificateUnknown: Server certificate was not accepted. Chain status: A certificate chain could not be built to a trusted root authority. . 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) Details: DataSourceKind=PostgreSQL

Answer

VinnyP picture VinnyP · Feb 25, 2017

I was able to fix the issue by installing the Amazon RDS public certificate on my machine. Once I did this, I was able to connect.

Steps I followed:

  1. Download the AWS RDS public certificate 1
  2. Create a .crt file from the .pem file downloaded. Sample instructions here 2
  3. Install the certificate (.crt file) on the machine. 3
  4. Connect!