我看到许多人报告了这个错误,但没有一个解决方案适合我。我试图在部署在一个单独的端口上的应用程序上建立443的监听端口,以获得更好的性能。我无法将SSL证书绑定到此端口。我继续低于错误。正如in this link中提到的,我已经添加了以下JVM参数,但仍然没有解决问题。我看到的一个问题是,CSR请求是使用openssl生成的,并以jks格式转换为keytool来读取。
-Dhttps.protocols=TLSv1.1,TLSv1.2
我正在使用java版“1.8.0_151”Java(TM)SE运行时环境(版本1.8.0_151-b12)。此外,我尝试检查https://www.sslshopper.com/ssl-checker.htm中的详细信息,此端口上的所有内容似乎都正常,但我仍然收到此错误。
来自日志文件的错误跟踪
socket[8dd49b[SSL_NULL_WITH_NULL_NULL: Socket[addr=/10.190.23.10,port=23456,localport=443]]] will be closed.
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1002)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:938)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:71)
SSL调试跟踪
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
Thread-7845, received EOFException: error
Thread-7845, handling exception: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
Thread-7845, SEND TLSv1.2 ALERT: fatal, description = handshake_failure
Thread-7845, WRITE: TLSv1.2 Alert, length = 2
[Raw write]: length = 7
0000: 15 03 03 00 02 02 28 ......(
Thread-7845, called closeSocket()
Thread-7845, called close()
Thread-7845, called closeInternal(true)
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
Thread-7851, received EOFException: error
Thread-7851, handling exception: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
Thread-7851, SEND TLSv1.2 ALERT: fatal, description = handshake_failure
Thread-7851, WRITE: TLSv1.2 Alert, length = 2
[Raw write]: length = 7