users@jersey.java.net

Re: [Jersey] Issue with jersey 1.1.5: ClientAbortException, java.net.SocketException: Broken pipe

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 20 Oct 2009 17:57:22 +0200

On Oct 20, 2009, at 5:29 PM, coldserenity wrote:

>
> Hello,
>
> Our test environment configuration is the following:
> - JBoss 4.2.2 GA;
> - Jersey 1.1.5 ( jersey-client-1.1.5-ea-SNAPSHOT.jar,
> jersey-core-1.1.5-ea-SNAPSHOT.jar, jersey-fastinfoset-1.1.5-ea-
> SNAPSHOT.jar,
> jersey-json-1.1.5-ea-SNAPSHOT.jar, jersey-server-1.1.5-ea-
> SNAPSHOT.jar,
> jersey-spring-1.0.1-SNAPSHOT.jar, jettison-1.0.1.jar)
> - Spring 2.5.5;
>
> We're having a weird exception on our test environment. Jersey
> logs error
> that starts as: "ClientAbortException: java.net.SocketException:
> Broken
> pipe." (bigger print-out can be found attached
> http://n2.nabble.com/file/n3859286/server.log server.log ).
> And what is more, logging does not stop (in my case the log file
> grew
> 400MB in minutes). Had to roughly re-start the server.
>

Eeek!


> We have saw this error as well on 1.0.3 and thought that moving to
> 1.1.5
> would solve the problem.
> I have also seen similar error on Atlassian Jira
> (http://jira.atlassian.com/browse/JRA-15405). What they did is
> simply caught
> and quietened the exception.
>
> The questions are:
> - what might have caused this exception to get infinitely cycled?

I have no idea. Are there any other clues in the log?

Jersey in this respect is just a servlet application. AFAICT it is not
doing anything particularly special in the manner it uses the Servlet
API.

That SocketExcepton will be passed all the way through to the servlet
layer.


> - is there a standard way of suppressing this exception with
> Jersey?
>

You could override Jersey's ServletContainer.service method to trap
the exception so it is not passed through to the servlet layer.

Paul.