You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2011/08/31 12:11:09 UTC

[jira] [Created] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
-----------------------------------------------------------------------------

                 Key: HTTPCLIENT-1120
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 4.1.2
            Reporter: Sebb


DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:

org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
org.apache.http.impl.client.DefaultHttpClient: Retrying request

and

org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
org.apache.http.impl.client.DefaultHttpClient: Retrying connect

The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114896#comment-13114896 ] 

Sebb commented on HTTPCLIENT-1120:
----------------------------------

There should also be a test case to ensure that connect is not retried following an abort
                
> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Alin Vasile (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alin Vasile updated HTTPCLIENT-1120:
------------------------------------

    Attachment: no_request_in_context.patch

This patch appears to resolve the missing request from the context when the request is aborted. Will require a more experienced person in HC  to review it.
                
> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: no_request_in_context.patch, patch.diff, req_abort_test.patch, retry_handler.patch
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Reopened] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb reopened HTTPCLIENT-1120:
------------------------------


Need a test case to show that the retries are not occurring

> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Resolved] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Oleg Kalnichevski (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-1120.
-------------------------------------------

    Resolution: Fixed

* Moved all test cases for abort handling to TestAbortHandling
* AbstractPoolEntry now throws InterruptedIOException instead of plain IOException
* Applied a variation of the patch contributed by Alin
* Merged fixes to 4.1.x branch

Oleg
                
> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: no_request_in_context.patch, patch.diff, req_abort_test.patch, retry_handler.patch
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115058#comment-13115058 ] 

Sebb commented on HTTPCLIENT-1120:
----------------------------------

Added request retry test in httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestAbortHandling.java (r1176137).

Still need to add test for connection abort.


                
> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Resolved] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved HTTPCLIENT-1120.
------------------------------

    Resolution: Fixed

Thanks!

Patch applied, with minor adjustments to remove unused imports in test code

> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114797#comment-13114797 ] 

Sebb commented on HTTPCLIENT-1120:
----------------------------------

Just discovered that the code does not work if the request is a RequestWrapper, because those always return false for isAborted();

> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115554#comment-13115554 ] 

Sebb commented on HTTPCLIENT-1120:
----------------------------------

Testing with JMeter shows that when an aborted request fails in the connect phase, the request is not present in the context.

Further, if the request is added to the context (under a new key) for debug purposes, the aborted flag is not set.

The combination BindException/"Address already in use: connect" is the exception generated (or at least the commonest).
                
> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Alin Vasile (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alin Vasile updated HTTPCLIENT-1120:
------------------------------------

    Attachment: retry_handler.patch

patch for:

DefaultHttpRetryHandler should not retry requests for java.net.SocketException: Network is unreachable: connect
                
> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff, req_abort_test.patch, retry_handler.patch
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated HTTPCLIENT-1120:
-----------------------------

    Comment: was deleted

(was: Need a test case to show that the retries are not occurring)

> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114837#comment-13114837 ] 

Sebb commented on HTTPCLIENT-1120:
----------------------------------

The test cases don't detect this because the mock objects return what is expected by the code; this is not necessarily what happens in reality.

There should also be some test cases that exercise a real request, using a separate thread for the request and the abort.

> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Alin Vasile (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alin Vasile updated HTTPCLIENT-1120:
------------------------------------

    Attachment: patch.diff

A patch and testcase for this issue. The test may have unused imports (my env. is still not configured)

> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Alin Vasile (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114919#comment-13114919 ] 

Alin Vasile commented on HTTPCLIENT-1120:
-----------------------------------------

Will be hard to assert this, since AbstractHttpClient does not expose the DefaultRequestDirector it uses, which has a reference to the retried execution count.
                
> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski updated HTTPCLIENT-1120:
------------------------------------------

    Fix Version/s: 4.2 Alpha1
                   4.1.3

> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Commented] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115921#comment-13115921 ] 

Sebb commented on HTTPCLIENT-1120:
----------------------------------

I've also seen:

I/O exception (java.io.IOException) caught when connecting to the target host: Request aborted 
Retrying connect 
                
> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] [Updated] (HTTPCLIENT-1120) DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests

Posted by "Alin Vasile (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alin Vasile updated HTTPCLIENT-1120:
------------------------------------

    Attachment: req_abort_test.patch

Two test methods that currently fail, one for a conection timeout and one for a request aborted before sending it to the server. Didn't had time yet to trace the faults, but hopefully they will provide some hints.
                
> DefaultHttpRequestRetryHandler#retryRequest should not retry aborted requests
> -----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1120
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1120
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.2
>            Reporter: Sebb
>             Fix For: 4.1.3, 4.2 Alpha1
>
>         Attachments: patch.diff, req_abort_test.patch
>
>
> DefaultHttpRequestRetryHandler#retryRequest incorrectly retries aborted requests; I have seen the following log messages in JMeter:
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.SocketException) caught when processing request: socket closed
> org.apache.http.impl.client.DefaultHttpClient: Retrying request
> and
> org.apache.http.impl.client.DefaultHttpClient: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
> org.apache.http.impl.client.DefaultHttpClient: Retrying connect
> The abort() method sets the isAborted() flag, but the retry handler does not check it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org