我们开发了一个功能,需要调用美国那边一个系统的接口,偶尔会发生下面这个错误,考虑美国和中国的网络问题,请问这个异常是不是有可能是网络情况不好,丢包,或者网速较慢导致的?
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:994) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379) 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:394) 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:110) 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)
1
knightdf 2021-03-05 15:25:59 +08:00
妥妥的网络问题
|
2
wakzz 2021-03-05 15:27:25 +08:00
|
6
wakzz 2021-03-05 16:05:13 +08:00
@rrzwxq 偶现的话,抓包吧,如果是网络问题的话,楼主这个情况应该是异常的连接先 TCP 握手成功,然后 TLS 建立途中出现丢包,接着 TCP 默认重试 3 次发包失败后不再重试,最终断开 TCP 。
如果抓到的包确实符合这个描述,那就是网络问题石锤了。 |
8
systemcall 2021-03-06 10:12:55 +08:00 via Android
是的
有办法可以让墙对你更敏感,之后你再来抓包、连服务就可以了 方法是用免费的那种梯子,看一些普通人喜欢看的网站,墙真的会加高,会持续一段时间。不知道商宽会不会 肯定可以抓出来问题的,只是看多久。甚至机场不是特别好的话,偶尔也会有类似的错误 |