KNOWLEDGE BASE

Error "SSL_connect: certificate verify failed" When Connecting to a Spark SQL Database in Tableau Desktop


Published: 20 May 2019
Last Modified Date: 20 May 2019

Issue

When attempting to connect to a Spark SQL database from Tableau Desktop with SSL, the following error occurs:
 
"Unable to connect to the ODBC Data Source. Check that the necessary drivers are installed and that the connection properties are valid.
[Simba][SparkODBC] (34) Error from server: SSL_connect: certificate verify failed."

Environment

  • Tableau Desktop
  • Spark SQL

Resolution

Option 1

Contact the database administrator to update the database to provide its certificate during the SSL handshake.

Option 2

Connect to the database with the Other Databases (ODBC) connector as it allows for a certificate to be attached.

Option 3

Use a TDC file with the following contents when connecting to the database. For more information on creating and using TDC files, see Make customizations global with a .tdc file.
<connection-customization class='spark' enabled='true' version='9.0'>
    <vendor name='spark' />
    <driver name='spark' />
    <customizations>
        <customization name='odbc-connect-string-extras' value='TrustedCerts=filepath_to_certificate;CAIssuedCertNamesMismatch=1' />
    </customizations>
</connection-customization>

Replace filepath_to_certificate with the file path of the trusted certificate on the machine that is connecting to the database. Note that the file path does not need to be wrapped in double quotation marks.

Cause

The Spark SQL connector in Tableau Desktop is designed to expect the database to provide its certificate during the SSL handshake.
Did this article resolve the issue?