Azure / azure-sqldb-spark

This project provides a client library that allows Azure SQL DB or SQL Server to act as an input source or output sink for Spark jobs.
MIT License
76 stars 52 forks source link

CertificateException trying to connect from Azure Databricks to Azure SQL #64

Closed ezra-at-lumedic closed 4 years ago

ezra-at-lumedic commented 4 years ago

Used connection settings taken straight from the project's README and get this:

com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "java.security.cert.CertificateException: Failed to validate the server name in a certificate during Secure Sockets Layer (SSL) initialization.". ClientConnectionId:7a8e2f5f-f505-4035-8c00-213dfa0ed7a9

ezra-at-lumedic commented 4 years ago

Solved by using:

"trustServerCertificate" -> "true"