您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
这篇文章主要介绍“驱动程序无法通过使用SSL加密与SQL Server建立安全连接怎么解决”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“驱动程序无法通过使用SSL加密与SQL Server建立安全连接怎么解决”文章能帮助大家解决问题。
[2022-09-07 11:45:35.517] [Druid-ConnectionPool-Create-5339735] [ERROR] com.alibaba.druid.pool.DruidDataSource - create connection SQLException, url: jdbc:sqlserver://172.16.6.88:1433;DatabaseName=testServer, errorCode 0, state 08S01 com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“The server selected protocol version TLS10 is not accepted by client preferences [TLS12]”。 ClientConnectionId:f227ddec-3901-482c-bd54-6752243f1724 at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2998) at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1884) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2558) at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2216) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2067) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1204) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:825) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1558) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1623) at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2468) Caused by: javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is not accepted by client preferences [TLS12] at sun.security.ssl.Alert.createSSLException(Alert.java:131) at sun.security.ssl.Alert.createSSLException(Alert.java:117) at sun.security.ssl.TransportContext.fatal(TransportContext.java:357) at sun.security.ssl.TransportContext.fatal(TransportContext.java:313) at sun.security.ssl.TransportContext.fatal(TransportContext.java:304) at sun.security.ssl.ServerHello$ServerHelloConsumer.onServerHello(ServerHello.java:946) at sun.security.ssl.ServerHello$ServerHelloConsumer.consume(ServerHello.java:873) at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:376) at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:479) at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:457) at sun.security.ssl.TransportContext.dispatch(TransportContext.java:200) at sun.security.ssl.SSLTransport.decode(SSLTransport.java:154) at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1290) at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1199) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:401) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:373) at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1802) ... 8 common frames omitted
2. 找到 jdk.tls.disabledAlgorithms 如果有TLSv1、TLSv1.1、3DES_EDE_CBC 删除即可【使用管理员模式编辑】
C:\Program Files (x86)\Java\jdk1.8.0_291\jre\lib\security
也有说 jdk、jre都要改的,如果jdk里面改了没用,把 jre目录下也改了试试
关于“驱动程序无法通过使用SSL加密与SQL Server建立安全连接怎么解决”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识,可以关注亿速云行业资讯频道,小编每天都会为大家更新不同的知识点。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。