Our Java app use jTDS 1.3.1 to connect to SQL Server, which works fine until a client trying to put the database on Azure SQL. The connection failed with the following exception:
java.sql.SQLException: Reason: Login failed due to client TLS version being less than minimal TLS version allowed by the server.
I checked the documentation of jTDS, can't see anyway to specify TLS version. Besides replacing it with MS JDBC driver, has anyone succeeded with other work around?
I don't have access to Azure SQL, so I cannot test if reducing the TLS version to 1.0 would work.
Solved the issue by chance. Just need to append ";ssl=request" to the connection string. It looks like by default SSL/TLS is disabled. The error message about TLS version is misleading. Hope this help someone in the future.
Had this same issue when trying to connect a .Net application to a Azure SQL database in Azure managed instance .
Here's how I solved it :
My previous JDBC URL was this:
jdbc:jtds:sqlserver://my-example-instance.c656df8582985.database.windows.net:1433
I just added ssl=require
to the end of the URL, so it became:
jdbc:jtds:sqlserver://my-example-instance.c656df8582985.database.windows.net:1433;ssl=require
That's all .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.