Error compiling IP-MIB

Problem:
When trying to Generate Data Collection for IP-MIB.mib in GUI SNMP MIB Compiler I get this error:

2022-05-13T09:49:10+02:00 [INFO] Reading MIBs from /usr/share/opennms/share/mibs
2022-05-13T09:50:01+02:00 [INFO] Uploading IP-MIB.mib
2022-05-13T09:50:04+02:00 [INFO] File IP-MIB.mib successfuly uploaded
2022-05-13T09:50:24+02:00 [INFO] The file editing has been canceled.
2022-05-13T09:50:26+02:00 [INFO] Parsing MIB file /usr/share/opennms/share/mibs/pending/IP-MIB.mib
2022-05-13T09:50:28+02:00 [INFO] MIB parsed successfuly.
2022-05-13T09:50:28+02:00 [INFO] Renaming file IP-MIB.mib to IP-MIB.mib
2022-05-13T09:50:35+02:00 [INFO] Parsing MIB file /usr/share/opennms/share/mibs/compiled/IP-MIB.mib
2022-05-13T09:50:36+02:00 [INFO] MIB parsed successfuly.
2022-05-13T09:50:43+02:00 [ERROR] class org.opennms.core.xml.MarshallingResourceFailureException: Failed to marshal/unmarshal XML file while marshalling DatacollectionGroup: javax.xml.bind.MarshalException - with linked exception: [Exception [EclipseLink-25003] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException Exception Description: An error occurred marshalling the object Internal Exception: org.eclipse.persistence.oxm.record.ValidatingMarshalRecord$MarshalSAXParseException; cvc-pattern-valid: Value ‘ipaddress’ is not facet-valid with respect to pattern ‘(Cc(32|64)?|Gg(32|64)?|TtTt|Ii(32|64)?|OoSs)|Ss|HhSs’ for type ‘#AnonType_typemibObj’.]; nested exception is javax.xml.bind.MarshalException - with linked exception: [Exception [EclipseLink-25003] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException Exception Description: An error occurred marshalling the object Internal Exception: org.eclipse.persistence.oxm.record.ValidatingMarshalRecord$MarshalSAXParseException; cvc-pattern-valid: Value ‘ipaddress’ is not facet-valid with respect to pattern ‘(Cc(32|64)?|Gg(32|64)?|TtTt|Ii(32|64)?|OoSs)|Ss|HhSs’ for type ‘#AnonType_typemibObj’.]

I have no idea what that means and how to fix this.

Expected outcome:
Data collection to be generated

OpenNMS version:
Horizon 29.0.9

Hi.
I have faced the same problem with another MIB.

This happens when trying to create Data collections in the GUI, so I wonder if it also happens when one configure it using the configuration files SnmpCollector (opennms.com)

But didn’t had the time yet to try it.

But, by what is stated here, maybe it is not supported and we have to change IpAddress use by string on the MIB …
Data Types (opennms.com)

Anyone from the developing team can confirm if ipaddress is not supported at all by the DataCollection process ?

Since IpAddress is defined in SNMPv2-SMI that is compiled, I was expecting it to be usable.

Best regards,
Ricardo

While IpAddress is part of the RFC specs for MIBs, we need the type set to STRING for datacollection definitions. (As stated in that data type document linked above)

1 Like