• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Connection reset by peer

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic