We are using JDK 1.8.0_131, and JDBC 4.2, we have all TLSv1.0, 1.1 and 1.2 enabled, the issue started appearing after we downgraded DB from Enterprise to Standard. Ping to the Db works, and we can also connect to it with MS SQL Server Management Studio.
java.sql.SQLException: Cannot create PoolableConnectionFactory
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.".
We have tried the following solutions from other posts:
SQL Server JDBC Error on Java 8: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption It mentions, passing TLSV1 as a parameter, we tried that and it didn't work. Another answer mentions using JDBC 4.2, which we already do.
https://techcommunity.microsoft.com/t5/sql-server/the-driver-could-not-establish-a-secure-connection-to-sql-server/ba-p/383477 From here, checked that “security.provider.1=sun.security.provider.Sun” is present in the jre\lib\security\java.security file, which is present. Also checked that jre\lib has jsse.jar in it.
Error: "SQL Server did not return a response. The connection has been closed." Find jdk.tls.disabledAlgorithms= Remove 3DES_EDE_CBC This is already not there.