You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Jonathan Carlson <jo...@yahoo.com> on 2002/06/06 15:54:02 UTC

[HttpClient] SocketException

I am getting an intermittent SocketException: Connection
reset by peer: JVM_recv in socket input stream read

It only happens on one of the URLs I'm monitoring and it
doesn't happen all the time.

Any suggestion on what this might be or how I might debug
it?  I'm also wondering if maybe this is something that
Http Client could be handling better.


 java.net.SocketException: Connection reset by peer:
JVM_recv in socket input stream read
at java.net.SocketInputStream.socketRead(Native Method)
at
java.net.SocketInputStream.read(SocketInputStream.java:86)
at
java.net.SocketInputStream.read(SocketInputStream.java:102)
at
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:465)
at
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:997)
at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:968)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:479)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:320)
at
com.katun.webmon.RequestRunnable.execute(RequestRunnable.java:110)
at
com.katun.webmon.TimedRunnable.run(TimedRunnable.java:58)
at java.lang.Thread.run(Thread.java:484)


=====
Jonathan Carlson
joncrlsn@users.sf.net
Minneapolis, Minnesota

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [HttpClient] SocketException handling

Posted by Jonathan Carlson <jo...@yahoo.com>.
I noticed that in HttpConnection#writeLine SocketException
is caught and rethrown as an HttpRecoverableException.  I'm
wondering if it was an oversight that #readLine doesn't do
this as well since I'm getting a SocketException there that
isn't being handled. 


--- Jonathan Carlson <jo...@yahoo.com> wrote:
> I am getting an intermittent SocketException: Connection
> reset by peer: JVM_recv in socket input stream read
> 
> It only happens on one of the URLs I'm monitoring and it
> doesn't happen all the time.
> 
> Any suggestion on what this might be or how I might debug
> it?  I'm also wondering if maybe this is something that
> Http Client could be handling better.
> 
> 
>  java.net.SocketException: Connection reset by peer:
> JVM_recv in socket input stream read
> at java.net.SocketInputStream.socketRead(Native Method)
> at
>
java.net.SocketInputStream.read(SocketInputStream.java:86)
> at
>
java.net.SocketInputStream.read(SocketInputStream.java:102)
> at
>
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:465)
> at
>
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:997)
> at
>
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:968)
> at
>
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:479)
> at
>
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:320)
> at
>
com.katun.webmon.RequestRunnable.execute(RequestRunnable.java:110)
> at
> com.katun.webmon.TimedRunnable.run(TimedRunnable.java:58)
> at java.lang.Thread.run(Thread.java:484)
> 
> 
> =====
> Jonathan Carlson
> joncrlsn@users.sf.net
> Minneapolis, Minnesota
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


=====
Jonathan Carlson
joncrlsn@users.sf.net
Minneapolis, Minnesota

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>