Troubleshooting MIB compilation errors


Unknown variable 'xxxxxxxxxxxx' in OID object

Issue

The MIB file compilation fails and may display unknown variable error.

Probable causes

Following are a few probable reasons causing this error:

Cause 1: 

The variable used is defined differently. For example, the following error indicates that the definition for trapGeneralComment is missing in the MIB file. The definition is missing because trapGeneralComment is defined as trapGenericTrapComment in the file. 

13:55:25 MC::Base:167 Major -- Error at
C :\PROGRA~1\BMCSOF~1\Impact\server\bin\mib2map.pl:149
(MA::SnmpTranslator::MakeAdapterData):
Unknown variable 'trapGeneralComment' in oid object '1.3.6.1.4.1.3167.1.13.7.0.13012'


####################Object definition######################
trapGenericTrapComment OBJECT-TYPE
SYNTAX  DisplayString
ACCESS  not-accessible
STATUS  mandatory
DESCRIPTION
"GenericTrapComment"
::={ trapsInfo 116 }

Resolution

To correct this issue, update all occurrences of the undefined variable to reference the defined variable. For example, change trapGeneralComment to trapGenericTrapComment.

Cause 2: 

Letter case mismatch. In this example, the variable is defined as trapClsErrorCode but referred as trapClsErrorcode. The letter c in code is defined in the upper case but referred as lower case.

13:55:24 MC::Base:167 Major - Error at  C:\PROGRA~1\BMCSOF~1\Impact\server/lib/perl/MA/SnmpTranslator.pm:469  (MA::SnmpTranslator::MakeBarocVar):
Unknown variable 'trapClsErrorcode' in oid object '1.3.6.1.4.1.3167.1.2.5.0.1021'

####################Object definition######################
trapClsErrorCode OBJECT-TYPE
SYNTAX DisplayString
ACCESS not-accessible
STATUS mandatory
DESCRIPTION
"CLS error code"
::={ trapsInfo 124 }


Resolution

To correct this issue, refer to the object type exactly as it is defined.

Cannot find module (xxxxxxxxxx)

Issue

The MIB file compilation fails due to the missing file or module. An example error message is shown below:

Cannot find module (NETWORK-APPLIANCE-MIB): At line 26 in E:\BMC_Software\MasterCell\server\SNMPAdapter\ucd-snmp-4.2.3\usr\mibs/netapp_dfm.mib.txt

Probable cause

This error may occur due to missing file or module. For example, the following error indicates that the netapp_dfm.mib file is trying to import a definition from {{NETWORK-APPLIANCE-MIB,}}, but the MIB file is not present in the directory of files that you are compiling.

Resolution

To correct this issue, locate the missing MIB file and include it with the MIB files that are being compiled.

Unable to find a matching object identifier for "a"

The MIB file compilation fails due to the missing dependent MIB files. 

Probable cause

The MIB files depend on standard MIB files. This issue is caused when some of the dependent MIBs are not included while compiling.
This can occur when the user has not specified the location of the default MIBs. 

Resolution

Ensure that all the dependent MIB files are present in the same directory as the main input MIB file. For example, if mib A imports from mib B, then place mib B in the same directory as mib A.

MIB compilation fails due to manual editing of the mcsnmptrapd.map file

Issue

The MIB file compilation fails and may display the following error message:

SAX Parse Exception occurred the element type class must be terminated by the matching end-tag

Probable cause

This error occurs if the mcsnmptrapd.map is manually edited and comments have been inserted within a mapping.

Resolution

To correct this issue, move comments either before or after the mapping in the mcsnmptrapd.map file.

Too many textual conventions (INTEGER): At line nn in xxxxxxxxxxxxxxxxxxx.my

Issue

The MIB file compilation fails and may display the following error message:

Too many textual conventions (INTEGER): At line nn in xxxxxxxxxxxxxxxxxxx.my

Probable cause

Snmptranslate has a limit of 256 object imports. If you try to import a MIB file that in turn imports more than 256 objects, the MIB compilation fails.

Resolution

To correct this issue, contact BMC Customer Support.

MIB compilation fails due to unlinked or undefined object identifier

Issue

MIB compilation fails due to unlinked or undefined object identifier.

Probable cause

The error is caused due an unlinked or undefined object identifier. In the following example, the printer-mib MIB file references mib-2, which is not defined in the MIB or imported from another MIB.

Unlinked OID in Printer-MIB: printmib ::= { mib-2 43 }

Undefined identifier: mib-2 near line 10 of D:\vendormibs/Printer-MIB.mib

Resolution

To correct the issue, locate the missing definition and add a line to import the missing MIB. For example, the mib-2 definition is found in RFC1213-MIB. Add a line in the printer-mib file to import mib-2 from RFC1213-MIB.

Did not find 'xxxxxxxx' in module

Issue

MIB compilation fails due to missing object definition. 

Probable cause

This error may occur when a MIB file is trying to import a definition from another MIB file that does not contain the definition. An example error message is as shown below:

Did not find 'Boolean' in module HOST-RESOURCES-MIB (D:\vendormibs/CLIENT-MIB.mib)

Following is an example of the Import section from CLIENT-MIB. In this instance, Boolean is not defined in HOST-RESOURCES-MIB.

IMPORTS
TimeTicks, Counter, enterprises FROM RFC1155-SMI
OBJECT-TYPE&  FROM RFC-1212
DisplayString FROM RFC1213-MIB
Boolean FROM HOST-RESOURCES-MIB
KBytes FROM HOST-RESOURCES-MIB
DateAndTime   FROM HOST-RESOURCES-MIB
InternationalDisplayString  FROM HOST-RESOURCES-MIB
ProductID  FROM HOST-RESOURCES-MIB ;

Resolution

To correct the issue, , locate the MIB that has the missing definition and add it to the import section of the affected MIB.

Common MIB compilation errors

MIB compilation may fail due to a few common reasons as listed in the following section:

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*