aspose file tools*
The moose likes Servlets and the fly likes java.io.IOException: Broken pipe when dispatching page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "java.io.IOException: Broken pipe when dispatching page" Watch "java.io.IOException: Broken pipe when dispatching page" New topic
Author

java.io.IOException: Broken pipe when dispatching page

May Pat
Ranch Hand

Joined: Jul 01, 2002
Posts: 32
I'm a novice in servlet programming and I'm having this problem at work where after returned back from a query, the servlet is dispatching a result page and throws the following exception:
java.io.IOException: Broken pipe
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.write(Unknown Source)
at allaire.jrun.jrpp.JrppOutputStream.write(ProxyEndpoint.java:727)
at java.io.ByteArrayOutputStream.writeTo(Unknown Source)
at allaire.jrun.servlet.ServletBAOS.commit(ServletBAOS.java:163)
at allaire.jrun.servlet.ServletBAOS.commit(ServletBAOS.java:140)
at allaire.jrun.servlet.JRunPrintWriter.writeEx(JRunPrintWriter.java:196)
at allaire.jrun.jsp.JRunJspWriter.print(JRunJspWriter.java:96)
at jrun__secure__batchProcessing__disbursementdetail2ejsp2e._jspService(jrun__secure__batchProcessing__disbursementdetail2ejsp2e.java:97)
at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34)
at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:175)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)
at lo.controller.LOController.gotoPage(LOController.java:423)
at lo.controller.LOController.handleRequest(LOController.java:359)
at lo.controller.LOController.doPost(LOController.java:253)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34)
at allaire.jrun.servlet.Invoker.service(Invoker.java:84)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:382)
at allaire.jrun.ThreadPool.run(ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(WorkerThread.java:75)
Does anyone know what could possibly cause this? The problem consistently occurs to the servlet that is returned back from a query successfully and trying to dispatch a page to display result. However, it does not happen everytime the same query is called.
And what could possibly generate Broken Pipe exception? Any recommended reading?
FYI. We're using JRun and Informix.
Thank you very much.


May P.
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
hi,
what is the relation between the query u r running and the request ur redirecting to the other page? i mean how u r using results of the query or whatever to the new url?
try remove the querying the database and see if u can redirect to another page? (just put redirection to the url that doesn't use query results u get as u dont have that result now....)
if this works then remove redirecting stuff and run the query alone. if this works then i would say there is some problem popping in using both of them.... in that case can u post snippet of ur code so that one can get an idea about the code and the purpose?
regards
maulin.
chanoch wiggers
Author
Ranch Hand

Joined: May 24, 2001
Posts: 245
here's a couple of suggestions. I only know what causes broken pipes on server linux boxes so...
Usually this happens in shell scripts if you accidentally set right to the user the application is operating in to write but not read (pretty rare) as files that the db is using to store intermediate results are inaccessible.
An incorrectly set up network can cause this problem, you would have to figure it together with the system admin if that's the case.
it could also be resource contention - (are you stress testing the app?) You may need to synchronize on whichever object causes the broken pipe. put in loggin messages at key points and you should find that the location of the error is consistent.
also if you are monitoring the behavior of your code in a shell window by observing side effects such as the creation of files, that may cause an error.


chanoch<p><a href="http://www.amazon.com/exec/obidos/ASIN/1861007736/" target="_blank" rel="nofollow">Author of Professional Apache Tomcat</a></p>
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Does the query take a long time? If so perhaps the user's browser is closing the socket.
Bill
Rajeev Bakhru
Greenhorn

Joined: Jun 21, 2001
Posts: 28
Hi Guys,
did anybody has a solution for this Borken Pipe Error?
We are also getting the same error on weblogic 6.1 server console.
Any ideas
Thanks
Rajeev
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.io.IOException: Broken pipe when dispatching page