Failed to connect to Azure SQL server from android due to TLS version mismatch using jtds connection

Daiya 0 Reputation points
2024-07-23T03:11:54.86+00:00

Also tried added ssl=require in connection string it returned error as "Network error IOException: SSL handshake aborted..."

if I added sslProtocol=TLSv1.1 since in Azure server it set as 1.0, but it return message as "Reason:Login failed due to client TLS version being less than server.."

Using jtds.-1.3.1.jar

or what is the right way to set TLS version in connection string?

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. SSingh-MSFT 16,371 Reputation points Moderator
    2024-07-23T07:52:15.4066667+00:00

    Hi Daiya •,

    Check below please:

    • Difference Drivers If we use JDBC URL format for the jTDS driver, but use sqljdbc4.jar in CLASSPATH, we will wind up with the “No suitable driver found” error for SQL Server Database.
    • Wrong JDBC Driver Name Including “Microsoft” in JDBC URL for SQL SERVER while using sqljdbc4.jar file to connect to the MSSQL database will result in the error.
    • Spelling errors in Driver Name Using inaccurate names in the JDBC URL also results in the “No suitable driver found” error.
    • jTDS vs JDBC Drive Using jTDS driver in the development environment while using the Microsoft JDBC driver (sqljdbc4.jar) in the production environment also causes the error.

    Your URL should be jdbc:sqlserver://server:port;DatabaseName=dbname and Class name should be like com.microsoft.sqlserver.jdbc.SQLServerDriver

    Please let us know your result.

    Thanks.

    1 person found this answer helpful.
    0 comments No comments

  2. SSingh-MSFT 16,371 Reputation points Moderator
    2024-07-23T05:26:16.3833333+00:00

    Hi Daiya •,

    Welcome to Microsoft Q&A forum.

    As I understand, you are getting connection failure due to TLS version mismatch using jtds connection.

    Please refer to this technical blog https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-357-login-failed-due-to-client-tls-version-being/ba-p/3832318 and follow the steps to get rid of the issue.

    Let us know your findings.

    Awaiting your reply.

    Thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.