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

SNMP timeouts generate Unexpected exception warnings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 19.0.0, 19.0.1
    • Fix Version/s: 19.1.0
    • Component/s: Data Collection - SNMP
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Sprint:
      Horizon - March 29th, Horizon - April 5

      Description

      When SNMP collection fails due to an agent timeout, an event is generated with a "Unexpected exception when collecting SNMP data for interface XXX" exception.

      Before 19.0.0, the message was a clearer, indicating that a timeout had occured.

      We should update the relevant code to generate clearer messages, as they were before, particularly when collecting from devices at the default location.

      2017-03-16 17:12:12,484 WARN  [Collectd-Thread-29-of-150] o.o.n.c.CollectableService: run: failed collection for 5880/XXX.XXX.XXX.XXX/SNMP/BasicPackage
      2017-03-16 17:12:12,484 WARN  [Collectd-Thread-29-of-150] o.o.n.c.CollectableService: Unexpected exception when collecting SNMP data for interface XXX.XXX.XXX.XXX at location Default.
      org.opennms.netmgt.collectd.CollectionWarning: Unexpected exception when collecting SNMP data for interface XXX.XXX.XXX.XXX at location Default.
              at org.opennms.netmgt.collectd.SnmpCollectionSet.collect(SnmpCollectionSet.java:401) ~[opennms-services-19.0.1.jar:?]
              at org.opennms.netmgt.collectd.SnmpCollector.collect(SnmpCollector.java:333) ~[opennms-services-19.0.1.jar:?]
              at org.opennms.netmgt.collectd.CollectionSpecification.collect(CollectionSpecification.java:274) ~[opennms-services-19.0.1.jar:?]
              at org.opennms.netmgt.collectd.CollectableService.doCollection(CollectableService.java:398) ~[opennms-services-19.0.1.jar:?]
              at org.opennms.netmgt.collectd.CollectableService.doRun(CollectableService.java:337) [opennms-services-19.0.1.jar:?]
              at org.opennms.netmgt.collectd.CollectableService.access$200(CollectableService.java:69) [opennms-services-19.0.1.jar:?]
              at org.opennms.netmgt.collectd.CollectableService$1.run(CollectableService.java:315) [opennms-services-19.0.1.jar:?]
              at org.opennms.core.logging.Logging.withPrefix(Logging.java:71) [org.opennms.core.logging-19.0.1.jar:?]
              at org.opennms.netmgt.collectd.CollectableService.run(CollectableService.java:304) [opennms-services-19.0.1.jar:?]
              at org.opennms.netmgt.scheduler.LegacyScheduler$1.run(LegacyScheduler.java:179) [opennms-services-19.0.1.jar:?]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
              at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124) [opennms-util-19.0.1.jar:?]
              at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
      Caused by: java.util.concurrent.ExecutionException: java.lang.Exception: Timeout retrieving SnmpCollectors for XXX.XXX.XXX.XXX for / XXX.XXX.XXX.XXX: SnmpCollectors for XXX.XXX.XXX.XXX: snmpTimeoutError for: /XXX.XXX.XXX.XXX
              at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) ~[?:1.8.0_121]
              at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895) ~[?:1.8.0_121]
              at org.opennms.netmgt.collectd.SnmpCollectionSet.collect(SnmpCollectionSet.java:376) ~[opennms-services-19.0.1.jar:?]
              ... 13 more
      Caused by: java.lang.Exception: Timeout retrieving SnmpCollectors for XXX.XXX.XXX.XXX for /XXX.XXX.XXX.XXX: SnmpCollectors for XXX.XXX.XXX.XXX: snmpTimeoutError for: /XXX.XXX.XXX.XXX
              at org.opennms.netmgt.snmp.SnmpWalker.finish(SnmpWalker.java:173) ~[org.opennms.core.snmp.api-19.0.1.jar:?]
              at org.opennms.netmgt.snmp.SnmpWalker.processError(SnmpWalker.java:161) ~[org.opennms.core.snmp.api-19.0.1.jar:?]
              at org.opennms.netmgt.snmp.SnmpWalker.handleTimeout(SnmpWalker.java:151) ~[org.opennms.core.snmp.api-19.0.1.jar:?]
              at org.opennms.netmgt.snmp.snmp4j.Snmp4JWalker.access$1300(Snmp4JWalker.java:48) ~[org.opennms.core.snmp.implementations.snmp4j-19.0.1.jar:?]
              at org.opennms.netmgt.snmp.snmp4j.Snmp4JWalker$Snmp4JResponseListener.onResponse(Snmp4JWalker.java:174) ~[org.opennms.core.snmp.implementations.snmp4j-19.0.1.jar:?]
              at org.snmp4j.Snmp$PendingRequest.run(Snmp.java:1828) ~[org.opennms.core.snmp.implementations.snmp4j-19.0.1.jar:?]
              at java.util.TimerThread.mainLoop(Timer.java:555) ~[?:1.8.0_121]
              at java.util.TimerThread.run(Timer.java:505) ~[?:1.8.0_121]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                j-white Jesse White
                Reporter:
                j-white Jesse White
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: