When I set the line that you specified, the following error occurs...
I added.
client.getHttpConnectionManager().getParams().setSoTimeout(3600);
Now I get. Any suggestions?
Jan 26, 2004 11:22:27 AM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
INFO: Recoverable exception caught when processing request
Jan 26, 2004 11:22:31 AM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
INFO: Recoverable exception caught when processing request
Jan 26, 2004 11:22:34 AM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
INFO: Recoverable exception caught when processing request
Jan 26, 2004 11:22:38 AM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
INFO: Recoverable exception caught when processing request
Jan 26, 2004 11:22:38 AM org.apache.commons.httpclient.HttpMethodDirector
executeWithRetry
WARNING: Recoverable exception caught but MethodRetryHandler.retryMethod()
returned false, rethrowing exception
Exception thrown:
org.apache.commons.httpclient.IOTimeoutException: Read timed out
at
org.apache.commons.httpclient.HttpConnection$WrappedInputStream.handleException
(HttpConnection.java:1369)
at org.apache.commons.httpclient.HttpConnection$WrappedInputStream.read
(HttpConnection.java:1379)
at java.io.FilterInputStream.read(FilterInputStream.java:66)
at java.io.PushbackInputStream.read(PushbackInputStream.java:120)
at org.apache.commons.httpclient.HttpParser.readRawLine
(HttpParser.java:109)
at org.apache.commons.httpclient.HttpParser.readLine
(HttpParser.java:135)
at org.apache.commons.httpclient.HttpConnection.readLine
(HttpConnection.java:1037)
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine
(HttpMethodBase.java:1842)
at org.apache.commons.httpclient.HttpMethodBase.readResponse
(HttpMethodBase.java:1611)
at org.apache.commons.httpclient.HttpMethodBase.execute
(HttpMethodBase.java:997)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry
(HttpMethodDirector.java:316)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod
(HttpMethodDirector.java:172)
at org.apache.commons.httpclient.HttpClient.executeMethod
(HttpClient.java:468)
at org.apache.commons.httpclient.HttpClient.executeMethod
(HttpClient.java:355)
at com.bac.amg.acs.HTTPBatch.execute(HTTPBatch.java:158)
at com.bac.amg.acs.HTTPBatch.main(HTTPBatch.java:76)
Thanks.
--
Sincerely,
David Webb
Vice-President
Hurff-Webb, Inc.
http://www.hurff-webb.com
(904) 861-2366
(904) 534-8294 Mobile
Quoting Michael Becke <[EMAIL PROTECTED]>:
> Hi David,
>
> I would suggest trying the SO_TIMEOUT, though I am not sure this is the
> cause. It seems that you are using HttpClient from HEAD. In this
> version you can set the default timeout using:
>
> HttpClient client = ....
> client.getHttpConnectionManager().getParams().setSoTimeout(SOME_TIMEOUT)
> ;
>
> Mike
>
> On Jan 23, 2004, at 3:11 PM, David Webb wrote:
>
> > I have written a program that uses HttpClient to call servlets that do
> > batch
> > jobs and wait for their return...usually no more that 15 minutes. I
> > have the
> > Server timeout on the Web/App Server that the servlets reside on set
> > to 1 hour
> > or 3600 seconds. I have tested this in 2 environments using
> > HttpClient to call
> > the Servlets that are in the same environment.
> >
> > 1) Windows 2K / JDK1.4.X - Works Fine, calls servlet, receives return
> > code 8-9
> > minutes later and exits without error
> >
> > 2) HP-UX / JDK1.4.X - Runs for about 15 minutes then throws the
> > following
> > exception:
> >
> > Exception thrown:
> > java.net.SocketException: Connection reset
> > at java.net.SocketInputStream.read(SocketInputStream.java:168)
> > at java.net.SocketInputStream.read(SocketInputStream.java:182)
> > at
> > org.apache.commons.httpclient.HttpConnection$WrappedInputStream.read
> > (HttpConnection.java:1377)
> > at java.io.FilterInputStream.read(FilterInputStream.java:66)
> > at
> > java.io.PushbackInputStream.read(PushbackInputStream.java:120)
> > at org.apache.commons.httpclient.HttpParser.readRawLine
> > (HttpParser.java:109)
> > at org.apache.commons.httpclient.HttpParser.readLine
> > (HttpParser.java:135)
> > at org.apache.commons.httpclient.HttpConnection.readLine
> > (HttpConnection.java:1037)
> > at org.apache.commons.httpclient.HttpMethodBase.readStatusLine
> > (HttpMethodBase.java:1842)
> > at org.apache.commons.httpclient.HttpMethodBase.readResponse
> > (HttpMethodBase.java:1611)
> > at org.apache.commons.httpclient.HttpMethodBase.execute
> > (HttpMethodBase.java:997)
> > at
> > org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry
> > (HttpMethodDirector.java:316)
> > at
> > org.apache.commons.httpclient.HttpMethodDirector.executeMethod
> > (HttpMethodDirector.java:172)
> > at org.apache.commons.httpclient.HttpClient.executeMethod
> > (HttpClient.java:468)
> > at org.apache.commons.httpclient.HttpClient.executeMethod
> > (HttpClient.java:355)
> > at com.bac.amg.acs.HTTPBatch.execute(HTTPBatch.java:157)
> > at com.bac.amg.acs.HTTPBatch.main(HTTPBatch.java:75)
> >
> >
> > Is there anything I can do in HttpClient to prevent this from
> > happening?
> >
> > Thanks.
> >
> > --
> > Sincerely,
> > David Webb
> > Vice-President
> > Hurff-Webb, Inc.
> > http://www.hurff-webb.com
> > (904) 861-2366
> > (904) 534-8294 Mobile
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]