java.net.socketexception:连接或出站已关闭

bq8i3lrv  于 2021-07-06  发布在  Java
关注(0)|答案(1)|浏览(1168)

我在调用外部沙盒时看到这个问题。我发现它是在java版本上发生的。以前有人见过这个问题并解决过吗?这是间歇性的。
sandbox返回200并在解析响应时抛出错误
java版本:1.8.0ē+沙盒调用=>不工作
java版本:1.8.0\u 202+沙盒调用=>运行良好
使用改装版2.3.0、okhttp 3.8.0

java.net.SocketException: Connection or outbound has closed
    at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:967)
    at okio.Okio$1.write(Okio.java:79)
    at okio.AsyncTimeout$1.write(AsyncTimeout.java:180)
    at okio.RealBufferedSink.flush(RealBufferedSink.java:216)
    at okhttp3.internal.http2.Http2Writer.rstStream(Http2Writer.java:152)
    at okhttp3.internal.http2.Http2Connection.writeSynReset(Http2Connection.java:315)
    at okhttp3.internal.http2.Http2Stream.close(Http2Stream.java:226)
    at okhttp3.internal.http2.Http2Stream.cancelStreamIfNecessary(Http2Stream.java:454)
    at okhttp3.internal.http2.Http2Stream$FramingSource.close(Http2Stream.java:428)
    at okio.ForwardingSource.close(ForwardingSource.java:43)
    at okhttp3.internal.http2.Http2Codec$StreamFinishingSource.close(Http2Codec.java:199)
    at okio.RealBufferedSource.close(RealBufferedSource.java:455)
    at okio.RealBufferedSource.close(RealBufferedSource.java:455)
    at okio.InflaterSource.close(InflaterSource.java:126)
    at okio.GzipSource.close(GzipSource.java:182)
    at okio.RealBufferedSource.close(RealBufferedSource.java:455)
    at okio.ForwardingSource.close(ForwardingSource.java:43)
    at okio.RealBufferedSource.close(RealBufferedSource.java:455)
    at okio.RealBufferedSource$1.close(RealBufferedSource.java:443)
    at sun.nio.cs.StreamDecoder.implClose(StreamDecoder.java:378)
    at sun.nio.cs.StreamDecoder.close(StreamDecoder.java:193)
    at java.io.InputStreamReader.close(InputStreamReader.java:199)
    at okhttp3.ResponseBody$BomAwareReader.close(ResponseBody.java:258)
    at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._closeInput(ReaderBasedJsonParser.java:193)
    at com.fasterxml.jackson.core.base.ParserBase.close(ParserBase.java:368)
    at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1622)
    at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1203)
    at retrofit2.converter.jackson.JacksonResponseBodyConverter.convert(JacksonResponseBodyConverter.java:32)
    at retrofit2.converter.jackson.JacksonResponseBodyConverter.convert(JacksonResponseBodyConverter.java:23)
    at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:119)
    at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:218)
    at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:112)
    at okhttp3.RealCall$AsyncCall.execute(RealCall.java:141)
    at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
    at au.com.auspost.utils.MDCUtils.lambda$mdcRunnable$0(MDCUtils.java:24)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
ippsafx7

ippsafx71#

在将Reformation2库迁移到版本2.8.1后,此问题已得到解决。在迁移到最新版本的Reformation2库之后,我们遇到了认证验证问题。我们通过生成新证书解决了认证问题。

相关问题