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

NPE when starting bsmd

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 18.0.0, 18.0.1, 18.0.2
    • Fix Version/s: 18.0.3
    • Component/s: BSM
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Environment:
      jdk1.8.0_112
      PostgreSQL 9.5.4.2
      OpenNMS 18.0.2
      Windows 2012 R2
    • Sprint:
      Horizon - Nov 2nd

      Description

      From discuss list thread:

      All of my event definition customizations went in OK except when I tried to suppress alarms from uei.opennms.org/nodes/nodeLostService in opennms.events.xml. When I comment out or delete the alarm-data line, OpenNMS fails on startup with a BSMD exception.

      Here’s the original unmodified event definition:

        <event>
      
          <uei>uei.opennms.org/nodes/nodeLostService</uei>
      
          <event-label>OpenNMS-defined node event: nodeLostService</event-label>
      
          <descr>
      
            &lt;p&gt;A %service% outage was identified on interface
      
            %interface%.&lt;/p&gt; &lt;p&gt;A new Outage record has been
      
            created and service level availability calculations will be
      
            impacted until this outage is resolved.&lt;/p&gt;
      
          </descr>
      
          <logmsg dest="logndisplay">
      
            %service% outage identified on interface %interface% with reason code: %parm[eventReason]%.
      
          </logmsg>
      
          <severity>Minor</severity>
      
          <alarm-data reduction-key="%uei%:%dpname%:%nodeid%:%interface%:%service%" alarm-type="1" auto-clean="false"/>
      
        </event>
      

      When I delete or comment out the alarm-data line I get the following error in manager.log:

      2016-10-27 15:26:46,666 ERROR [Main] o.o.n.v.Invoker: An error occurred invoking operation start on MBean OpenNMS:Name=Bsmd
      
      javax.management.RuntimeMBeanException: java.lang.NullPointerException
      
                      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839) ~[?:1.8.0_112]
      
                      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852) ~[?:1.8.0_112]
      
                      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821) ~[?:1.8.0_112]
      
                      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) ~[?:1.8.0_112]
      
                      at org.opennms.netmgt.vmmgr.Invoker.invoke(Invoker.java:278) [org.opennms.core.daemon-18.0.2.jar:?]
      
                      at org.opennms.netmgt.vmmgr.Invoker.invokeMethods(Invoker.java:207) [org.opennms.core.daemon-18.0.2.jar:?]
      
                      at org.opennms.netmgt.vmmgr.Starter.start(Starter.java:154) [org.opennms.core.daemon-18.0.2.jar:?]
      
                      at org.opennms.netmgt.vmmgr.Starter.startDaemon(Starter.java:94) [org.opennms.core.daemon-18.0.2.jar:?]
      
                      at org.opennms.netmgt.vmmgr.Controller.start(Controller.java:173) [org.opennms.core.daemon-18.0.2.jar:?]
      
                      at org.opennms.netmgt.vmmgr.Controller.main(Controller.java:150) [org.opennms.core.daemon-18.0.2.jar:?]
      
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
      
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112]
      
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
      
                      at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
      
                      at org.opennms.bootstrap.Bootstrap$4.run(Bootstrap.java:460) [opennms_bootstrap.jar:?]
      
                      at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]
      
      Caused by: java.lang.NullPointerException
      
                      at org.opennms.netmgt.bsm.daemon.Bsmd.verifyReductionKey(Bsmd.java:197) ~[org.opennms.features.bsm.daemon-18.0.2.jar:?]
      
                      at org.opennms.netmgt.bsm.daemon.Bsmd.handleConfigurationChanged(Bsmd.java:175) ~[org.opennms.features.bsm.daemon-18.0.2.jar:?]
      
                      at org.opennms.netmgt.bsm.daemon.Bsmd.start(Bsmd.java:124) ~[org.opennms.features.bsm.daemon-18.0.2.jar:?]
      
                      at org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon$2.run(AbstractSpringContextJmxServiceDaemon.java:128) ~[org.opennms.core.daemon-18.0.2.jar:?]
      
                      at org.opennms.core.logging.Logging.withPrefix(Logging.java:70) ~[org.opennms.core.logging-18.0.2.jar:?]
      
                      at org.opennms.netmgt.daemon.AbstractSpringContextJmxServiceDaemon.start(AbstractSpringContextJmxServiceDaemon.java:118) ~[org.opennms.core.daemon-18.0.2.jar:?]
      
                      at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) ~[?:?]
      
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
      
                      at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
      
                      at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) ~[?:1.8.0_112]
      
                      at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source) ~[?:?]
      
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_112]
      
                      at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
      
                      at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) ~[?:1.8.0_112]
      
                      at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) ~[?:1.8.0_112]
      
                      at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) ~[?:1.8.0_112]
      
                      at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) ~[?:1.8.0_112]
      
                      at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) ~[?:1.8.0_112]
      
                      at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) ~[?:1.8.0_112]
      
                      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) ~[?:1.8.0_112]
      
                      ... 13 more
      

      I made other similar edits in opennms.events.xml and other event files and they work fine.

      I deleted and recreated the event definition from scratch to no avail.

      If I comment out the BSMD service entry in service-configuration.xml OpenNMS starts without a problem.

      If I leave the alarm enabled it works fine too.

        Attachments

          Activity

            People

            • Assignee:
              mvr Markus von Rüden
              Reporter:
              j-white Jesse White
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: