tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leon <l...@ipedo.com>
Subject Re: Connection aborted by peer: socket write error
Date Wed, 12 Jun 2002 01:38:07 GMT
but my server.xml as below, shows there is enough available threads. And
only 10 threads are attacking.

<Connector acceptCount="200"
className="org.apache.catalina.connector.http.HttpConnector"
connectionTimeout="60000" debug="0" enableLookups="false"
maxProcessors="100" minProcessors="50" port="18080" redirectPort="18443"
/>


On Tue, 11 Jun 2002 09:33:55 +0530
Anand Bashyam Narasimhan <anandn@digitalthink.com> wrote:

> Typically the error that you are getting on the server side "connection
> reset by peer" happens when a connection to the servlet is open and while
> the request is being processed the stream to which the response is written
> back is closed abruptly. You can easily replicate this with a simple
> servlet, that proceses a GET request, and then put a sleep for "n" seconds
> and lets say you are request it through a browser, close the browser session
> at n-m(m>1) seconds and u'll see this error.
> 
> As for the threads and the total connection that can be opened up, these can
> be configured in the server.xml for TC. It's an attribute to the
> "HttpConnector"
> 
>     <Connector className="org.apache.catalina.connector.http.HttpConnector"
>                port="9090" minProcessors="5" maxProcessors="75"
>                enableLookups="true" redirectPort="8443"
>                acceptCount="10" debug="0" connectionTimeout="60000"/>
> 
> Try to increase this and see if you are able to get more connections.
> Normally these connections that come with TC4 default are more than enough
> for development mode testing of any web-app.
> 
> Hope that helps.
> 
> Anand 
> -----Original Message-----
> From: Leon [mailto:leon@ipedo.com]
> Sent: Tuesday, June 11, 2002 8:11 AM
> To: tomcat-dev@jakarta.apache.org
> Subject: Connection aborted by peer: socket write error
> 
> 
> With Tomcat 4.0.3, i lanuched my serverlet, XMLSevlet, but only under 10
> threads continuously connect, the client program threw the below
> exception. And Tomcat also showed exception described as below (server
> side exception).
> 
> I searched in the archieve, and it seems that this bug has already found
> and fixed in 4.0.3. But why it happens again?
> 
> Anyone can do me a favor?
> 
> java.io.FileNotFoundException:
> http://localhost:18080/XMLDBService/servlet/XMLServlet
>         at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection
> .java:574)
>         at
> com.foo.client.connection.IpedoURLConnection.sendPostMessage(IpedoURLConnect
> ion.java:104)
>         at
> com.foo.client.impl.ClientImplTool.processCommand(ClientImplTool.java:150)
>         at
> com.foo.client.impl.ClientImplTool.processCommand(ClientImplTool.java:113)
>         at
> com.foo.cursor.client.ClientCacheManager.getNode(ClientCacheManager.java:171
> )
>         at com.foo.client.dom.UNode.getNode(UNode.java:798)
>         at com.foo.client.dom.UChildNode.getNextSibling(UChildNode.java:88)
>         at
> com.foo.serialize.XMLSerializer.serializeElement(XMLSerializer.java:761)
>         at
> com.foo.serialize.XMLSerializer.serializeElement(XMLSerializer.java:597)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeNode(BaseMarkupSerializer.ja
> va:1180)
>         at
> com.foo.serialize.XMLSerializer.serializeElement(XMLSerializer.java:760)
>         at
> com.foo.serialize.XMLSerializer.serializeElement(XMLSerializer.java:597)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeNode(BaseMarkupSerializer.ja
> va:1180)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeNode(BaseMarkupSerializer.ja
> va:1105)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeNode(BaseMarkupSerializer.ja
> va:1248)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeNode(BaseMarkupSerializer.ja
> va:1105)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeXPathReturnNode(BaseMarkupSe
> rializer.java:461)
>         at com.foo.utils.CommonTool.writeNode(CommonTool.java:100)
>         at com.foo.cdctest.cursor.GetDocument.runTest(GetDocument.java:93)
>         at
> com.foo.cdctest.testframework.driver.CaseDriver.run(CaseDriver.java:46)
>         at java.lang.Thread.run(Thread.java:484)
> [100003] I/O error encountered while performing the
> operation.http://localhost:18080/XMLDBService/servlet/XMLServlet
>         at
> com.foo.client.impl.ClientImplTool.processCommand(ClientImplTool.java:160)
>         at
> com.foo.client.impl.ClientImplTool.processCommand(ClientImplTool.java:113)
>         at
> com.foo.cursor.client.ClientCacheManager.getNode(ClientCacheManager.java:171
> )
>         at com.foo.client.dom.UNode.getNode(UNode.java:798)
>         at com.foo.client.dom.UChildNode.getNextSibling(UChildNode.java:88)
>         at
> com.foo.serialize.XMLSerializer.serializeElement(XMLSerializer.java:761)
>         at
> com.foo.serialize.XMLSerializer.serializeElement(XMLSerializer.java:597)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeNode(BaseMarkupSerializer.ja
> va:1180)
>         at
> com.foo.serialize.XMLSerializer.serializeElement(XMLSerializer.java:760)
>         at
> com.foo.serialize.XMLSerializer.serializeElement(XMLSerializer.java:597)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeNode(BaseMarkupSerializer.ja
> va:1180)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeNode(BaseMarkupSerializer.ja
> va:1105)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeNode(BaseMarkupSerializer.ja
> va:1248)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeNode(BaseMarkupSerializer.ja
> va:1105)
>         at
> com.foo.serialize.BaseMarkupSerializer.serializeXPathReturnNode(BaseMarkupSe
> rializer.java:461)
>         at com.foo.utils.CommonTool.writeNode(CommonTool.java:100)
>         at com.foo.cdctest.cursor.GetDocument.runTest(GetDocument.java:93)
>         at
> com.foo.cdctest.testframework.driver.CaseDriver.run(CaseDriver.java:46)
>         at java.lang.Thread.run(Thread.java:484)
> 
> 
> 
> Server side:
> 
> 2002-06-10 16:18:58 StandardWrapperValve[XMLServlet]: Servlet.service() for
> servlet XMLServlet threw exception
> java.net.SocketException: Connection aborted by peer: socket write error
>  at java.net.SocketOutputStream.socketWrite(Native Method)
>  at java.net.SocketOutputStream.write(Unknown Source)
>  at
> org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java:679
> )
>  at
> org.apache.catalina.connector.HttpResponseBase.flushBuffer(HttpResponseBase.
> java:757)
>  at
> org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java
> :219)
>  at
> org.apache.catalina.connector.ResponseStream.close(ResponseStream.java:224)
>  at
> org.apache.catalina.connector.http.HttpResponseStream.close(HttpResponseStre
> am.java:217)
>  at com.foo.server.servlet.XMLServlet.doPost(XMLServlet.java:219)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:243)
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
>  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.ja
> va:190)
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
>  at
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
> 46)
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
>  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:2343)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 66)
>  at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:170)
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
> )
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> 64)
>  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:5
> 66)
>  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:
> 1012)
>  at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
> )
>  at java.lang.Thread.run(Unknown Source)
> 
> 
> 
> -- 
> Leon <leon@ipedo.com>
> 
> 
> -- 
> Leon <leon@ipedo.com>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>

-- 
Leon <leon@ipedo.com>



--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message