• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Tomcat servlet mapping error after Broken pipe error

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have implemented Servlet 3.0 AsyncContext in Tomcat Version:7.0.23.

It is runing in RHEL 6.1 using OpenJDK version 1.6.0_24,64-bit server

The app is working fine for most part. When there is some disturbance in the network, the update from the server is not able to reach the client as there is a "ClientAbortException: java.net.SocketException: Broken pipe" exception. which is caught and ignored.

This happens in the line,

asyncContext.getResponse().getWriter().println(updateStr);

After this Tomcat goes crazy and is routing URLs to unexpected servlets. For example with a mapping of /query to a servlet called SessionManager, the URL mysite.com/index.html is routed to the SessionManager servlet. Only restart of tomcat solves the problem.

Any pointers on why this is happening and how to solve this?
 
Saloon Keeper
Posts: 24499
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried using the Oracle/Sun JDK instead of OpenJDK?

It has only been very recently that I've heard anyone say that OpenJDK is ready for production J2EE use.
 
thiru chakra
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply. Tried using the Oracle/Sun JDK also. But encounters the same problem. To add more data, the following is the stack trace of the exception.

ClientAbortException: java.net.SocketException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:346)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:306)
at org.apache.catalina.connector.Response.flushBuffer(Response.java:568)
at org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java:307)
at com.management.TestHandler$TestInfo.statusUpdate(TestHandler.java:638)
at com.chakra.ipbtt.TestObject.publish(TestObject.java:1626)
at com.chakra.ipbtt.TestObject.handlePublish(TestObject.java:1421)
at com.chakra.ipbtt.TestObject.executeCommand(TestObject.java:1371)
at com.chakra.ipbtt.TestObject.executeCommand(TestObject.java:1388)
at com.chakra.ipbtt.TestObject.executeCommand(TestObject.java:1388)
at com.chakra.ipbtt.TestObject.executeCommand(TestObject.java:1388)
at com.chakra.ipbtt.TestObject.executeCommand(TestObject.java:1388)
at com.chakra.ipbtt.TestObject.executeCommand(TestObject.java:1388)
at com.chakra.ipbtt.TestObject.executeTest(TestObject.java:1791)
at com.management.TestHandler.executeTest(TestHandler.java:420)
at com.management.TestHandler.handleNewTest(TestHandler.java:222)
at com.management.TestMgr.processRequest(TestMgr.java:71)
at com.management.TestMgr.doPost(TestMgr.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:690)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:477)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
at com.management.SessionMgr.processRequest(SessionMgr.java:131)
at com.management.SessionMgr.doPost(SessionMgr.java:164)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.management.SessionsFilter.doFilter(SessionsFilter.java:127)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)

Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:462)
at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:119)
at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:789)
at org.apache.coyote.Response.action(Response.java:174)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:341)
... 48 more`
 
reply
    Bookmark Topic Watch Topic
  • New Topic