tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <>
Subject when user disconnects from response stream
Date Fri, 04 Mar 2005 10:07:00 GMT

I've seen similar posts from users before on this topic but do not believe I saw a concrete
answer. I was streaming a PDF to my browser yesterday when I decided to quickly move to another
page in the website and therefore stopping the PDF response stream. When I looked in the logs,
I found the following stack trace.

The com.lowagie.text.pdf has spotted that this was a Client Abort which it was, but I also
noted that it is wrapping up the real error that occured which was a
Connection reset by peer: socket write. 
We have this Connection reset by peer: socket write error in our
logs quite often on our production server and I am "guessing" that perhaps users are stopping
the response stream somehow, perhaps closing the browser or moving to another page mid-response?

In both that case, and in the case of aborting the PDF stream as below, I am not convinced
I need to care since it does not impair the server that a user did not bother to receive the
full response. 

Does anyone disagree or have an explanation why such scary stack traces should be output by
Tomcat each time a user does not complete receiving their response .. is it perhaps because
Tomcat is unable to differentiate between a user closing their browser and some other network
problem that I may well want to know about?

Thanks, Allistair.

ExceptionConverter: ClientAbortException: Connection reset by peer:
socket write error
	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(
	at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(
	at org.apache.catalina.connector.OutputBuffer.doFlush(
	at org.apache.catalina.connector.OutputBuffer.flush(
	at org.apache.catalina.connector.CoyoteOutputStream.flush(
	at com.lowagie.text.pdf.OutputStreamCounter.flush(Unknown Source)
	at com.lowagie.text.DocWriter.close(Unknown Source)
	at com.lowagie.text.pdf.PdfWriter.close(Unknown Source)
	at com.lowagie.text.pdf.PdfDocument.close(Unknown Source)
	at com.lowagie.text.Document.close(Unknown Source)
	at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(
	at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(
	at net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfStream(
	at net.sf.jasperreports.engine.JasperPrintManager.printReportToPdfStream(
	at net.sf.jasperreports.engine.JasperRunManager.runReportToPdfStream(
	at com.qas.newmedia.intranet.pof.actions.mypos.PDFGenerateAction.doWork(
	at org.apache.struts.action.RequestProcessor.processActionPerform(
	at org.apache.struts.action.RequestProcessor.process(
	at org.apache.struts.action.ActionServlet.process(
	at org.apache.struts.action.ActionServlet.doGet(
	at javax.servlet.http.HttpServlet.service(
	at javax.servlet.http.HttpServlet.service(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at com.qas.newmedia.common.filters.SetCharacterEncodingFilter.doFilter(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at org.apache.catalina.core.StandardWrapperValve.invoke(
	at org.apache.catalina.core.StandardContextValve.invoke(
	at org.apache.catalina.core.StandardHostValve.invoke(
	at org.apache.catalina.valves.ErrorReportValve.invoke(
	at org.apache.catalina.valves.AccessLogValve.invoke(
	at org.apache.catalina.core.StandardEngineValve.invoke(
	at org.apache.catalina.connector.CoyoteAdapter.service(
	at org.apache.jk.server.JkCoyoteHandler.invoke(
	at org.apache.jk.common.HandlerRequest.invoke(
	at org.apache.jk.common.ChannelSocket.invoke(
	at org.apache.jk.common.ChannelSocket.processConnection(
	at org.apache.jk.common.SocketConnection.runIt(
	at org.apache.tomcat.util.threads.ThreadPool$

QAS Ltd.
Developers of QuickAddress Software
<a href=""></a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message