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

The Upgrade Tools are throwing a NPE when a JMX service is not configured properly on collectd-configuration.xml



    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.12.5
    • 1.12.6
    • Command-Line Tools
    • Security Level: Default (Default Security Scheme)


      A customer was upgrading his OpenNMS server to 1.12.5, and found the following problem:

      OpenNMS Installer
      Configures PostgreSQL tables, users, and other miscellaneous settings.
      - searching for libjicmp.so:
      - trying to load /usr/lib64/libjicmp.so: OK
      - searching for libjicmp6.so:
      - trying to load /usr/lib64/libjicmp6.so: OK
      - searching for libjrrd.so:
      - trying to load /usr/lib64/libjrrd.so: OK
      * using 'opennmsadmin' as the PostgreSQL user for OpenNMS
      * using 'opennms' as the PostgreSQL database name for OpenNMS
      - checking if database "opennms" is unicode... ALREADY UNICODE
      - Checking for old import files in /opt/opennms/etc... DONE
      - checking if iplike is usable... YES
      - checking if iplike supports IPv6... YES
      - checking for stale eventtime.so references... OK
      Installer completed successfully!
      OpenNMS Upgrader
      OpenNMS is currently stopped
      Found upgrade task SnmpInterfaceRrdMigratorOnline
      Found upgrade task JmxRrdMigratorOffline
      Found upgrade task RequisitionsMigratorOffline
      Processing RequisitionsMigratorOffline: Remove non-ip-snmp-primary and
      non-ip-interfaces from requisitions: NMS-5630, NMS-5571
      Task RequisitionsMigratorOffline has been executed at Thu Mar 13 10:53:13 CDT 2014
      Processing SnmpInterfaceRrdMigratorOnline: Merge SNMP Interface directories (Online Version): NMS-6056
      Task SnmpInterfaceRrdMigratorOnline requires OpenNMS is running but it is stopped (ignoring)
      Processing JmxRrdMigratorOffline: Fix the JRB names for the new JMX Collector: NMS-1539, NMS-3485, NMS-4592, NMS-4612, NMS-5247, NMS-5279, NMS-5824
      - Running pre-execution phase
      OpenNMS Home: /opt/opennms
      OpenNMS Version: 1.12.5
      Is RRDtool enabled? false
      Is storeByGroup enabled? false
      RRD Extension: .jrb
      RRD Strategy: org.opennms.netmgt.rrd.jrobin.JRobinRrdStrategy
      JMX services found: [OpenNMS-JVM, jvm-activeguard, jvm-lava, jvm-portal, jvm-mapr, jvm-mapr-cldb]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.opennms.bootstrap.Bootstrap$3.run(Bootstrap.java:362)
      at java.lang.Thread.run(Thread.java:679)
      Caused by: java.lang.NullPointerException
      at org.opennms.upgrade.implementations.JmxRrdMigratorOffline.getSvcPropertyValue(JmxRrdMigratorOffline.java:612)
      at org.opennms.upgrade.implementations.JmxRrdMigratorOffline.getJmxResourceDirectories(JmxRrdMigratorOffline.java:373)
      at org.opennms.upgrade.implementations.JmxRrdMigratorOffline.preExecute(JmxRrdMigratorOffline.java:135)
      at org.opennms.upgrade.support.Upgrade.executeUpgrade(Upgrade.java:138)
      at org.opennms.upgrade.support.Upgrade.execute(Upgrade.java:242)
      at org.opennms.upgrade.support.Upgrade.main(Upgrade.java:260)

      Analyzing the code it seems that the customer has some service definition on collectd-configuration.xml that doesn't have a "friendly-name" parameter which is required to figure it out the RRD paths for the JMX files.




            agalue Alejandro Galue
            agalue Alejandro Galue
            0 Vote for this issue
            1 Start watching this issue