Issue
After upgrading the Instance and MID Server, loading records from the JDBC Datasource failed with the below error:
MID Server reported error: java.sql.SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server did not return a response. The connection has been closed. ClientConnectionId:"
There also instances where running SQL 2005 or earlier can run into the following error as these versions of SQL only support TLS version 1.0:
MID Server reported error: SQLState: null
java.sql.SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]". ClientConnectionId:
Cause
1. Find out the Java version used by the MID Server.
- To check the version, Run this in MID Server > Scripts - Background by selecting the appropriate MID Server from the dropdown
ms.log(Packages.java.lang.System.getProperties()); - You can find the "java.version=" in the results.
2. Find out the SQL Server version of the target where the JDBC Datasource queries.
Java version 1.8+ uses TLS 1.2 by default
TLS 1.2 is only supported starting from SQL 2008 and higher versions, which can cause the SSL exception.
Reference - https://support.microsoft.com/en-in/help/3135244/tls-1-2-support-for-microsoft-sql-server
Resolution
Please ask the SQL administrators to set up a new view, instance, or node on a separate server running version 2008 or higher to ensure compatibility with the required TLS version.