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

Enlinkd CDP code fails to parse hex-encoded IP address string

    Details

      Description

      Here's a very strange stack trace from the CDP code:

      2015-09-01 22:59:33,476 WARN  [DefaultUDPTransportMapping_0.0.0.0/0] o.o.n.s.TableTracker: Failed to process response
      java.lang.NumberFormatException: For input string: "3135382e33352e3132302e313233"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.7.0_75]
              at java.lang.Long.parseLong(Long.java:444) ~[?:1.7.0_75]
              at org.opennms.core.utils.InetAddressUtils.getIpAddressByHexString(InetAddressUtils.java:522) ~[opennms-util-2015.1.0.jar:?]
              at org.opennms.netmgt.enlinkd.snmp.CdpCacheTableTracker$CdpCacheRow.getCdpCacheIpv4Address(CdpCacheTableTracker.java:166) ~[opennms-services-2015.1.0.jar:?]
              at org.opennms.netmgt.enlinkd.snmp.CdpCacheTableTracker$CdpCacheRow.getLink(CdpCacheTableTracker.java:209) ~[opennms-services-2015.1.0.jar:?]
              at org.opennms.netmgt.enlinkd.NodeDiscoveryCdp$1.processCdpCacheRow(NodeDiscoveryCdp.java:115) ~[opennms-services-2015.1.0.jar:?]
              at org.opennms.netmgt.enlinkd.snmp.CdpCacheTableTracker.rowCompleted(CdpCacheTableTracker.java:244) ~[opennms-services-2015.1.0.jar:?]
              at org.opennms.netmgt.snmp.SnmpTableResult.handleCompleteRows(SnmpTableResult.java:99) ~[org.opennms.core.snmp.api-2015.1.0.jar:?]
              at org.opennms.netmgt.snmp.SnmpTableResult.storeResult(SnmpTableResult.java:75) ~[org.opennms.core.snmp.api-2015.1.0.jar:?]
      

      It looks like the value is a hex representation of the ASCII IP address string.

        Attachments

          Activity

            People

            • Assignee:
              rssntn67 Antonio Russo
              Reporter:
              seth Seth Leger
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: