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

SSLCertMonitor server-name parameter results in NPE

    XMLWordPrintable

    Details

    • Sprint:
      Horizon 2020 - May 13

      Description

      Using a service configuration like this seems to be broken in 25.0.0, it worked in 23.0.4

            <service name="SSL-Cert-HTTPS" interval="7200000" user-defined="false" status="on">
               <parameter key="retry" value="2"/>
               <parameter key="timeout" value="3000"/>
               <parameter key="port" value="443"/>
               <parameter key="days" value="30"/>
               <parameter key="server-name" value="${nodelabel}"/>
            </service>
      

      This results in the following NPE during parameter substitution:

      2019-10-09 10:37:38,771 ERROR [Poller-Thread-3-of-30] o.o.n.p.p.PollableServiceConfig: Unexpected exception while polling PollableService[location=Default, interface=PollableInterface [PollableNode [1]:a.b.c.d], svcName=SSL-Cert-HTTPS]. Marking service as DOWN
      java.lang.NullPointerException: null
              at java.util.regex.Matcher.getTextLength(Matcher.java:1283) ~[?:1.8.0_222]
              at java.util.regex.Matcher.reset(Matcher.java:309) ~[?:1.8.0_222]
              at java.util.regex.Matcher.<init>(Matcher.java:229) ~[?:1.8.0_222]
              at java.util.regex.Pattern.matcher(Pattern.java:1093) ~[?:1.8.0_222]
              at org.opennms.netmgt.poller.monitors.support.ParameterSubstitutingMonitor.parseString(ParameterSubstitutingMonitor.java:162) ~[org.opennms.features.poller.monitors.core-25.0.0.jar:?]
              at org.opennms.netmgt.poller.monitors.support.ParameterSubstitutingMonitor.lambda$getSubstitutedParameters$1(ParameterSubstitutingMonitor.java:113) ~[org.opennms.features.poller.monitors.core-25.0.0.jar:?]
              at java.util.HashMap.forEach(HashMap.java:1289) ~[?:1.8.0_222]
              at org.opennms.netmgt.poller.monitors.support.ParameterSubstitutingMonitor.getSubstitutedParameters(ParameterSubstitutingMonitor.java:110) ~[org.opennms.features.poller.monitors.core-25.0.0.jar:?]
              at org.opennms.netmgt.poller.monitors.support.ParameterSubstitutingMonitor.getRuntimeAttributes(ParameterSubstitutingMonitor.java:105) ~[org.opennms.features.poller.monitors.core-25.0.0.jar:?]
              at org.opennms.netmgt.poller.client.rpc.PollerRequestBuilderImpl.execute(PollerRequestBuilderImpl.java:177) ~[org.opennms.features.poller.client-rpc-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableServiceConfig.poll(PollableServiceConfig.java:135) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.poll(PollableService.java:190) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.poll(PollableElement.java:309) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer$5.run(PollableContainer.java:319) [opennms-services-25.0.0.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:240) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:227) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer.poll(PollableContainer.java:326) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableInterface.poll(PollableInterface.java:228) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer$5.run(PollableContainer.java:319) [opennms-services-25.0.0.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:240) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:227) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableContainer.poll(PollableContainer.java:326) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableNode$3.run(PollableNode.java:288) [opennms-services-25.0.0.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:240) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:227) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableNode.doPoll(PollableNode.java:291) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.doPoll(PollableElement.java:184) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.doPoll(PollableService.java:214) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService$PollRunner.run(PollableService.java:60) [opennms-services-25.0.0.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:276) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableElement.withTreeLock(PollableElement.java:259) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.doRun(PollableService.java:404) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.poller.pollables.PollableService.run(PollableService.java:379) [opennms-services-25.0.0.jar:?]
              at org.opennms.netmgt.scheduler.Schedule.run(Schedule.java:142) [org.opennms.core.daemon-25.0.0.jar:?]
              at org.opennms.netmgt.scheduler.Schedule$ScheduleEntry.run(Schedule.java:86) [org.opennms.core.daemon-25.0.0.jar:?]
              at org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:179) [org.opennms.core.daemon-25.0.0.jar:?]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
              at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124) [opennms-util-25.0.0.jar:?]
              at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
      

        Attachments

        1. poller.2.tar.xz
          4.37 MB
        2. screenshot-1.png
          screenshot-1.png
          72 kB
        3. screenshot-2.png
          screenshot-2.png
          92 kB

          Issue Links

            Activity

              People

              Assignee:
              patrick.schweizer Patrick Schweizer
              Reporter:
              pwo Pawel Worach
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: