Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-8864

HttpPostMonitor logs exception when banner is not defined.

    XMLWordPrintable

    Details

      Description

      I added a HttpPostMonitor to poller-configuration.xml and am getting various exceptions in poller.log:

      I started with this entry:

          <service name="OpenNMS-HTTP" interval="300000" user-defined="false" status="on">
            <parameter key="retry" value="1" />
            <parameter key="timeout" value="3000" />
            <parameter key="port" value="8980" />
            <parameter key="url" value="/" />
            <parameter key="payload" value="Hello=World" />
            <parameter key="rrd-repository" value="/opt/opennms/share/rrd/response" />
            <parameter key="rrd-base-name" value="opennms-http" />
            <parameter key="ds-name" value="opennms-http" />
          </service>
      

      And got this exception:

      2016-09-24 12:50:42,600 DEBUG [Poller-Thread-24-of-30] o.o.n.p.m.HttpPostMonitor: Exception: null
      java.lang.NullPointerException
              at org.opennms.netmgt.poller.monitors.HttpPostMonitor.poll(HttpPostMonitor.java:232) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.LatencyStoringServiceMonitorAdaptor.poll(LatencyStoringServiceMonitorAdaptor.java:115) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableServiceConfig.poll(PollableServiceConfig.java:119) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.poll(PollableService.java:191) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.poll(PollableElement.java:293) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer$5.run(PollableContainer.java:319) [opennms-services-18.0.2.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_102]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:264) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:250) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:228) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer.poll(PollableContainer.java:326) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableInterface.poll(PollableInterface.java:224) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer$5.run(PollableContainer.java:319) [opennms-services-18.0.2.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_102]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:264) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:250) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:228) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer.poll(PollableContainer.java:326) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableNode$3.run(PollableNode.java:329) [opennms-services-18.0.2.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_102]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:264) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:250) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:228) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableNode.doPoll(PollableNode.java:332) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.doPoll(PollableElement.java:184) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.doPoll(PollableService.java:226) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService$PollRunner.run(PollableService.java:63) [opennms-services-18.0.2.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_102]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:264) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:250) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.doRun(PollableService.java:413) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.run(PollableService.java:388) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.scheduler.Schedule.run(Schedule.java:142) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.scheduler.Schedule$ScheduleEntry.run(Schedule.java:86) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:209) [opennms-services-18.0.2.jar:?]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_102]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_102]
              at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124) [opennms-util-18.0.2.jar:?]
              at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]
      

      I added an entry for banner:

           <parameter key="banner" value="" />
      

      And got a different exception:

      2016-09-24 13:20:18,225 DEBUG [Poller-Thread-4-of-30] o.o.n.p.m.HttpPostMonitor: Exception: String index out of range: 0
      java.lang.StringIndexOutOfBoundsException: String index out of range: 0
              at java.lang.String.charAt(String.java:658) ~[?:1.8.0_102]
              at org.opennms.netmgt.poller.monitors.HttpPostMonitor.poll(HttpPostMonitor.java:232) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.LatencyStoringServiceMonitorAdaptor.poll(LatencyStoringServiceMonitorAdaptor.java:115) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableServiceConfig.poll(PollableServiceConfig.java:119) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.poll(PollableService.java:191) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.poll(PollableElement.java:293) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer$5.run(PollableContainer.java:319) [opennms-services-18.0.2.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_102]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:264) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:250) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:228) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer.poll(PollableContainer.java:326) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableInterface.poll(PollableInterface.java:224) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer$5.run(PollableContainer.java:319) [opennms-services-18.0.2.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_102]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:264) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:250) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:228) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer.poll(PollableContainer.java:326) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableNode$3.run(PollableNode.java:329) [opennms-services-18.0.2.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_102]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:264) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:250) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:228) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableNode.doPoll(PollableNode.java:332) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.doPoll(PollableElement.java:184) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.doPoll(PollableService.java:226) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService$PollRunner.run(PollableService.java:63) [opennms-services-18.0.2.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_102]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:264) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:250) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.doRun(PollableService.java:413) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.run(PollableService.java:388) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.scheduler.Schedule.run(Schedule.java:142) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.scheduler.Schedule$ScheduleEntry.run(Schedule.java:86) [opennms-services-18.0.2.jar:?]
              at org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:209) [opennms-services-18.0.2.jar:?]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_102]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_102]
              at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124) [opennms-util-18.0.2.jar:?]
              at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]
      

        Attachments

          Activity

            People

            • Assignee:
              mvr Markus von RĂ¼den
              Reporter:
              ronald.roskens@biworldwide.com Ron Roskens
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: