You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by vincentr42 <vi...@gmail.com> on 2013/07/02 15:51:25 UTC

Embedded jetty: Could not send Message - Read timed out

Hi,

We use the embedded jetty proposed by CXF in our project's integration
tests.
Those are in the form of Junit tests and wired by Spring (and launched by
maven surefire plugin)
Tested JAX-WS web services are deployed on the embedded jetty and accessed
through a JAX-WS client also provided by CXF.

Now that our maven project has several modules that uses that feature, we
randomly get "read timed out" errors during our tests  (the stack trace is
given at the end of this post).

The thing is that this is really random and looks to happen only when
several modules are launched in a row. The tests in the first module run
well and when it switches to the next modules, we sometimes get the timeouts
in those next modules.

We tried different things to workaround this issue but without success so
far:

- Increasing client and server timeout values

- Setting "org.apache.cxf.transports.http_jetty.DontClosePort" to true
following this post: 
http://camel.465427.n5.nabble.com/Issue-using-camel-cxf-in-an-unit-test-td5718310.html
<http://camel.465427.n5.nabble.com/Issue-using-camel-cxf-in-an-unit-test-td5718310.html>  
=> Didn't work, but surefire forks a jvm for each module in our case and
that workaround seems to be related to tests running in the same JVM

- Assigning random http ports to jetty => Didn't work even when the port is
different from one module to another, we still randomly get timeouts...

- Activating DEBUG logs on "org.eclipse.jetty" and "org.apache.cxf", but
we've seen nothing relevant (logs look similar until the timeout comparing a
run that goes well and another that times out)

We are running out of ideas while our continuous builds keep failing
randomly... :-(

Any idea or help about that issue would be gladly appreciated.

Version of CXF used: 2.3.9

Thanks in advance,
Vincent






--
View this message in context: http://cxf.547215.n5.nabble.com/Embedded-jetty-Could-not-send-Message-Read-timed-out-tp5730168.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Embedded jetty: Could not send Message - Read timed out

Posted by vincentr42 <vi...@gmail.com>.
Sorry for this very late reply.

But thanks: 

Whether this has been corrected in jetty dependency (I have seen the version
has changed from 7.x to 8.x) or in CXF,
I tried this week-end with version 2.5.7 of CXF and I can't reproduce the
problem  ! :-)

Cheers,
Vincent



--
View this message in context: http://cxf.547215.n5.nabble.com/Embedded-jetty-Could-not-send-Message-Read-timed-out-tp5730168p5730747.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Embedded jetty: Could not send Message - Read timed out

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Would you please test with more recent cxf version? CXF 2.3.x not get supported anymore
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-7-2, at 下午9:51, vincentr42 wrote:

> Hi,
> 
> We use the embedded jetty proposed by CXF in our project's integration
> tests.
> Those are in the form of Junit tests and wired by Spring (and launched by
> maven surefire plugin)
> Tested JAX-WS web services are deployed on the embedded jetty and accessed
> through a JAX-WS client also provided by CXF.
> 
> Now that our maven project has several modules that uses that feature, we
> randomly get "read timed out" errors during our tests  (the stack trace is
> given at the end of this post).
> 
> The thing is that this is really random and looks to happen only when
> several modules are launched in a row. The tests in the first module run
> well and when it switches to the next modules, we sometimes get the timeouts
> in those next modules.
> 
> We tried different things to workaround this issue but without success so
> far:
> 
> - Increasing client and server timeout values
> 
> - Setting "org.apache.cxf.transports.http_jetty.DontClosePort" to true
> following this post: 
> http://camel.465427.n5.nabble.com/Issue-using-camel-cxf-in-an-unit-test-td5718310.html
> <http://camel.465427.n5.nabble.com/Issue-using-camel-cxf-in-an-unit-test-td5718310.html>  
> => Didn't work, but surefire forks a jvm for each module in our case and
> that workaround seems to be related to tests running in the same JVM
> 
> - Assigning random http ports to jetty => Didn't work even when the port is
> different from one module to another, we still randomly get timeouts...
> 
> - Activating DEBUG logs on "org.eclipse.jetty" and "org.apache.cxf", but
> we've seen nothing relevant (logs look similar until the timeout comparing a
> run that goes well and another that times out)
> 
> We are running out of ideas while our continuous builds keep failing
> randomly... :-(
> 
> Any idea or help about that issue would be gladly appreciated.
> 
> Version of CXF used: 2.3.9
> 
> Thanks in advance,
> Vincent
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Embedded-jetty-Could-not-send-Message-Read-timed-out-tp5730168.html
> Sent from the cxf-user mailing list archive at Nabble.com.


Re: Embedded jetty: Could not send Message - Read timed out

Posted by Willem jiang <wi...@gmail.com>.
Can you changed the surfier fork mode and make sure the JAXWS server is start per class?


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, July 2, 2013 at 9:51 PM, vincentr42 wrote:

> Hi,
>  
> We use the embedded jetty proposed by CXF in our project's integration
> tests.
> Those are in the form of Junit tests and wired by Spring (and launched by
> maven surefire plugin)
> Tested JAX-WS web services are deployed on the embedded jetty and accessed
> through a JAX-WS client also provided by CXF.
>  
> Now that our maven project has several modules that uses that feature, we
> randomly get "read timed out" errors during our tests (the stack trace is
> given at the end of this post).
>  
> The thing is that this is really random and looks to happen only when
> several modules are launched in a row. The tests in the first module run
> well and when it switches to the next modules, we sometimes get the timeouts
> in those next modules.
>  
> We tried different things to workaround this issue but without success so
> far:
>  
> - Increasing client and server timeout values
>  
> - Setting "org.apache.cxf.transports.http_jetty.DontClosePort" to true
> following this post:  
> http://camel.465427.n5.nabble.com/Issue-using-camel-cxf-in-an-unit-test-td5718310.html
> <http://camel.465427.n5.nabble.com/Issue-using-camel-cxf-in-an-unit-test-td5718310.html>  
> => Didn't work, but surefire forks a jvm for each module in our case and
> that workaround seems to be related to tests running in the same JVM
>  
> - Assigning random http ports to jetty => Didn't work even when the port is
> different from one module to another, we still randomly get timeouts...
>  
> - Activating DEBUG logs on "org.eclipse.jetty" and "org.apache.cxf", but
> we've seen nothing relevant (logs look similar until the timeout comparing a
> run that goes well and another that times out)
>  
> We are running out of ideas while our continuous builds keep failing
> randomly... :-(
>  
> Any idea or help about that issue would be gladly appreciated.
>  
> Version of CXF used: 2.3.9
>  
> Thanks in advance,
> Vincent
>  
>  
>  
>  
>  
>  
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Embedded-jetty-Could-not-send-Message-Read-timed-out-tp5730168.html
> Sent from the cxf-user mailing list archive at Nabble.com (http://Nabble.com).