[ 
https://issues.apache.org/jira/browse/CXF-8138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16961406#comment-16961406
 ] 

Andriy Redko commented on CXF-8138:
-----------------------------------

Hi [~dmitry.murashenkov] , I afraid without reproducible test case it is going 
to be difficult to address the issue. May I ask you at least to share 
server-side logs as well (so we could may be correlate why the stream was 
closed). Also, have you tried to run the tests without using Docker? Thank you.

> Spurious stream closed error if http keep alive enabled
> -------------------------------------------------------
>
>                 Key: CXF-8138
>                 URL: https://issues.apache.org/jira/browse/CXF-8138
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.3.3
>            Reporter: Dmitry Murashenkov
>            Priority: Major
>
> I have a very complex load test with CXF, which sometimes results in several 
> CXF requests failing:
> Caused by: java.io.IOException: Stream closed.
>  at 
> java.net.AbstractPlainSocketImpl.available(AbstractPlainSocketImpl.java:470)
>  at java.net.SocketInputStream.available(SocketInputStream.java:259)
>  at java.io.BufferedInputStream.available(BufferedInputStream.java:410)
>  at sun.net.www.MeteredStream.available(MeteredStream.java:170)
>  at java.io.FilterInputStream.available(FilterInputStream.java:168)
>  at 
> org.apache.cxf.jaxrs.client.ClientProxyImpl.handleResponse(ClientProxyImpl.java:886)
>  at 
> org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:786)
>  at 
> org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:238)
>  ... 52 common frames omitted
> Setting -Dhttp.keepAlive=false fixes this problem. Not sure if the bug is in 
> CXF or JDK.
> When looking at tcpdump - the traffic is ok: both request and 201 response 
> can be seen in dump, but seems response is not getting processed and 
> exception is raised.
> In all exception cases - this was not the first request in this connection, 
> but on the other hand there are tons of other connections with several 
> requests in them without any problems.
> Exception is usually raised only after JVM was just started, sometimes only 
> single request fails, but sometimes a bunch of 2-3 fail simultaneously and 
> then everything works fine. This doesn't happen after every restart, but does 
> happen from time to time.
> I have a more or less table reproduce to test properties if there are any, 
> but can't provide the complete test case as it is too complex.
> Environment:
> Host: Ubuntu 18.04.3 LTS (Bionic Beaver)
> Both client and server are in separate Docker containers on the same host
> Docker version 19.03.4, build 9013bf583a
> Oracle JDK 8 b231 (same with 8 b151)
> CXF 3.3.3 (same with 3.2.6)
> I create a new JAXRSClientFactory.create() proxy for each call, do a single 
> call and forget about the proxy till. All calls are to a single host, but 
> different urls, so problem is not specific to some http url.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to