An error happened while reading data from the provider. The remote certificate is invalid according to the validation procedure

我是研究僧i 提交于 2020-03-19 04:50:35

问题


I'm trying to connect Postgres Database on AWS EC2 instance to Microsoft PowerBI. I tried various method available on internet but its showing the above error. Although I've done this connection on AWS RDS. I installed required dependencies (GAC) and all the certificates required for PowerBI.


回答1:


I've came across the same issue, unfortunately I didn't find solution to resolve it. But I found an alternative.

You can connect PostgreSQL using ODBC Connection.

Setup ODBC for PostgreSQL: https://www.postgresql.org/ftp/odbc/versions/msi/

After Installation, Select ODBC Connection under "Get Data"

Select "None" under Data Source Name and add following statement under connection string:

Driver={PostgreSQL ANSI(x64)};Server=<host>;Port=5432;Database=<dbname>

Click "Next"

Enter Username and Password, Click Connect. If credentials are correct, you will see list of tables available in database.

Follow this reference for detailed description: http://niftit.com/connecting-power-bi-to-postgresql/




回答2:


Two hours wasted, so writing in full.

Download and install postgresql ODBC driver

Goto below URL

URL: https://www.postgresql.org/ftp/odbc/versions/msi/

Scroll down
Click on a zip file to download  (i took psqlodbc_12_00_0000-x64.zip)
Unzip file
Run the .MSI file
   Take all defaults given and install it

Create ODBC data source

Find the ODBC data source using below (I took "ODBC Data Sources (64-bit)"):

Windows > Start button > search for "ODBC Data Sources"
User DSN > PostgreSQL ANSI(x64) > Finish
Give details
  Data source name : PostgreSQL30                ###
  DB name *** , server, port, username, pwd
  SSL mode = disabled (default)
click on Test button
  "Connection successful" message will come, else re-check details above.

We now have a new User DS, with PostgreSQL30 created

Download Power BI

Windows > Start button > Microsoft Store
Search for "Power BI Desktop" > Get/Install

Source: https://docs.microsoft.com/en-us/power-bi/desktop-get-the-desktop#download-power-bi-desktop

Running the Power BI

Get Data (On the left)
Search for "odbc" > Select "ODBC" on right pane > Connect
  DSN > PostgreSQL30 ( --- this is same as above ### --- )
  OK

"Navigator" dialog is shown, with "Display Options"

ODBC ... PostgreSQL30
> DB name   ( --- this is same as above *** --- )
  Open the > button on left of DB name
  select the tables
  click "Load" button 

Done. You have successfully connected Power BI (PBI) to your postgres or other database.

Hope this helps.




回答3:


For AWS look at this case https://community.powerbi.com/t5/Desktop/The-remote-certificate-is-invalid-according-to-the-validation/td-p/531475

For non-AWS issue you should configure SSL according to Npgsql documentation https://www.npgsql.org/doc/security.html or you can disable SSL option in postgresql.conf on postgresql server.




回答4:


Following worked for me:

File / Options and settings / Data source settings

then select data source

and Edit Permissions and uncheck encrypt connections



来源:https://stackoverflow.com/questions/53921336/an-error-happened-while-reading-data-from-the-provider-the-remote-certificate-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!