Tony, This is actually a bug in HttpClient. DefaultHttpMethodRetryHandler does not check whether the failed method has been aborted, which is certainly wrong. I'll file an issue report for this bug
Oleg On Tue, 2005-09-06 at 08:57 +0200, Tony Seebregts wrote: > Hi Mike, > > Think you might be right. Looking at the log trace (attached below) it > seems like it starts to retry then realises it shouldn't and I get the > IllegalStateException. The "retrying" entry in the log is just a bit > disconcerting I guess. > > regards > > Tony > > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter > HttpMethodBase.processResponseHeaders(HttpState, HttpConnection) > DEBUG [org.apache.commons.httpclient.HttpMethodBase] OK to continue received > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] > enter EntityEnclosingMethod.writeRequestBody(HttpState, HttpConnection) > DEBUG [org.apache.commons.httpclient.methods.PostMethod] enter > PostMethod.hasRequestContent() > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] > enter EntityEnclosingMethod.hasRequestContent() > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] > enter EntityEnclosingMethod.getRequestContentLength() > DEBUG [org.apache.commons.httpclient.methods.PostMethod] enter > PostMethod.hasRequestContent() > DEBUG [org.apache.commons.httpclient.methods.EntityEnclosingMethod] > enter EntityEnclosingMethod.hasRequestContent() > DEBUG [org.apache.commons.httpclient.HttpConnection] enter > HttpConnection.getRequestOutputStream() > DEBUG [org.apache.commons.httpclient.HttpConnection] enter > HttpConnection.close() > DEBUG [org.apache.commons.httpclient.HttpConnection] enter > HttpConnection.closeSockedAndStreams() > DEBUG [org.apache.commons.httpclient.HttpMethodDirector] Closing the > connection. > DEBUG [org.apache.commons.httpclient.HttpConnection] enter > HttpConnection.close() > DEBUG [org.apache.commons.httpclient.HttpConnection] enter > HttpConnection.closeSockedAndStreams() > INFO [org.apache.commons.httpclient.HttpMethodDirector] I/O exception > caught when processing request: Socket closed > DEBUG [org.apache.commons.httpclient.HttpMethodDirector] Socket closed > java.net.SocketException: Socket closed > at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99) > at java.net.SocketOutputStream.write(SocketOutputStream.java:136) > at > java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) > at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109) > at > org.apache.commons.httpclient.ChunkedOutputStream.flushCacheWithAppend(ChunkedOutputStream.java:120) > at > org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputStream.java:169) > at > org.apache.commons.httpclient.methods.InputStreamRequestEntity.writeRequest(InputStreamRequestEntity.java:174) > at > org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495) > at > org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973) > at > org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993) > at > org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:393) > at > org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:168) > at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) > at > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324) > at com.cibecs.brs.agent.net.io.HttpFilePut.send(HttpFilePut.java:477) > at com.cibecs.brs.agent.net.io.HttpFilePut.store(HttpFilePut.java:143) > at com.cibecs.brs.agent.net.impl.FilePutImpl.store(FilePutImpl.java:93) > . > . > . > > INFO [org.apache.commons.httpclient.HttpMethodDirector] Retrying request > DEBUG [org.apache.commons.httpclient.HttpMethodDirector] Attempt number > 2 to process request > DEBUG [org.apache.commons.httpclient.HttpConnection] enter > HttpConnection.open() > DEBUG [org.apache.commons.httpclient.HttpConnection] Open connection to > 192.168.0.64:8080 > DEBUG [org.apache.commons.httpclient.HttpMethodBase] enter > HttpMethodBase.execute(HttpState, HttpConnection) > DEBUG [org.apache.commons.httpclient.HttpConnection] enter > HttpConnection.releaseConnection() > DEBUG [org.apache.commons.httpclient.HttpConnection] Releasing > connection back to connection manager. > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager] > enter HttpConnectionManager.releaseConnection(HttpConnection) > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager] > Freeing connection, > hostConfig=HostConfiguration[host=http://192.168.0.64:8080] > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager] > enter HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration) > DEBUG [org.apache.commons.httpclient.util.IdleConnectionHandler] Adding > connection at: 1125989150250 > DEBUG [org.apache.commons.httpclient.MultiThreadedHttpConnectionManager] > Notifying no-one, there are no waiting threads > DEBUG [org.apache.commons.httpclient.HttpConnection] enter > HttpConnection.close() > DEBUG [org.apache.commons.httpclient.HttpConnection] enter > HttpConnection.closeSockedAndStreams() > > Michael Becke wrote: > > >Hi Tony, > > > >I do not believe it is possible for a method to be executed again once > >aborted. However it may be possible to attempt executing a method > >again. My guess is that is what's happening. The HttpMethodDirector > >tries to re-execute a method that has been aborted, which causes an > >IllegalStateException, which eventually causes the director to give > >up. Could you verify that this is actually what's happening? > > > >Mike > > > > > > > > > --------------------------------------------------------------------- > 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]
