我将所需的证书添加到我的java/weblogic证书中,并绕过了SSL握手异常。但是,一旦我启动服务器,该应用程序在第一次尝试时工作正常,但是当我发送第二个请求时,它会再次抛出握手错误。是因为超时还是什么?
Caused by: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1496)
at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1508)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:70)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at java.io.FilterOutputStream.flush(FilterOutputStream.java:140)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.Alerts.getSSLException(Alerts`enter code here`.java:154)
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
在 setDomainEnv.cmd 中为JAVA_OPTIONS设置这个解决了这个问题!
-Dhttps.protocols=TLSv1.1,TLSv1.2