jefflester/minitrino

SQLServer error: "The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption."

Closed this issue · 1 comments

When using the sqlserver module, users might see an error similar to the below when attempting to query the sqlserver catalog:

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

Same issue reported in this internal slack thread: https://starburstdata.slack.com/archives/C01FQCMJQM6/p1648827385983409

RCA is apparently a breaking change in the MS SQL JDBC driver version update between 371 and 374 - more details mentioned in linked thread

Workaround is to update the connection-url similar to either of the below options:
connection-url=jdbc:sqlserver://sqlserver:1433;database=master;encrypt=false
or
connection-url=jdbc:sqlserver://sqlserver:1433;database=master;trustServerCertificate=true

Closing as a dupe of issue #46