cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Python databricks-sql-connector TLS issue - client tries to negotiate v1 which fails many times then randomly tries to negotiate v1.3 which works

MrT
New Contributor II

This issue is oddly only on an Azure Windows 10 VM. I Dont have this on my workstation or my personal computer so it seems to be host config related. The VM where the issue is i have a simple python script that connects to the Azure Databricks SQL endpoint and issues a query. If i run the script it can fail numerous times in a row and then randomly succeed. I did a Wireshark trace and found that the failure happened when the client tries to do a handshake with tls v1. There is no documentation on the connection about configuring the tls version and the fact that it works flawlessly on all other workstations tells me this Python Databricks Connector module is using system config somewhere to decide what version of tls to initiate a handshake with. To make things more interesting. I am using the exact same Python runtime and modules having copied the entire Python folder to the VM from a working desktop.

here is the issue captured via Wireshark

image Can anyone shed some light as to why the connector is not negotiating with tls v1.3 consistently?

https://pypi.org/project/databricks-sql-connector/

3 REPLIES 3

BilalAslamDbrx
Databricks Employee
Databricks Employee

@Wayne Theron​, I pity the user who runs into this issue (I grew up on the A-team, I couldn't resist). Let me follow on this issue and get back to you.

Vidula
Honored Contributor

Hello @Wayne Theron​ 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

MrT
New Contributor II

Hi

no I don't have a solution for this yet. It's an issue with the module or a dependency. It would be great dev could add the ability to set the tls version when configuing the client .

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group