启动微服务,提示驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接

说明:启动一些微服务后,一直在报下面这个错误;

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]

在这里插入图片描述

解决:找到jdk下的jre\lib\security目录,打开java.security文件,搜索jdk.tls.disabledAlgorithms去掉后面的TLSv1, TLSv1.1和3DES_EDE_CBC,注意逗号修改完不要缺失。

在这里插入图片描述

在这里插入图片描述

应该是jdk8独有的问题,高版本的jdk没有出现过;

猜你喜欢

转载自blog.csdn.net/qq_42108331/article/details/132912940
今日推荐