当前位置: 首页 > 知识库问答 >
问题:

原因:java。网SocketException:来自服务器的文件意外结束

温智明
2023-03-14

当我通过SOAPUI运行WS时,我会间歇性地遇到以下错误。有时它不工作,然后它继续工作,然后又有时它不工作。另一个问题是,客户机提供的测试web服务运行良好,没有任何问题,但当我们切换到生产服务时,它会给出问题。谷歌搜索并做了一些更改(HttpConfig上的超时,jetty maxIdleTime),但仍然无法使其工作:(有没有办法缩小问题的范围?

org.apache.cxf.interceptor.Fault: Could not send Message.
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)[147:org.apache.cxf.cxf-api:2.6.0.redhat-60024]
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)[147:org.apache.cxf.cxf-api:2.6.0.redhat-60024]

Caused by: java.net.SocketException: SocketException invoking https://www.website:443/gateway/ServicePortV2: Unexpected end of file from server
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.7.0_25]



Caused by: java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:718)[:1.7.0_25]
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)[:1.7.0_25]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1322)[:1.7.0_25]
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)[:1.7.0_25]
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)[:1.7.0_25]
    at org.apache.cxf.transport.http.HTTPConduit.processRetransmit(HTTPConduit.java:1004)[159:org.apache.cxf.cxf-rt-transports-http:2.6.0.redhat-60024]
    at org.apache.cxf.transport.http.HTTPConduit.access$400(HTTPConduit.java:148)[159:org.apache.cxf.cxf-rt-transports-http:2.6.0.redhat-60024]
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRetransmits(HTTPConduit.java:1504)[159:org.apache.cxf.cxf-rt-transports-http:2.6.0.redhat-60024]
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1525)[159:org.apache.cxf.cxf-rt-transports-http:2.6.0.redhat-60024]
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1438)[159:org.apache.cxf.cxf-rt-transports-http:2.6.0.redhat-60024]

只需添加使用SOAPUI与生产endpoint一起工作即可。

共有1个答案

秦飞航
2023-03-14

我们最终发现服务器端设置了连接超时,因此我们的保持活动连接将在分配的时间之后超时,从而出现间歇性错误。每次都将连接更改为关闭,现在一切正常。

 类似资料: