【问题标题】:After upgrading to Java 8u292, TLS connection fails with SSLHandshakeException升级到 Java 8u292 后,TLS 连接失败并出现 SSLHandshakeException
【发布时间】:2021-07-17 22:31:12
【问题描述】:

我有一台运行 WildFly 21.0.2 的 LXC CentOS 7 主机。应用程序服务器使用双向 TLS 连接(相互身份验证)和 MySQL Connector/J 5.1.47 JDBC 驱动程序连接到 MariaDB 10.4.18 数据库。在昨天发生的从 Java 8u282 升级到 Java 8u292 之前,它一直运行良好。现在连接失败并出现以下错误:

IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: IJ031084: Unable to create connection
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

我的第一个想法是 Java 8u292 弃用了 MySQL Connector/J 5.1.47 JDBC 驱动程序用于建立连接的协议或密码套件。

【问题讨论】:

    标签: java ssl sslhandshakeexception


    【解决方案1】:

    Consolidated Release Notes for JDK 8 and JDK 8 Update Releases,表示TLS 1.0 and TLS 1.1 have been disabled in Java 8u292 和我的目标是强制连接使用 TLS 1.2。

    我尝试将 JDBC 驱动程序升级到 MySQL Connector/J 5.1.49,这是目前的最新版本,但没有任何改进。

    最后,enabledTLSProtocols 似乎是最好的选择,在连接 URL 中添加 enabledTLSProtocols=TLSv1.2 后,应用服务器成功建立了连接。

    【讨论】:

    • 工作就像一个魅力。泰。
    • 太棒了!这拯救了我的一天!
    猜你喜欢
    • 2016-12-01
    • 2015-11-19
    • 2021-11-01
    • 2016-03-04
    • 2023-01-12
    • 2021-12-17
    • 2015-06-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多