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

IllegalArgumentException on ipnettomediatable

    Details

      Description

      java.lang.IllegalArgumentException: "Cannot decode MAC address"

      Method normalizeMacAddress can't handle empty values.
      Each function calling normalizeMacAddress must handle invalid values before calling normalizeMacAddress.

      The warning occurs in during adding links to the cdpLink table

      "ERROR: Value too long for type character varying(96)""
      
      2015-01-20 15:14:12,631 WARN [DefaultUDPTransportMapping_0.0.0.0/0] o.o.n.e.s.IpNetToMediaTableTracker: IllegalArgument on ipnettomediatable
      java.lang.IllegalArgumentException: Cannot decode MAC address: ''
      at org.opennms.core.utils.InetAddressUtils.macAddressStringToBytes(InetAddressUtils.java:455) ~[opennms-util-14.0.3.jar:?]
      at org.opennms.core.utils.InetAddressUtils.normalizeMacAddress(InetAddressUtils.java:484) ~[opennms-util-14.0.3.jar:?]
      at org.opennms.netmgt.enlinkd.snmp.IpNetToMediaTableTracker$IpNetToMediaRow.getIpNetToMediaPhysAddress(IpNetToMediaTableTracker.java:148) [opennms-services-14.0.3.jar:?]
      
      2015-01-20 15:14:34,570 WARN [DefaultUDPTransportMapping_0.0.0.0/0] o.h.u.JDBCExceptionReporter: SQL Error: 0, SQLState: 22001
      2015-01-20 15:14:34,571 ERROR [DefaultUDPTransportMapping_0.0.0.0/0] o.h.u.JDBCExceptionReporter: FEHLER: Wert zu lang f?r Typ character varying(96)
      2015-01-20 15:14:34,573 WARN [DefaultUDPTransportMapping_0.0.0.0/0] o.o.n.s.TableTracker: Failed to process response
      org.springframework.dao.DataIntegrityViolationException: could not insert: [org.opennms.netmgt.model.CdpLink]; SQL [insert into cdpLink (cdpCacheAddress, cdpCacheAddressType, cdpCacheDeviceId, cdpCacheDevicePlatform, cdpCacheDevicePort, cdpCacheIfIndex, cdpCacheVersion, cdpInterfaceName, cdpLinkCreateTime, cdpLinkLastPollTime, nodeId, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.DataException: could not insert: [org.opennms.netmgt.model.CdpLink]
      

        Attachments

          Activity

            People

            • Assignee:
              ranger Benjamin Reed
              Reporter:
              indigo Ronny Trommer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: