数据库连接communicationslinkfailure问题

报错信息:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure  The last packet successfully received from the server was 2 milliseconds ago.  The last packet sent successfully to the server was 2 milliseconds ago.  at sun.reflect.GeneratedConstructorAccessor270.newInstance(Unknown Source)  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)  at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)  at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:989)  at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:203)  at com.mysql.jdbc.MysqlIO.negotiateSSLConnection(MysqlIO.java:4901)  at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1659)  at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1226)  at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2191)  at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2222)  at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2017)  at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:779)  at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)  at sun.reflect.GeneratedConstructorAccessor260.newInstance(Unknown Source)  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)  at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)  at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389)  at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)  at com.fr.third.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1461)  at com.fr.third.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1525)  at com.fr.third.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2153) Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateExpiredException: NotAfter: Tue Jul 06 15:48:23 CST 2021  at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)  at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1964)  at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:328)  at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:322)  at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1614)  at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)  at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052)  at sun.security.ssl.Handshaker.process_record(Handshaker.java:987)  at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072)  at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)  at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)  at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)  at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:188)  ... 17 more Caused by: java.security.cert.CertificateExpiredException: NotAfter: Tue Jul 06 15:48:23 CST 2021  at sun.security.x509.CertificateValidity.valid(CertificateValidity.java:274)  at sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:629)  at sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:602)  at com.mysql.jdbc.ExportControlled$X509TrustManagerWrapper.checkServerTrusted(ExportControlled.java:286)  at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:985)  at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1596)  ... 25 more&nbsp

求求了,救救孩子吧!

FineBI 真的很搞笑 发布于 2021-7-7 11:43
1min目标场景问卷 立即参与
回答问题
悬赏:4 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共2回答
最佳回答
0
真的很搞笑Lv5见习互助
发布于2021-7-7 18:54

网络问题,已修复

最佳回答
0
祈LLv6中级互助
发布于2021-7-7 11:46
  • 1关注人数
  • 752浏览人数
  • 最后回答于:2021-7-7 18:54
    请选择关闭问题的原因
    确定 取消
    返回顶部