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

LLDP Failure for non ifIndex references

    XMLWordPrintable

    Details

      Description

      It appears that the LLDP code does not have the abilities to resolve non-ifIndex interface references? Apologies if it does and this is a fringe case that needs to be handled.

      Here is the exception from output.log

      Exception in thread "Scheduler-Thread-3-of-5" java.lang.NumberFormatException: For input string: "Eth1/2"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:492)
      at java.lang.Integer.parseInt(Integer.java:527)
      at org.opennms.netmgt.linkd.AbstractQueryManager.getLldpRemIfIndex(AbstractQueryManager.java:348)
      at org.opennms.netmgt.linkd.AbstractQueryManager.processLldp(AbstractQueryManager.java:311)
      at org.opennms.netmgt.linkd.HibernateEventWriter.storeSnmpCollection(HibernateEventWriter.java:219)
      at org.opennms.netmgt.linkd.HibernateEventWriter$$FastClassByCGLIB$$3a4c15a2.invoke(<generated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
      at org.opennms.netmgt.linkd.HibernateEventWriter$$EnhancerByCGLIB$$1e73f412.storeSnmpCollection(<generated>)
      at org.opennms.netmgt.linkd.Linkd.updateNodeSnmpCollection(Linkd.java:758)
      at org.opennms.netmgt.linkd.SnmpCollection.runCollection(SnmpCollection.java:681)
      at org.opennms.netmgt.linkd.SnmpCollection.run(SnmpCollection.java:390)
      at org.opennms.netmgt.linkd.scheduler.Scheduler$1.run(Scheduler.java:203)
      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:722)

      Eth1/2 is for sure not an ifIndex reference.

      Looking in AbstractQueryManager.java:

      case LldpMibConstants.LLDP_PORTID_SUBTYPE_INTERFACENAME: ifindex=getFromSysnameIfName(lldpRemTableEntry.getLldpRemSysname(), lldpRemTableEntry.getLldpRemPortid());

      We still attempt to get a Port ID for an interface name.

      LldpRemTableEntry.java:

      public Integer getLldpRemPortidSubtype()

      { return getInt32(LLDP_REM_PORTID_SUBTYPE_ALIAS); }

      Which is where our exception is thrown.

        Attachments

          Activity

            People

            Assignee:
            rssntn67 Antonio Russo
            Reporter:
            ansoni Anthony Johnson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: