我陷入下面的SSL异常中:

ERROR STDERR - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
2016-10-21 07:26:37,502 [http-10.8.184.11-8080-14] ERROR STDERR - at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
2016-10-21 07:26:37,502 [http-10.8.184.11-8080-14] ERROR STDERR - at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
2016-10-21 07:26:37,502 [http-10.8.184.11-8080-14] ERROR STDERR - at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1822)


SSL调试日志如下:

INFO STDOUT - http-10.8.184.11-8080-14, WRITE: TLSv1 Handshake, length = 81
2016-10-21 07:26:37,499 [http-10.8.184.11-8080-14] INFO STDOUT - http-10.8.184.11-8080-14, WRITE: SSLv2 client hello message, length = 110
2016-10-21 07:26:37,501 [http-10.8.184.11-8080-14] INFO STDOUT - http-10.8.184.11-8080-14, READ: Unknown-3.3 Alert, length = 2
2016-10-21 07:26:37,501 [http-10.8.184.11-8080-14] INFO STDOUT - http-10.8.184.11-8080-14
2016-10-21 07:26:37,501 [http-10.8.184.11-8080-14] INFO STDOUT - , RECV TLSv1 ALERT:
2016-10-21 07:26:37,501 [http-10.8.184.11-8080-14] INFO STDOUT - fatal,
2016-10-21 07:26:37,501 [http-10.8.184.11-8080-14] INFO STDOUT - handshake_failure
2016-10-21 07:26:37,501 [http-10.8.184.11-8080-14] INFO STDOUT - http-10.8.184.11-8080-14, called closeSocket()
2016-10-21 07:26:37,501 [http-10.8.184.11-8080-14] INFO STDOUT - http-10.8.184.11-8080-14, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
2016-10-21 07:26:37,502 [http-10.8.184.11-8080-14] INFO STDOUT - http-10.8.184.11-8080-14, called close()
2016-10-21 07:26:37,502 [http-10.8.184.11-8080-14] INFO STDOUT - http-10.8.184.11-8080-14, called closeInternal(true)
2016-10-21 07:26:37,502 [http-10.8.184.11-8080-14] ERROR STDERR - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
2016-10-21 07:26:37,502 [http-10.8.184.11-8080-14] ERROR STDERR - at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
2016-10-21 07:26:37,502 [http-10.8.184.11-8080-14] ERROR STDERR - at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)

最佳答案

您正在运行Java的某些较旧版本,该版本仍支持SSLv2ClientHello,服务器拒绝接受它。连接之前,应从启用的协议中删除SSLv2ClientHello

10-07 18:52