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

NPE in IpInterfaceScan when processing IPLike rule with IPv6 address

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 18.0.2, Meridian-2016.1.3, 18.0.3
    • Fix Version/s: 19.0.1, Meridian-2016.1.5
    • Component/s: None
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None
    • Sprint:
      Horizon - Feb 8th, Horizon - Feb 15th

      Description

      The following error message was found in provisiond.log:

      2016-12-02 16:24:35,501 WARN  [scanExecutor-8] o.a.c.j.JexlEngine: org.opennms.netmgt.provision.service.IpInterfaceScan.isIpMatching@226![7,35]: 'iplike.matc$
      es(ipaddr, '127.0.0.1');' method invocation error
      java.lang.IllegalArgumentException: Malformatted IPLIKE match expression: 127.0.0.1
              at org.opennms.core.utils.IPLike.matches(IPLike.java:113) ~[org.opennms.core.lib-19.0.0-SNAPSHOT.jar:?]
              at sun.reflect.GeneratedMethodAccessor857.invoke(Unknown Source) ~[?:?]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_60]
              at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_60]
              at org.apache.commons.jexl2.internal.MethodExecutor.execute(MethodExecutor.java:64) ~[commons-jexl-2.1.1.jar:2.1.1]
              at org.apache.commons.jexl2.internal.AbstractExecutor$Method.invoke(AbstractExecutor.java:327) ~[commons-jexl-2.1.1.jar:2.1.1]
              at org.apache.commons.jexl2.Interpreter.call(Interpreter.java:1068) [commons-jexl-2.1.1.jar:2.1.1]
              at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1100) [commons-jexl-2.1.1.jar:2.1.1]
              at org.apache.commons.jexl2.parser.ASTMethodNode.jjtAccept(ASTMethodNode.java:18) [commons-jexl-2.1.1.jar:2.1.1]
              at org.apache.commons.jexl2.Interpreter.visit(Interpreter.java:1317) [commons-jexl-2.1.1.jar:2.1.1]
              at org.apache.commons.jexl2.parser.ASTReference.jjtAccept(ASTReference.java:18) [commons-jexl-2.1.1.jar:2.1.1]
              at org.apache.commons.jexl2.Interpreter.interpret(Interpreter.java:232) [commons-jexl-2.1.1.jar:2.1.1]
              at org.apache.commons.jexl2.ExpressionImpl.evaluate(ExpressionImpl.java:65) [commons-jexl-2.1.1.jar:2.1.1]
              at org.opennms.netmgt.provision.service.IpInterfaceScan.isIpMatching(IpInterfaceScan.java:230) [opennms-provisiond-19.0.0-SNAPSHOT.jar:?]
              at org.opennms.netmgt.provision.service.IpInterfaceScan.shouldDetect(IpInterfaceScan.java:220) [opennms-provisiond-19.0.0-SNAPSHOT.jar:?]
              at org.opennms.netmgt.provision.service.IpInterfaceScan.run(IpInterfaceScan.java:206) [opennms-provisiond-19.0.0-SNAPSHOT.jar:?]
              at org.opennms.core.tasks.TaskBuilder$1.run(TaskBuilder.java:150) [org.opennms.core.tasks-19.0.0-SNAPSHOT.jar:?]
              at org.opennms.core.tasks.SyncTask.run(SyncTask.java:88) [org.opennms.core.tasks-19.0.0-SNAPSHOT.jar:?]
              at org.opennms.core.tasks.SyncTask.access$000(SyncTask.java:41) [org.opennms.core.tasks-19.0.0-SNAPSHOT.jar:?]
              at org.opennms.core.tasks.SyncTask$1.run(SyncTask.java:100) [org.opennms.core.tasks-19.0.0-SNAPSHOT.jar:?]
              at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626) [?:1.8.0_60]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_60]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_60]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_60]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_60]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_60]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_60]
              at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]
      2016-12-02 16:24:35,506 ERROR [scanExecutor-8] o.o.n.p.s.IpInterfaceScan: Can't process rule '127.0.0.1' while checking IP 2600:5800:f2a2:2:fc1f:46ff:fe9b:f9$3/2600:5800:f2a2:2:fc1f:46ff:fe9b:f953 because java.lang.NullPointerException
      

      This occurred while running snapshots from release-19.0.0, but I suspect that older versions are affected too.

        Attachments

          Activity

            People

            • Assignee:
              fooker Dustin Frisch
              Reporter:
              j-white Jesse White
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: