Skip to content

TLS version handshake issue  #19

Closed

Description

@waynetheron

I am facing with this connector. It works 100% of the time from my desktop but when i try from an Azure VM it only randomly succeeds. I did a Wireshark trace and can see when it fails, the client tries to do a TLSv1 handshake and the Databricks Service detects this and sends back a reset. Randomly it will try with v1.3 and then the connection works. I have tried setting the http_header to tls-version : TLSv1.3 but it doesn't seem to have any effect

in this screen shot you can see a success and failure side-by-side

image

Activity

  1. changed the title [-]TLS version handshake issue databricks-sql-connector[/-] [+]TLS version handshake issue [/+] on Jul 15, 2022
  2. self-assigned this
    on Jul 15, 2022
  3. sander-goos commented on Jul 18, 2022

    @sander-goos
    Contributor

    Hi, could you please check the openssl version on the VM?
    E.g.: python -c "import ssl; print(ssl.OPENSSL_VERSION)". The TLS version used by the handshake is determined by the openssl library. The client should use the highest version it supports in the Client Hello message, so it is odd that it is trying with TLSv1 while clearly it also has TLSv1.3 available.

  4. waynetheron commented on Jul 18, 2022

    @waynetheron
    Author

    Hi, could you please check the openssl version on the VM? E.g.: python -c "import ssl; print(ssl.OPENSSL_VERSION)". The TLS version used by the handshake is determined by the openssl library. The client should use the highest version it supports in the Client Hello message, so it is odd that it is trying with TLSv1 while clearly it also has TLSv1.3 available.

    HI

    It prints

    OpenSSL 1.1.1n 15 Mar 2022

    What is interesting is this is the same python modules that run perfectly fine on another system (copied the entire python folder to this Azure VM) so it does seem to be an underlying OS-related issue but the weird thing is why does it sometimes try 1.3 (this bit has me stumped as it is not consistent). I have counted the intervals between success and failure and there is no pattern there either. It can fail 11 times in a row before using 1.3 and working, other times it can fail 16 times before working. When it works it tends to work the next run again but then starts to fail after that.

  5. vikrantpuppala commented on Jul 8, 2026

    @vikrantpuppala
    Contributor

    Closing this as the issue is quite stale - please reopen if help is required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions