Troubleshooting MIBs to JSON Converter Utility Issues
Last updated on 09 June, 2025When converting MIB files using the MIBs to JSON Converter Utility, you can experience various errors due to missing or failed MIBs. These errors are logged as “Missing source MIBs” or “Failed MIBs”, with indications for you to troubleshoot the errors.
Missing Source MIBs
When you run the utility, look for the “Missing source MIBs:” logs. A MIB file name in the log indicates that the MIB conversion failed due to that missing MIB file. For example, the following log message indicates that conversion failed due to the missing ABC-MIB
:
Missing source MIBs: ABC-MIB
Resolving Missing Source MIBs Issue
- Add the missing source MIB (in this case,
ABC-MIB
) along with the other MIBs in the directory containing the MIBs to be converted. - Run the MIBs to JSON Converter utility.
Failed MIBs
When you run the utility, look for the “Failed MIBs:” logs. Any error in the log indicate failed conversions and includes the reason for failure.
Missing Parent or Dependent MIB
The MIB conversion can fail due to the missing parent or dependent MIB. For example, the following error message indicates that conversion failed for ABC
MIB due to the missing XYZ
MIB:
Failed MIBs: ABC (no module "XYZ" in symbolTable at MIB ABC)
Resolving Missing Parent or Dependent MIB Issue
- Add the missing MIB (in this case,
XYZ
MIB) along with the other MIBs in the directory containing the MIBs to be converted. - Run the MIBs to JSON Converter utility.
WinError 183
This error can occur only for the machines running on the Windows operating system. Although there is no impact on MIB conversion, you can get this error if there are multiple MIBs dependent on a single MIB.
Failed MIBs: ABC (failure writing file inter_json\ABC.json: [WinError 183] Cannot create a file when that file already exists: 'C:\\snmpMibsToJsonConversionUtil\\inter_json\\tmp44ahdl2d' -> 'inter_json\\ABC.json' at MIB ABC)
Resolving WinError 183 Issue
No action is required. You can ignore this error, as the utility has already compiled the MIB.
Duplicate Symbol
If a symbol is defined multiple times in a MIB, the MIB conversion can fail due to duplicate symbols. This can occur when a MIB is malformed or includes overlapping content. For example:
Failed MIBs: ABC (Duplicate symbol found: DEF at MIB ABC)
This error message indicates that the symbol DEF
is duplicated on multiple lines.
Resolving Duplicate Symbol Issue
- Open the MIB file in a text editor.
- Search for the duplicate symbol name reported in the error. For example,
DEF
.
When a symbol appears more than once with declarations such asOBJECT IDENTIFIER
,OBJECT-TYPE
, or similar declarations, it indicates a duplicate object definition in the MIB. - Download a clean copy of the affected MIB (in this case,
ABC
) from the vendor’s official website. - Replace the malformed MIB with the new MIB.
- In the MIBs to JSON Converter Utility, use the new MIB to convert to enterprise JSON file.
- Run the MIBs to JSON Converter utility.
Note: If the issue persists, manually remove or comment out the duplicate symbol definition.
Missing Syntax Type Definition
The MIB conversion can fail if a symbol is defined without an associated or imported syntax type. For example:
Failed MIBs: ABC (Unknown parents for symbols: DEF at MIB ABC)
This error message indicates that the symbol DEF
is defined in the MIB but its syntax type (for example, XYZ
) is neither defined locally in the MIB nor imported from another MIB.
Resolving Missing Syntax Type Definition Issue
- Identify the missing syntax type. For example,
XYZ
. - Import the missing syntax type from another MIB.
- Update the
IMPORTS
section of the MIB with the imported syntax type. For example:
IMPORTS
XYZ FROM SNMPv2-TC
- Run the MIBs to JSON Converter utility.
Missing Syntax Value
One of the causes for this error is that the SYNTAX BITS
used in the MIB do not have bit values. For example, in the SYNTAX BITS
if the value is not specified:
SYNTAX BITS
XYZ read-only
In such scenario, the MIB conversion fails and the following error is displayed:
Failed MIBs: ABC (Bad grammar near token XYZ at line 1234)
Resolving Missing Syntax Value Issue
To resolve the issue, you can do one of the following:
- If you do not know the bit value, comment out the object entirely.
- If you know the bit value, specify the bit value in the line specified in the error message. For example,
SYNTAX BITS {
exampleBitOne(0),
exampleBitTwo(1)
}
Invalid Characters in MIB
The MIB conversion can fail due to unescaped or malformed characters in the MIB file. In the error message, you can identify the MIB file name, the number of characters that are not parsed, and the line number that contains the unsupported characters.
Failed MIBs: ABC (Illegal character, X characters left unparsed at MIB ABC, line 1234)
Resolving Invalid Characters in MIB Issue
- Open the MIB file in a text editor.
- Remove or rectify the invalid characters from the line specified in the error message.
- Run the MIBs to JSON Converter utility.
Undefined Default Value
The MIB conversion can fail if you do not define or import the default value of the symbol.
Failed MIBs: ABC (unknown type "((‘ObjectIdentifier’, ''), '')" for defval "XYZ" of symbol PQR)
This error message indicates that XYZ
is the default value of the symbol PQR
. The conversion failed because the default value XYZ
is defined in some other MIB which is not imported in the failed MIB (ABC
MIB).
Resolving Undefined Default Value Issue
- In the MIB file, update the
IMPORTS
section to include the default (XYZ
) from an appropriate MIB.
IMPORTS
XYZ FROM PQR
- Run the MIBs to JSON Converter utility.