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

NullPointerException in collectd.log

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.12.1
    • Fix Version/s: 1.12.2
    • Component/s: Data Collection - SNMP
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      I've been chasing down a strange NullPointerException that's been occurring in my collectd.log:

      2013-10-11 18:53:05,112 ERROR [Collectd-Thread-66-of-100] CollectableService: Unexpected error during node SNMP collection for: XXX.XXX.XXX.XXX: java.lang.NullPointerException
      org.opennms.netmgt.collectd.CollectionException: Unexpected error during node SNMP collection for: XXX.XXX.XXX.XXX: java.lang.NullPointerException
      at org.opennms.netmgt.collectd.SnmpCollector.collect(SnmpCollector.java:351)
      at org.opennms.netmgt.collectd.CollectionSpecification.collect(CollectionSpecification.java:264)
      at org.opennms.netmgt.collectd.CollectableService.doCollection(CollectableService.java:372)
      at org.opennms.netmgt.collectd.CollectableService.run(CollectableService.java:303)
      at org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:200)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:107)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: java.lang.NullPointerException

      I've looked at my configuration and realized that these errors are for snmp-collections that include no datacollectionGroups.

      <snmp-collection name="SolarisGlobalExtra" snmpStorageFlag="select">
      <rrd step="300">
      <rra>RRA:AVERAGE:0.5:1:8928</rra>
      <rra>RRA:AVERAGE:0.5:12:10992</rra>
      <rra>RRA:MAX:0.5:12:10992</rra>
      <rra>RRA:MIN:0.5:12:10992</rra>
      </rrd>
      </snmp-collection>

      So tracking this down shows that inside DefaultDataCollectionConfigDao there is a missed case where it does not guard against getSystems() returning null.

        Attachments

          Activity

            People

            • Assignee:
              ronald.roskens@biworldwide.com Ron Roskens
              Reporter:
              ronald.roskens@biworldwide.com Ron Roskens
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: