Re: 5.7 "Cannot find module" (SNMPv2-SMI), etc.

Stuart Henderson <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 2011-07-07, Stuart Henderson <[email protected]> wrote:
> I'm updating the OpenBSD port of Net-SNMP to 5.7 and seeing some errors
> relating to problems loading mibs that weren't happening in 5.6.1.1.
> Can anyone give me suggestions as to where to look next please? Thanks.

Follow-up on this, towards the bottom of read_module_internal()
in snmplib/parse.c we have this:

            if (np != NULL)
                return MODULE_LOADED_OK;
            else if (gMibError == MODULE_SYNTAX_ERROR) 
                return MODULE_SYNTAX_ERROR;

In my case np is NULL (i.e. parse() returned null), but gMibError
is still 0, so this falls through the end of the block and hits the
"return MODULE_NOT_FOUND" at the bottom of the function causing
the error.

Here's a snippet around the time of the error with -Dall (though
I don't think this contains any additional clues).

trace: parse(): parse.c, 4318:
parse-file: Parsing file:  /usr/local/share/snmp/mibs/IP-MIB.txt...
trace: parse(): parse.c, 4455:
parse-mibs: Parsing MIB: 18 IP-MIB
trace: parse(): parse.c, 4318:
parse-file: Parsing file:  /usr/local/share/snmp/mibs/SNMPv2-SMI.txt...
trace: parse(): parse.c, 4455:
parse-mibs: Parsing MIB: 48 SNMPv2-SMI
trace: do_linkup(): parse.c, 1746:
parse-mibs: Processing IMPORTS for module 48 SNMPv2-SMI
trace: do_linkup(): parse.c, 1759:
parse-mibs:   Processing import: joint-iso-ccitt
trace: do_linkup(): parse.c, 1759:
parse-mibs:   Processing import: ccitt
trace: do_linkup(): parse.c, 1759:
parse-mibs:   Processing import: iso
trace: parse(): parse.c, 4572:
parse-file: End of file (/usr/local/share/snmp/mibs/SNMPv2-SMI.txt)
trace: netsnmp_get_mib_directory(): mib.c, 2482:
trace: netsnmp_get_mib_directory(): mib.c, 2515:
get_mib_directory: mib directories set '/home/sthen/.snmp/mibs:/usr/share/snmp/mibs:/usr/local/share/snmp/mibs'
MIB search path: /home/sthen/.snmp/mibs:/usr/share/snmp/mibs:/usr/local/share/snmp/mibs
trace: print_error(): parse.c, 800:
parse-mibs: 
Cannot find module (SNMPv2-SMI): At line 7 in /usr/local/share/snmp/mibs/IP-MIB.txt
trace: parse(): parse.c, 4318:
parse-file: Parsing file:  /usr/local/share/snmp/mibs/SNMPv2-TC.txt...
trace: parse(): parse.c, 4455:
parse-mibs: Parsing MIB: 49 SNMPv2-TC
trace: do_linkup(): parse.c, 1746:
parse-mibs: Processing IMPORTS for module 49 SNMPv2-TC



------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.