Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection reset by peer

 
Deepak Lohar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am using NetBeans 3.4.1 as the IDE with Tomcat 4.0 as
the web server plugin.I am using MySQL version 3.23.56
and the OS is Linux (Slackware 9.0)
I am having a looping application which refreshes after every 15 seconds, this loop goes on well for 30 mins or so and then after that i get the following exception.( as listed below). I will be glad to know why this exception occur? does it has anything to do with the database timeout?
and how do i handle this exception. Even after getting this exception the server is runnign and it resets the connection after throwing the following exception.
Here is Stacktrace.........
========================================================================
2003-08-29 14:19:57 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception
java.io.IOException: Connection reset by peer
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
at org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java:674)
at org.apache.catalina.connector.HttpResponseBase.flushBuffer(HttpResponseBase.java:764)
at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java:647)
at org.apache.catalina.connector.ResponseStream.write(ResponseStream.java:312)
at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java:189)
at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:1903)
at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1652)
at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1197)
at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:519)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:479)
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That just means that the other side of the connection closed the socket.
What exactly is the client side in this application? Is the client doing a new request for every update "loop"?
Bill
 
Deepak Lohar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the client side of this application is JSP and I am using the Opera Browser. After every 15 secs the JSP page which has the looping logic refreshes by calling .... response.setHeader("refresh", "15")
part of code reads as follows....
if(m==v0 && s>=0 && s<15){%>
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=1152 HEIGHT=864>
<embed src="./ups/local_nw1.swf" border="0" width="1152" height="864" align="center" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed>
</object>
<% response.setHeader("Refresh", "15");} %>
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

indicates that it is the browser closing the connection so I don't think you can do much about that on the servlet side.
Incidently, the client side is the browser.
So you are reloading the page every 15 seconds, what exactly is being refreshed? Can you get the Flash plugin to refresh without reloading the page?
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic