javax.net.ssl.SSLException MESSAGE: closing inbound before receiving peer's close_notify STACKTRACE: javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:133) at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:255) at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:645) at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:624) at com.mysql.cj.protocol.a.NativeProtocol.quit(NativeProtocol.java:1319) at com.mysql.cj.NativeSession.quit(NativeSession.java:182) at com.mysql.cj.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:1750) at com.mysql.cj.jdbc.ConnectionImpl.close(ConnectionImpl.java:720) at com.zaxxer.hikari.pool.PoolBase.quietlyCloseConnection(PoolBase.java:135) at com.zaxxer.hikari.pool.HikariPool.lambda$closeConnection$1(HikariPool.java:441) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) ** END NESTED EXCEPTION **
这个异常信息是由于 SSL/TLS 握手过程中发生了异常,导致连接被异常关闭。具体的原因可能是对端服务器主动关闭了连接,或者是 SSL/TLS 握手失败等。建议检查对端服务器是否正常,以及 SSL/TLS 相关配置是否正确。如果问题依然存在,可以尝试降低 SSL/TLS 的安全级别,或者使用较新的 SSL/TLS 协议版本等方法来解决问题。
javax.net.ssl.SSLException MESSAGE: closing inbound before receiving peer's close_notify STACKTRACE: javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
这个错误通常是由于客户端和服务器端在完成 SSL 握手过程后,其中一个没有正确发送 close_notify 消息导致的。这个错误可能是由于网络问题、防火墙、代理或者服务器端的问题。
为了解决这个问题,你可以尝试以下几个方法:
确保你的网络连接是稳定的并且没有被阻塞。可以尝试使用其他网络或者检查你的网络设置是否正确。
检查你的防火墙和代理设置,确保它们不会影响 SSL 握手过程。
如果你是服务器端的开发者,可以检查你的 SSL 配置是否正确,并且你的服务器端是否正确发送了 close_notify 消息。
如果你是客户端的开发者,可以尝试使用不同的 SSL 实现或者升级你的 SSL 版本。
如果以上方法都没有解决问题,你可以尝试在调试模式下运行程序,并且查看更详细的错误信息。
javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
This exception is usually thrown when the SSL/TLS handshake fails due to an unexpected closure of the inbound SSL/TLS connection before receiving a close_notify message from the peer. This can happen due to various reasons, such as network connectivity issues, server configuration errors, or protocol incompatibilities.
To resolve this issue, you can try the following steps:
Check the network connectivity between the client and server and ensure that there are no firewalls or proxies blocking the SSL/TLS traffic.
Verify that the server certificate is valid and trusted by the client. You can use tools like OpenSSL or Keytool to inspect the certificate chain.
Ensure that the SSL/TLS protocols and cipher suites used by the client and server are compatible. You can use tools like SSL Labs or Qualys SSL Server Test to check the server's SSL/TLS configuration.
If the problem persists, you can try enabling SSL/TLS debugging on the client or server side to get more detailed logs of the SSL/TLS handshake process. This can help you identify the root cause of the issue.
Overall, this exception indicates a problem with the SSL/TLS handshake process, and you need to investigate the underlying cause to resolve it.
相关推荐
















