遇到了,解决了吗
Remote host closed connection during handshake?调用https://open.weixin.qq.com/connect/oauth2/authorize api时偶尔报javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake错误,这几天报错频繁些。jdk版本是1.7,设置的信任证书和设置了TLSv1.2版本。平均几天会出现2到3次,请问是什么原因?
08-29我也遇到了,愁死了,解决了吗
SSLHandshakeException: Remote host closed connecti我们生产环境,在微信支付时,抛出异常:(用的是CloseablehttpClient连接,这是个偶发现象) System Exception:javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:992) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) at com.ms.config.wx.sdk.WeChatUtil.processHttpPost(WeChatUtil.java:555) at com.ms.config.wx.sdk.WeChatUtil.unifiedorder(WeChatUtil.java:135) at com.ms.tpp.service.handler.wechat.WechatMiniProgramPaymentServiceImpl.pay(WechatMiniProgramPaymentServiceImpl.java:78) 网上查了下设置系统参数,System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");升级JDK版本等 但这是个偶发现象,如果可以都可以,如果不可以都不可以,应该不是上面的方法能解决的。有大侠遇到过吗?要怎样解决呢?
08-29