When starting the microservice, it prompts that the driver cannot establish a secure connection with SQL Server by using Secure Socket Layer (SSL) encryption.

Explanation: After starting some microservices, the following error has been reported;

com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“The server selected protocol version TLS10 is not accepted by client preferences [TLS12]”。 ClientConnectionId:753383a4-ac2a-4a8c-9a14-bbf2695aab48

Caused by: javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is not accepted by client preferences [TLS12]

Insert image description here

Solution: Find the directory under jdk jre\lib\security, open java.securitythe file, search jdk.tls.disabledAlgorithms,Remove the following TLSv1, TLSv1.1 and 3DES_EDE_CBC, be careful not to miss the comma after modifying it.

Insert image description here

Insert image description here

It should be a problem unique to jdk8. It has not appeared in higher versions of jdk;

Guess you like

Origin blog.csdn.net/qq_42108331/article/details/132912940