The retry handler used with HttpClient is not going to do what we expect

Description

We usually expect to retry some operation if we receive a timeout from the request.

If we use the DefaultRetryHandler from the HttpClient library that is not going to happen because that handler is not catching ConnectTimeoutException and/or SocketTimeoutException. So, when any of those exception happen, the operation will be aborted and the HttpClient is not going to "try again". If we want to "try again" we must implement a custom RetryHandler.

For this reason only the "sequence-retry" is the only operation related with retries that is going to work on the PSM (or any other piece of code in OpenNMS that is using the DefaultRetryHandler with the HttpClient).

If we have a definition with only one page that is a correct workaround, but if we have several pages, it is too expensive to use a sequence-retry instead of a simple retry, because the sequence-retry is going to start over with the whole test (i.e., test all the pages again), and the single retry is at page level (i.e., on each HttpGet/HttpPost request).

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Seth Leger April 26, 2016 at 1:32 PM

This PR was merged for inclusion in 18. Marking as fixed.

commit f15c32c30b0029eb8829f8c78748b7cb7c9f94f0

Seth Leger April 20, 2016 at 4:32 PM

I ran into this issue while reviewing the PSM code. They've incorporated a change to the httpclient API that allows us to implement a handler like this very easily. I'll take care of this.

Alejandro Galue June 10, 2013 at 11:06 AM

I can confirm that the HttpCollector suffers the exact same problem:

PageSequenceMonitor:

HttpCollector:

Alejandro Galue June 10, 2013 at 10:53 AM
Edited

Here is something that should work in this case:

Fixed

Details

Assignee

Reporter

Labels

Affects versions

Priority

PagerDuty

Created June 10, 2013 at 10:50 AM
Updated April 26, 2016 at 1:32 PM
Resolved April 26, 2016 at 1:32 PM