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

LoadingTopology from db result in NPE

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 19.1.0
    • Fix Version/s: 20.0.1
    • Component/s: Enhanced Linkd / Linkd
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      Exception in thread "EnhancedLinkd-Thread-4-of-5" java.lang.NullPointerException
      at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology$BridgeTopologyHelper.<init>(NodeDiscoveryBridgeTopology.java:114)
      at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:818)
      at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:746)
      at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.run(NodeDiscoveryBridgeTopology.java:639)
      at org.opennms.netmgt.enlinkd.scheduler.Scheduler$1.run(Scheduler.java:187)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124)
      at java.lang.Thread.run(Thread.java:748)
      Exception in thread "EnhancedLinkd-Thread-5-of-5" java.lang.NullPointerException
      at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology$BridgeTopologyHelper.<init>(NodeDiscoveryBridgeTopology.java:114)
      at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:818)
      at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:746)
      at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.run(NodeDiscoveryBridgeTopology.java:639)
      at org.opennms.netmgt.enlinkd.scheduler.Scheduler$1.run(Scheduler.java:187)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124)
      at java.lang.Thread.run(Thread.java:748)
      Exception in thread "EnhancedLinkd-Thread-6-of-5" java.lang.StackOverflowError
      at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:187)
      at org.opennms.netmgt.model.OnmsNode_$$jvstefa_33.getId(OnmsNode$$_jvstefa_33.java)
      at org.opennms.netmgt.model.topology.SharedSegment.getBridgeIdsOnSegment(SharedSegment.java:284)
      at org.opennms.netmgt.model.topology.BroadcastDomain.getSharedSegmentOnTopologyForBridge(BroadcastDomain.java:235)
      at org.opennms.netmgt.model.topology.BroadcastDomain.tier(BroadcastDomain.java:294)
      at org.opennms.netmgt.model.topology.BroadcastDomain.tier(BroadcastDomain.java:298)
      at org.opennms.netmgt.model.topology.BroadcastDomain.tier(BroadcastDomain.java:298)

        Activity

        Hide
        rssntn67 Antonio Russo added a comment -

        Exception in thread "EnhancedLinkd-Thread-3-of-5" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology$BridgeTopologyHelper.<init>(NodeDiscoveryBridgeTopology.java:163)
        at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:818)
        at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:779)
        at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.run(NodeDiscoveryBridgeTopology.java:639)
        at org.opennms.netmgt.enlinkd.scheduler.Scheduler$1.run(Scheduler.java:187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124)
        at java.lang.Thread.run(Thread.java:748)

        Show
        rssntn67 Antonio Russo added a comment - Exception in thread "EnhancedLinkd-Thread-3-of-5" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology$BridgeTopologyHelper.<init>(NodeDiscoveryBridgeTopology.java:163) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:818) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:779) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.run(NodeDiscoveryBridgeTopology.java:639) at org.opennms.netmgt.enlinkd.scheduler.Scheduler$1.run(Scheduler.java:187) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124) at java.lang.Thread.run(Thread.java:748)
        Hide
        rssntn67 Antonio Russo added a comment -

        The cause for this is related to the fact that from the broadcast domain loaded from database there is not Bridge root.
        While a bridge root is always set o bridge domain it must be properly calculated

        Show
        rssntn67 Antonio Russo added a comment - The cause for this is related to the fact that from the broadcast domain loaded from database there is not Bridge root. While a bridge root is always set o bridge domain it must be properly calculated
        Hide
        rssntn67 Antonio Russo added a comment -
        Show
        rssntn67 Antonio Russo added a comment - https://github.com/OpenNMS/opennms/pull/1521 Created a pull request
        Hide
        rssntn67 Antonio Russo added a comment -

        Other problem detectted...

        Exception in thread "EnhancedLinkd-Thread-5-of-5" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:653)
        at java.util.ArrayList.get(ArrayList.java:429)
        at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology$BridgeTopologyHelper.<init>(NodeDiscoveryBridgeTopology.java:171)
        at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.findBridgesTopo(NodeDiscoveryBridgeTopology.java:905)
        at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:859)
        at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:787)
        at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.run(NodeDiscoveryBridgeTopology.java:666)
        at org.opennms.netmgt.enlinkd.scheduler.Scheduler$1.run(Scheduler.java:187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124)
        at java.lang.Thread.run(Thread.java:748)

        Show
        rssntn67 Antonio Russo added a comment - Other problem detectted... Exception in thread "EnhancedLinkd-Thread-5-of-5" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology$BridgeTopologyHelper.<init>(NodeDiscoveryBridgeTopology.java:171) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.findBridgesTopo(NodeDiscoveryBridgeTopology.java:905) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:859) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.calculate(NodeDiscoveryBridgeTopology.java:787) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.run(NodeDiscoveryBridgeTopology.java:666) at org.opennms.netmgt.enlinkd.scheduler.Scheduler$1.run(Scheduler.java:187) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124) at java.lang.Thread.run(Thread.java:748)
        Hide
        rssntn67 Antonio Russo added a comment -

        Checked the log and the problem seems to be the calculation.
        The first time you got the bridge address of the node...when calculating again the bridge address of the switch is lost...and the calculation is not perfomed.

        Show
        rssntn67 Antonio Russo added a comment - Checked the log and the problem seems to be the calculation. The first time you got the bridge address of the node...when calculating again the bridge address of the switch is lost...and the calculation is not perfomed.
        Hide
        rssntn67 Antonio Russo added a comment -

        Found and try to fix tyhe following exception

        Exception in thread "EnhancedLinkd-Thread-3-of-5" java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437)
        at java.util.HashMap$KeyIterator.next(HashMap.java:1461)
        at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.run(NodeDiscoveryBridgeTopology.java:614)
        at org.opennms.netmgt.enlinkd.scheduler.Scheduler$1.run(Scheduler.java:187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124)
        at java.lang.Thread.run(Thread.java:748)

        Show
        rssntn67 Antonio Russo added a comment - Found and try to fix tyhe following exception Exception in thread "EnhancedLinkd-Thread-3-of-5" java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437) at java.util.HashMap$KeyIterator.next(HashMap.java:1461) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridgeTopology.run(NodeDiscoveryBridgeTopology.java:614) at org.opennms.netmgt.enlinkd.scheduler.Scheduler$1.run(Scheduler.java:187) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124) at java.lang.Thread.run(Thread.java:748)
        Hide
        rssntn67 Antonio Russo added a comment -

        Merged in foundation-2017 closed pull request

        Show
        rssntn67 Antonio Russo added a comment - Merged in foundation-2017 closed pull request

          People

          • Assignee:
            rssntn67 Antonio Russo
            Reporter:
            rssntn67 Antonio Russo
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development