PageSequenceMonitor sometimes gives poor failure reasons

Description

The events/alarms created have I/O Error as the reason when a better reason would be in the "Caused By" portion of the exception:

2016-01-27 12:37:35,062 DEBUG [SwingWorker-pool-4-thread-2] o.o.n.p.m.PageSequenceMonitor: I/O Error
org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186) ~[httpclient.jar:4.3.6]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) ~[httpclient.jar:4.3.6]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) ~[httpclient.jar:4.3.6]
at org.opennms.core.web.HttpClientWrapper.execute(HttpClientWrapper.java:326) ~[org.opennms.core.web.jar:?]
at org.opennms.netmgt.poller.monitors.PageSequenceMonitor$HttpPage.execute(PageSequenceMonitor.java:374) [opennms-services.jar:?]
at org.opennms.netmgt.poller.monitors.PageSequenceMonitor$HttpPageSequence.execute(PageSequenceMonitor.java:200) [opennms-services.jar:?]
at org.opennms.netmgt.poller.monitors.PageSequenceMonitor$HttpPageSequence.access$100(PageSequenceMonitor.java:158) [opennms-services.jar:?]
at org.opennms.netmgt.poller.monitors.PageSequenceMonitor.poll(PageSequenceMonitor.java:678) [opennms-services.jar:?]
at org.opennms.netmgt.poller.remote.DefaultPollService.poll(DefaultPollService.java:89) [org.opennms.features.poller.remote.jar:?]
at org.opennms.netmgt.poller.remote.support.ScanReportPollerFrontEnd.doPoll(ScanReportPollerFrontEnd.java:506) [org.opennms.features.poller.remote.jar:?]
at org.opennms.netmgt.poller.remote.support.ScanReportPollerFrontEnd.performServiceScans(ScanReportPollerFrontEnd.java:460) [org.opennms.features.poller.remote.jar:?]
at org.opennms.netmgt.poller.remote.support.ScanReportPollerFrontEnd.access$700(ScanReportPollerFrontEnd.java:80) [org.opennms.features.poller.remote.jar:?]
at org.opennms.netmgt.poller.remote.support.ScanReportPollerFrontEnd$Registering.register(ScanReportPollerFrontEnd.java:146) [org.opennms.features.poller.remote.jar:?]
at org.opennms.netmgt.poller.remote.support.ScanReportPollerFrontEnd.register(ScanReportPollerFrontEnd.java:344) [org.opennms.features.poller.remote.jar:?]
at org.opennms.poller.remote.FrontEndInvoker.doInBackground(FrontEndInvoker.java:47) [org.opennms.features.remote-poller.jar:?]
at org.opennms.poller.remote.FrontEndInvoker.doInBackground(FrontEndInvoker.java:15) [org.opennms.features.remote-poller.jar:?]
at javax.swing.SwingWorker$1.call(SwingWorker.java:295) [?:1.8.0_71]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_71]
at javax.swing.SwingWorker.run(SwingWorker.java:334) [?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_71]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_71]
Caused by: org.apache.http.client.CircularRedirectException: Circular redirect to 'http://www.pitneybowes.com/us'
at org.apache.http.impl.client.DefaultRedirectStrategy.getLocationURI(DefaultRedirectStrategy.java:174) ~[httpclient.jar:4.3.6]
at org.apache.http.impl.client.DefaultRedirectStrategy.getRedirect(DefaultRedirectStrategy.java:217) ~[httpclient.jar:4.3.6]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:119) ~[httpclient.jar:4.3.6]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) ~[httpclient.jar:4.3.6]
... 21 more

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Jesse White April 21, 2016 at 1:45 PM

Seth Leger April 20, 2016 at 3:24 PM

The PSM isn't unwrapping the IOExceptions thrown by the HTTP library which would lead to better error messages. If I'm reading the code properly, it is also breaking retries. I'm going to work on this now.

David Hustace March 24, 2016 at 10:03 AM

I'm not worried about the redirection issue, I simply wanted the monitor to return a better reason in the poll results.

Alejandro Galue February 25, 2016 at 3:03 PM

I've seen this before, even on older versions of OpenNMS, so this is not an issue of 17; it is an issue with Apache HttpClient, in my opinion.

Fixed

Details

Assignee

Reporter

Components

Affects versions

Priority

PagerDuty

Created January 27, 2016 at 12:42 PM
Updated April 21, 2016 at 5:45 PM
Resolved April 21, 2016 at 1:45 PM