Raspberry Pi, Ubuntu 22.04 arm64 ODBC18 SSL error
BrianLesko opened this issue · 2 comments
Hello, I am new to SQL and pyODBC but will be using these tools going forward if this issue can be resolved. I have this same code running on my windows laptop and it connects just fine, but on my Raspberry Pi, I am having issues.
- Python: 3.10.12
- pyodbc: 5.0.1
- OS: Ubuntu 22.04
- DB: MS SQL Server Express 2014
- driver: ODBC18
Code
import pyodbc
server = '192.168.129.2\SQLEXPRESS'
username = 'UID'
password = 'PWD'
database = 'Database'
connectionString = f'DRIVER={{ODBC Driver 18 for SQL Server}};SERVER={server};DATABASE={database};UID={username};PWD={password};TrustServerCertificate=yes;'
conn = pyodbc.connect(connectionString)
Issue
pyodbc.OperationalError: ('08001', '[08001] [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: [error:0A000102:SSL routines::unsupported protocol] (-1) (SQLDriverConnect)')
Check your TLS configuration, I suspect either server is not offering TLS 1.2 or client does not accept TLS < 1.2.
There are related discussions about that here: #610
Thanks @v-chojas
editing openssl.cnf and changing CipherString fixes the issue!