MS SQL ODBC 17 Driver connects first tme but then give SSL Provider error:140A90F1:lib(20):func(169):reason(241)

0

I am facing this issue with dotNET core app, that connects and disconnects with SQL server using DSN defined in odbc.ini. Currently I am using the latest MS SQL ODBC driver i.e. msodbcsql17-17.4.2.1-1 and UnixODBC driver unixODBC 2.3.7.

I have tried downgrading the MSSQL ODBC driver to 11 and 13 as well but none worked.

My current DSN settings from odbc.ini is as under:

[ICMDB]
Driver = /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.4.so.2.1
Server = 10.32.7.145
Port = 1433
User = user
Password = password
Database = inst3_sideA
Language = us_english

and Logs file contain following errors:

2020-01-05 05:07:50.541 [T:9 P:17003] [FATAL] dbconnectivity.dbconnectivity ODBC Connected with Failure with connection string DSN=ICMDB;UID=qauser;Pwd=Password1;
System.Data.Odbc.OdbcException (0x80131937): ERROR [08001] [Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:140A90F1:lib(20):func(169):reason(241)]
ERROR [08001] [Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection
at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)
at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.Odbc.OdbcConnection.Open()

Thanks in advance!

unixodbc
msodbcsql17
asked on Stack Overflow Jan 5, 2020 by anwar ul hasan • edited Jan 5, 2020 by anwar ul hasan

1 Answer

0

Luckly, I have observed the same issue on the same day and same IP as well. Your currently installed mysql odbc driver is 8.0.19 which do not have backward compatibility. Downgrade your mysql odbc driver to 8.0.17 and then see it will be error free. :)

answered on Stack Overflow Jan 22, 2020 by ahmad bashir

User contributions licensed under CC BY-SA 3.0