Discussion:
5.7 "Cannot find module" (SNMPv2-SMI), etc.
Stuart Henderson
2011-07-07 10:06:35 UTC
Permalink
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.

$ echo $MIBS
IP-MIB:IF-MIB:TCP-MIB:UDP-MIB:SNMPv2-MIB:RFC1213-MIB

$ echo MIBDIRS
/usr/local/share/snmp/mibs

$ snmpget -v2c -c public localhost SNMPv2-MIB::sysDescr.0
MIB search path: /usr/local/share/snmp/mibs
Cannot find module (SNMPv2-SMI): At line 7 in /usr/local/share/snmp/mibs/IP-MIB.txt
Cannot find module (SNMPv2-TC): At line 11 in /usr/local/share/snmp/mibs/IP-MIB.txt
Cannot find module (INET-ADDRESS-MIB): At line 15 in /usr/local/share/snmp/mibs/IP-MIB.txt
Cannot find module (SNMPv2-MIB): At line 12 in /usr/local/share/snmp/mibs/IF-MIB.txt
Cannot find module (IANAifType-MIB): At line 13 in /usr/local/share/snmp/mibs/IF-MIB.txt
Cannot find module (IF-MIB): At line 16 in /usr/local/share/snmp/mibs/IP-MIB.txt
Cannot find module (IP-MIB): At line 1 in (none)
Cannot find module (TCP-MIB): At line 1 in (none)
Cannot find module (UDP-MIB): At line 1 in (none)
SNMPv2-MIB::sysDescr.0 = STRING: OpenBSD zephyr.spacehopper.org 4.9 GENERIC.MP#0 amd64

$ snmptranslate -Dparse-mibs -Lo -On SNMPv2-MIB::sysDescr.0
registered debug token parse-mibs, 1
Log handling defined - disabling stderr
parse-mibs: Module SNMPv2-SMI not found
parse-mibs: Module RFC1155-SMI not found
parse-mibs: Module RFC1213-MIB not found
parse-mibs: Scanning directory /usr/local/share/snmp/mibs
parse-mibs: No index
parse-mibs: Checking file: /usr/local/share/snmp/mibs/AGENTX-MIB.txt...
parse-mibs: Module 0 AGENTX-MIB is in /usr/local/share/snmp/mibs/AGENTX-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/BRIDGE-MIB.txt...
parse-mibs: Module 1 BRIDGE-MIB is in /usr/local/share/snmp/mibs/BRIDGE-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/DISMAN-EVENT-MIB.txt...
parse-mibs: Module 2 DISMAN-EVENT-MIB is in /usr/local/share/snmp/mibs/DISMAN-EVENT-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt...
parse-mibs: Module 3 DISMAN-SCHEDULE-MIB is in /usr/local/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt...
parse-mibs: Module 4 DISMAN-SCRIPT-MIB is in /usr/local/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/EtherLike-MIB.txt...
parse-mibs: Module 5 EtherLike-MIB is in /usr/local/share/snmp/mibs/EtherLike-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/HCNUM-TC.txt...
parse-mibs: Module 6 HCNUM-TC is in /usr/local/share/snmp/mibs/HCNUM-TC.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/HOST-RESOURCES-MIB.txt...
parse-mibs: Module 7 HOST-RESOURCES-MIB is in /usr/local/share/snmp/mibs/HOST-RESOURCES-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt...
parse-mibs: Module 8 HOST-RESOURCES-TYPES is in /usr/local/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt...
parse-mibs: Module 9 IANA-ADDRESS-FAMILY-NUMBERS-MIB is in /usr/local/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IANA-LANGUAGE-MIB.txt...
parse-mibs: Module 10 IANA-LANGUAGE-MIB is in /usr/local/share/snmp/mibs/IANA-LANGUAGE-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IANA-RTPROTO-MIB.txt...
parse-mibs: Module 11 IANA-RTPROTO-MIB is in /usr/local/share/snmp/mibs/IANA-RTPROTO-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IANAifType-MIB.txt...
parse-mibs: Module 12 IANAifType-MIB is in /usr/local/share/snmp/mibs/IANAifType-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt...
parse-mibs: Module 13 IF-INVERTED-STACK-MIB is in /usr/local/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IF-MIB.txt...
parse-mibs: Module 14 IF-MIB is in /usr/local/share/snmp/mibs/IF-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/INET-ADDRESS-MIB.txt...
parse-mibs: Module 15 INET-ADDRESS-MIB is in /usr/local/share/snmp/mibs/INET-ADDRESS-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IP-FORWARD-MIB.txt...
parse-mibs: Module 16 IP-FORWARD-MIB is in /usr/local/share/snmp/mibs/IP-FORWARD-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IP-MIB.txt...
parse-mibs: Module 17 IP-MIB is in /usr/local/share/snmp/mibs/IP-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IPV6-FLOW-LABEL-MIB.txt...
parse-mibs: Module 18 IPV6-FLOW-LABEL-MIB is in /usr/local/share/snmp/mibs/IPV6-FLOW-LABEL-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IPV6-ICMP-MIB.txt...
parse-mibs: Module 19 IPV6-ICMP-MIB is in /usr/local/share/snmp/mibs/IPV6-ICMP-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IPV6-MIB.txt...
parse-mibs: Module 20 IPV6-MIB is in /usr/local/share/snmp/mibs/IPV6-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IPV6-TC.txt...
parse-mibs: Module 21 IPV6-TC is in /usr/local/share/snmp/mibs/IPV6-TC.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IPV6-TCP-MIB.txt...
parse-mibs: Module 22 IPV6-TCP-MIB is in /usr/local/share/snmp/mibs/IPV6-TCP-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/IPV6-UDP-MIB.txt...
parse-mibs: Module 23 IPV6-UDP-MIB is in /usr/local/share/snmp/mibs/IPV6-UDP-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/MTA-MIB.txt...
parse-mibs: Module 24 MTA-MIB is in /usr/local/share/snmp/mibs/MTA-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt...
parse-mibs: Module 25 NET-SNMP-AGENT-MIB is in /usr/local/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt...
parse-mibs: Module 26 NET-SNMP-EXAMPLES-MIB is in /usr/local/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt...
parse-mibs: Module 27 NET-SNMP-EXTEND-MIB is in /usr/local/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/NET-SNMP-MIB.txt...
parse-mibs: Module 28 NET-SNMP-MIB is in /usr/local/share/snmp/mibs/NET-SNMP-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/NET-SNMP-PASS-MIB.txt...
parse-mibs: Module 29 NET-SNMP-PASS-MIB is in /usr/local/share/snmp/mibs/NET-SNMP-PASS-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/NET-SNMP-TC.txt...
parse-mibs: Module 30 NET-SNMP-TC is in /usr/local/share/snmp/mibs/NET-SNMP-TC.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/NET-SNMP-VACM-MIB.txt...
parse-mibs: Module 31 NET-SNMP-VACM-MIB is in /usr/local/share/snmp/mibs/NET-SNMP-VACM-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/NETWORK-SERVICES-MIB.txt...
parse-mibs: Module 32 NETWORK-SERVICES-MIB is in /usr/local/share/snmp/mibs/NETWORK-SERVICES-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt...
parse-mibs: Module 33 NOTIFICATION-LOG-MIB is in /usr/local/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/RFC-1215.txt...
parse-mibs: Module 34 RFC-1215 is in /usr/local/share/snmp/mibs/RFC-1215.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/RFC1155-SMI.txt...
parse-mibs: Module 35 RFC1155-SMI is in /usr/local/share/snmp/mibs/RFC1155-SMI.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/RFC1213-MIB.txt...
parse-mibs: Module 36 RFC1213-MIB is in /usr/local/share/snmp/mibs/RFC1213-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/RMON-MIB.txt...
parse-mibs: Module 37 RMON-MIB is in /usr/local/share/snmp/mibs/RMON-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SCTP-MIB.txt...
parse-mibs: Module 38 SCTP-MIB is in /usr/local/share/snmp/mibs/SCTP-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SMUX-MIB.txt...
parse-mibs: Module 39 SMUX-MIB is in /usr/local/share/snmp/mibs/SMUX-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt...
parse-mibs: Module 40 SNMP-COMMUNITY-MIB is in /usr/local/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt...
parse-mibs: Module 41 SNMP-FRAMEWORK-MIB is in /usr/local/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMP-MPD-MIB.txt...
parse-mibs: Module 42 SNMP-MPD-MIB is in /usr/local/share/snmp/mibs/SNMP-MPD-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt...
parse-mibs: Module 43 SNMP-NOTIFICATION-MIB is in /usr/local/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMP-PROXY-MIB.txt...
parse-mibs: Module 44 SNMP-PROXY-MIB is in /usr/local/share/snmp/mibs/SNMP-PROXY-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMP-TARGET-MIB.txt...
parse-mibs: Module 45 SNMP-TARGET-MIB is in /usr/local/share/snmp/mibs/SNMP-TARGET-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt...
parse-mibs: Module 46 SNMP-USER-BASED-SM-MIB is in /usr/local/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMP-USM-AES-MIB.txt...
parse-mibs: Module 47 SNMP-USM-AES-MIB is in /usr/local/share/snmp/mibs/SNMP-USM-AES-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt...
parse-mibs: Module 48 SNMP-USM-DH-OBJECTS-MIB is in /usr/local/share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt...
parse-mibs: Module 49 SNMP-VIEW-BASED-ACM-MIB is in /usr/local/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMPv2-CONF.txt...
parse-mibs: Module 50 SNMPv2-CONF is in /usr/local/share/snmp/mibs/SNMPv2-CONF.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMPv2-MIB.txt...
parse-mibs: Module 51 SNMPv2-MIB is in /usr/local/share/snmp/mibs/SNMPv2-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMPv2-SMI.txt...
parse-mibs: Module 52 SNMPv2-SMI is in /usr/local/share/snmp/mibs/SNMPv2-SMI.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMPv2-TC.txt...
parse-mibs: Module 53 SNMPv2-TC is in /usr/local/share/snmp/mibs/SNMPv2-TC.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/SNMPv2-TM.txt...
parse-mibs: Module 54 SNMPv2-TM is in /usr/local/share/snmp/mibs/SNMPv2-TM.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/TCP-MIB.txt...
parse-mibs: Module 55 TCP-MIB is in /usr/local/share/snmp/mibs/TCP-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt...
parse-mibs: Module 56 TRANSPORT-ADDRESS-MIB is in /usr/local/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/TUNNEL-MIB.txt...
parse-mibs: Module 57 TUNNEL-MIB is in /usr/local/share/snmp/mibs/TUNNEL-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/UCD-DEMO-MIB.txt...
parse-mibs: Module 58 UCD-DEMO-MIB is in /usr/local/share/snmp/mibs/UCD-DEMO-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/UCD-DISKIO-MIB.txt...
parse-mibs: Module 59 UCD-DISKIO-MIB is in /usr/local/share/snmp/mibs/UCD-DISKIO-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/UCD-DLMOD-MIB.txt...
parse-mibs: Module 60 UCD-DLMOD-MIB is in /usr/local/share/snmp/mibs/UCD-DLMOD-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/UCD-IPFWACC-MIB.txt...
parse-mibs: Module 61 UCD-IPFWACC-MIB is in /usr/local/share/snmp/mibs/UCD-IPFWACC-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt...
parse-mibs: Module 62 UCD-SNMP-MIB is in /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt
parse-mibs: Checking file: /usr/local/share/snmp/mibs/UDP-MIB.txt...
parse-mibs: Module 63 UDP-MIB is in /usr/local/share/snmp/mibs/UDP-MIB.txt
parse-mibs: Parsing MIB: 17 IP-MIB
parse-mibs: Parsing MIB: 52 SNMPv2-SMI
parse-mibs: Processing IMPORTS for module 52 SNMPv2-SMI
parse-mibs: Processing import: joint-iso-ccitt
parse-mibs: Processing import: ccitt
parse-mibs: Processing import: iso
MIB search path: /usr/local/share/snmp/mibs
parse-mibs:
Cannot find module (SNMPv2-SMI): At line 7 in /usr/local/share/snmp/mibs/IP-MIB.txt
parse-mibs: Parsing MIB: 53 SNMPv2-TC
parse-mibs: Processing IMPORTS for module 53 SNMPv2-TC
parse-mibs: Processing import: joint-iso-ccitt
parse-mibs: Processing import: ccitt
parse-mibs: Processing import: iso
parse-mibs:
Cannot find module (SNMPv2-TC): At line 11 in /usr/local/share/snmp/mibs/IP-MIB.txt
parse-mibs: Parsing MIB: 15 INET-ADDRESS-MIB
parse-mibs: Module SNMPv2-SMI already loaded
parse-mibs: #### adding Module 15 'mib-2' 52
parse-mibs: Processing IMPORTS for module 15 INET-ADDRESS-MIB
parse-mibs: Processing import: mib-2
parse-mibs:
Cannot find module (INET-ADDRESS-MIB): At line 15 in /usr/local/share/snmp/mibs/IP-MIB.txt
parse-mibs: Parsing MIB: 14 IF-MIB
parse-mibs: Module SNMPv2-SMI already loaded
parse-mibs: Module SNMPv2-TC already loaded
parse-mibs: Parsing MIB: 51 SNMPv2-MIB
parse-mibs: Module SNMPv2-SMI already loaded
parse-mibs: Module SNMPv2-TC already loaded
parse-mibs: #### adding Module 51 'snmpModules' 52
parse-mibs: #### adding Module 51 'mib-2' 52
parse-mibs: #### adding Module 51 'DisplayString' 53
parse-mibs: #### adding Module 51 'TestAndIncr' 53
parse-mibs: #### adding Module 51 'TimeStamp' 53
parse-mibs: Processing IMPORTS for module 51 SNMPv2-MIB
parse-mibs: Processing import: snmpModules
parse-mibs: Processing import: mib-2
parse-mibs: Processing import: DisplayString
parse-mibs: Processing import: TestAndIncr
parse-mibs: Processing import: TimeStamp
parse-mibs:
Cannot find module (SNMPv2-MIB): At line 12 in /usr/local/share/snmp/mibs/IF-MIB.txt
parse-mibs: Parsing MIB: 12 IANAifType-MIB
parse-mibs: Module SNMPv2-SMI already loaded
parse-mibs: #### adding Module 12 'mib-2' 52
parse-mibs: Processing IMPORTS for module 12 IANAifType-MIB
parse-mibs: Processing import: mib-2
parse-mibs:
Cannot find module (IANAifType-MIB): At line 13 in /usr/local/share/snmp/mibs/IF-MIB.txt
parse-mibs: #### adding Module 14 'mib-2' 52
parse-mibs: #### adding Module 14 'DisplayString' 53
parse-mibs: #### adding Module 14 'PhysAddress' 53
parse-mibs: #### adding Module 14 'TruthValue' 53
parse-mibs: #### adding Module 14 'RowStatus' 53
parse-mibs: #### adding Module 14 'TimeStamp' 53
parse-mibs: #### adding Module 14 'AutonomousType' 53
parse-mibs: #### adding Module 14 'TestAndIncr' 53
parse-mibs: #### adding Module 14 'snmpTraps' 51
parse-mibs: #### adding Module 14 'IANAifType' 12
parse-mibs: Processing IMPORTS for module 14 IF-MIB
parse-mibs: Processing import: mib-2
parse-mibs: Processing import: DisplayString
parse-mibs: Processing import: PhysAddress
parse-mibs: Processing import: TruthValue
parse-mibs: Processing import: RowStatus
parse-mibs: Processing import: TimeStamp
parse-mibs: Processing import: AutonomousType
parse-mibs: Processing import: TestAndIncr
parse-mibs: Processing import: snmpTraps
parse-mibs: Processing import: IANAifType
parse-mibs:
Cannot find module (IF-MIB): At line 16 in /usr/local/share/snmp/mibs/IP-MIB.txt
parse-mibs: #### adding Module 17 'mib-2' 52
parse-mibs: #### adding Module 17 'zeroDotZero' 52
parse-mibs: #### adding Module 17 'PhysAddress' 53
parse-mibs: #### adding Module 17 'TruthValue' 53
parse-mibs: #### adding Module 17 'TimeStamp' 53
parse-mibs: #### adding Module 17 'RowPointer' 53
parse-mibs: #### adding Module 17 'TestAndIncr' 53
parse-mibs: #### adding Module 17 'RowStatus' 53
parse-mibs: #### adding Module 17 'StorageType' 53
parse-mibs: #### adding Module 17 'InetAddress' 15
parse-mibs: #### adding Module 17 'InetAddressType' 15
parse-mibs: #### adding Module 17 'InetAddressPrefixLength' 15
parse-mibs: #### adding Module 17 'InetVersion' 15
parse-mibs: #### adding Module 17 'InetZoneIndex' 15
parse-mibs: #### adding Module 17 'InterfaceIndex' 14
parse-mibs: Processing IMPORTS for module 17 IP-MIB
parse-mibs: Processing import: mib-2
parse-mibs: Processing import: zeroDotZero
parse-mibs: Processing import: PhysAddress
parse-mibs: Processing import: TruthValue
parse-mibs: Processing import: TimeStamp
parse-mibs: Processing import: RowPointer
parse-mibs: Processing import: TestAndIncr
parse-mibs: Processing import: RowStatus
parse-mibs: Processing import: StorageType
parse-mibs: Processing import: InetAddress
parse-mibs: Processing import: InetAddressType
parse-mibs: Processing import: InetAddressPrefixLength
parse-mibs: Processing import: InetVersion
parse-mibs: Processing import: InetZoneIndex
parse-mibs: Processing import: InterfaceIndex
parse-mibs:
Cannot find module (IP-MIB): At line 1 in (none)
parse-mibs: Module IF-MIB already loaded
parse-mibs: Parsing MIB: 55 TCP-MIB
parse-mibs: Module SNMPv2-SMI already loaded
parse-mibs: Module INET-ADDRESS-MIB already loaded
parse-mibs: #### adding Module 55 'mib-2' 52
parse-mibs: #### adding Module 55 'InetAddress' 15
parse-mibs: #### adding Module 55 'InetAddressType' 15
parse-mibs: #### adding Module 55 'InetPortNumber' 15
parse-mibs: Processing IMPORTS for module 55 TCP-MIB
parse-mibs: Processing import: mib-2
parse-mibs: Processing import: InetAddress
parse-mibs: Processing import: InetAddressType
parse-mibs: Processing import: InetPortNumber
parse-mibs:
Cannot find module (TCP-MIB): At line 1 in (none)
parse-mibs: Parsing MIB: 63 UDP-MIB
parse-mibs: Module SNMPv2-SMI already loaded
parse-mibs: Module INET-ADDRESS-MIB already loaded
parse-mibs: #### adding Module 63 'mib-2' 52
parse-mibs: #### adding Module 63 'InetAddress' 15
parse-mibs: #### adding Module 63 'InetAddressType' 15
parse-mibs: #### adding Module 63 'InetPortNumber' 15
parse-mibs: Processing IMPORTS for module 63 UDP-MIB
parse-mibs: Processing import: mib-2
parse-mibs: Processing import: InetAddress
parse-mibs: Processing import: InetAddressType
parse-mibs: Processing import: InetPortNumber
parse-mibs:
Cannot find module (UDP-MIB): At line 1 in (none)
parse-mibs: Module SNMPv2-MIB already loaded
parse-mibs: Parsing MIB: 36 RFC1213-MIB
parse-mibs: Parsing MIB: 35 RFC1155-SMI
parse-mibs: Processing IMPORTS for module 35 RFC1155-SMI
parse-mibs: Processing import: joint-iso-ccitt
parse-mibs: Processing import: ccitt
parse-mibs: Processing import: iso
parse-mibs: Module SNMPv2-SMI already loaded
parse-mibs: #### adding Module 36 'mgmt' 52
parse-mibs: Processing IMPORTS for module 36 RFC1213-MIB
parse-mibs: Processing import: mgmt
parse-mibs: Module SNMPv2-SMI already loaded
parse-mibs: Module SNMPv2-MIB already loaded
.1.3.6.1.2.1.1.1.0
Stuart Henderson
2011-07-07 19:18:36 UTC
Permalink
Post by Stuart Henderson
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
Bart Van Assche
2011-07-08 18:37:16 UTC
Permalink
Post by Stuart Henderson
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.
Have you checked that the configure script made the correct choice for the
separator character (ENV_SEPARATOR in config.log) ?

Bart.
Stuart Henderson
2011-07-08 20:08:18 UTC
Permalink
Post by Stuart Henderson
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.
Have you checked that the configure script made the correct choice for
the separator character (ENV_SEPARATOR in config.log) ?
Looks right, ENV_SEPARATOR=':'
Bill Fenner
2011-07-13 15:50:55 UTC
Permalink
Post by Stuart Henderson
    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.
Have you checked that the configure script made the correct choice for
the separator character (ENV_SEPARATOR in config.log) ?
Looks right, ENV_SEPARATOR=':'
I've got the same issue - I updated 5.6.1 to 5.7 by changing the
tarball and deleting the local patches that were included in 5.7, and
the snmpcmds and snmpd all gripe about not being able to find lots of
MIBs. My debugging looks largely the same --

~/10s/src/Snmp @bs1% snmpstatus -v 2c -c public localhost
MIB search path:
/home/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs
Cannot find module (SNMPv2-SMI): At line 5 in
/usr/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
Cannot find module (IANA-ADDRESS-FAMILY-NUMBERS-MIB): At line 1 in (none)
... etc


trace: netsnmp_mibindex_new(): mib.c, 2877:
mibindex: new: /usr/share/snmp/mibs (/var/net-snmp/mib_indexes/2)
trace: add_mibfile(): parse.c, 4824:
parse-mibs: Checking file: /usr/share/snmp/mibs/SNMPv2-SMI.txt...
trace: new_module(): parse.c, 4246:
parse-mibs: Module 13 SNMPv2-SMI is in /usr/share/snmp/mibs/SNMPv2-SMI.txt
...

trace: parse(): parse.c, 4317:
parse-file: Parsing file: /usr/share/snmp/mibs/SNMPv2-SMI.txt...
trace: parse(): parse.c, 4454:
parse-mibs: Parsing MIB: 13 SNMPv2-SMI
trace: do_linkup(): parse.c, 1746:
parse-mibs: Processing IMPORTS for module 13 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, 4571:
parse-file: End of file (/usr/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/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs'
MIB search path:
/home/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs
trace: print_error(): parse.c, 800:
parse-mibs:
Cannot find module (SNMPv2-SMI): At line 5 in
/usr/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt

It's clearly finding the files, and then griping that it can't find the module.

Bill
Garrett Cooper
2011-07-13 16:22:25 UTC
Permalink
Post by Bill Fenner
Post by Stuart Henderson
    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.
Have you checked that the configure script made the correct choice for
the separator character (ENV_SEPARATOR in config.log) ?
Looks right, ENV_SEPARATOR=':'
I've got the same issue - I updated 5.6.1 to 5.7 by changing the
tarball and deleting the local patches that were included in 5.7, and
the snmpcmds and snmpd all gripe about not being able to find lots of
MIBs.  My debugging looks largely the same --
/home/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs
Cannot find module (SNMPv2-SMI): At line 5 in
/usr/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
Cannot find module (IANA-ADDRESS-FAMILY-NUMBERS-MIB): At line 1 in (none)
... etc
mibindex: new: /usr/share/snmp/mibs (/var/net-snmp/mib_indexes/2)
parse-mibs: Checking file: /usr/share/snmp/mibs/SNMPv2-SMI.txt...
parse-mibs:   Module 13 SNMPv2-SMI is in /usr/share/snmp/mibs/SNMPv2-SMI.txt
...
parse-file: Parsing file:  /usr/share/snmp/mibs/SNMPv2-SMI.txt...
parse-mibs: Parsing MIB: 13 SNMPv2-SMI
parse-mibs: Processing IMPORTS for module 13 SNMPv2-SMI
parse-mibs:   Processing import: joint-iso-ccitt
parse-mibs:   Processing import: ccitt
parse-mibs:   Processing import: iso
parse-file: End of file (/usr/share/snmp/mibs/SNMPv2-SMI.txt)
get_mib_directory: mib directories set
'/home/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs'
/home/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs
Cannot find module (SNMPv2-SMI): At line 5 in
/usr/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
It's clearly finding the files, and then griping that it can't find the module.
As I said in another email post...
http://sourceforge.net/mailarchive/forum.php?thread_name=CAGH67wTef4%2Bb4-eZ4sO%3Da6ZATKWMdZhX2hwX%3DbcHmDNEj50Mkw%40mail.gmail.com&forum_name=net-snmp-users
. The fix required to mute this unnecessary noise is trivial.
Thanks,
-Garrett
Bill Fenner
2011-07-14 03:31:20 UTC
Permalink
Post by Garrett Cooper
Post by Bill Fenner
Post by Stuart Henderson
    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.
Have you checked that the configure script made the correct choice for
the separator character (ENV_SEPARATOR in config.log) ?
Looks right, ENV_SEPARATOR=':'
I've got the same issue - I updated 5.6.1 to 5.7 by changing the
tarball and deleting the local patches that were included in 5.7, and
the snmpcmds and snmpd all gripe about not being able to find lots of
MIBs.  My debugging looks largely the same --
/home/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs
Cannot find module (SNMPv2-SMI): At line 5 in
/usr/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
Cannot find module (IANA-ADDRESS-FAMILY-NUMBERS-MIB): At line 1 in (none)
... etc
mibindex: new: /usr/share/snmp/mibs (/var/net-snmp/mib_indexes/2)
parse-mibs: Checking file: /usr/share/snmp/mibs/SNMPv2-SMI.txt...
parse-mibs:   Module 13 SNMPv2-SMI is in /usr/share/snmp/mibs/SNMPv2-SMI.txt
...
parse-file: Parsing file:  /usr/share/snmp/mibs/SNMPv2-SMI.txt...
parse-mibs: Parsing MIB: 13 SNMPv2-SMI
parse-mibs: Processing IMPORTS for module 13 SNMPv2-SMI
parse-mibs:   Processing import: joint-iso-ccitt
parse-mibs:   Processing import: ccitt
parse-mibs:   Processing import: iso
parse-file: End of file (/usr/share/snmp/mibs/SNMPv2-SMI.txt)
get_mib_directory: mib directories set
'/home/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs'
/home/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs
Cannot find module (SNMPv2-SMI): At line 5 in
/usr/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
It's clearly finding the files, and then griping that it can't find the module.
As I said in another email post...
http://sourceforge.net/mailarchive/forum.php?thread_name=CAGH67wTef4%2Bb4-eZ4sO%3Da6ZATKWMdZhX2hwX%3DbcHmDNEj50Mkw%40mail.gmail.com&forum_name=net-snmp-users
. The fix required to mute this unnecessary noise is trivial.
Looks like rstory committed something shorter:
http://net-snmp.git.sourceforge.net/git/gitweb.cgi?p=net-snmp/net-snmp;a=blobdiff;f=snmplib/parse.c;h=905763c566e82743b76fdd76d62c860f2fc469a3;hp=c2e4d3f9ffe49f77d63e472c693741fc670fddcc;hb=2edccc9be064dc4d669f31d4dc0c571f648ad34d;hpb=994baa9f2032815a46b0f812149e6ab82aa8d381

Bill
Garrett Cooper
2011-07-14 03:43:32 UTC
Permalink
Post by Bill Fenner
Post by Garrett Cooper
Post by Bill Fenner
Post by Stuart Henderson
    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.
Have you checked that the configure script made the correct choice for
the separator character (ENV_SEPARATOR in config.log) ?
Looks right, ENV_SEPARATOR=':'
I've got the same issue - I updated 5.6.1 to 5.7 by changing the
tarball and deleting the local patches that were included in 5.7, and
the snmpcmds and snmpd all gripe about not being able to find lots of
MIBs.  My debugging looks largely the same --
/home/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs
Cannot find module (SNMPv2-SMI): At line 5 in
/usr/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
Cannot find module (IANA-ADDRESS-FAMILY-NUMBERS-MIB): At line 1 in (none)
... etc
mibindex: new: /usr/share/snmp/mibs (/var/net-snmp/mib_indexes/2)
parse-mibs: Checking file: /usr/share/snmp/mibs/SNMPv2-SMI.txt...
parse-mibs:   Module 13 SNMPv2-SMI is in /usr/share/snmp/mibs/SNMPv2-SMI.txt
...
parse-file: Parsing file:  /usr/share/snmp/mibs/SNMPv2-SMI.txt...
parse-mibs: Parsing MIB: 13 SNMPv2-SMI
parse-mibs: Processing IMPORTS for module 13 SNMPv2-SMI
parse-mibs:   Processing import: joint-iso-ccitt
parse-mibs:   Processing import: ccitt
parse-mibs:   Processing import: iso
parse-file: End of file (/usr/share/snmp/mibs/SNMPv2-SMI.txt)
get_mib_directory: mib directories set
'/home/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs'
/home/fenner/.snmp/mibs:/usr/share/snmp/eos-mibs:/usr/share/snmp/mibs
Cannot find module (SNMPv2-SMI): At line 5 in
/usr/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
It's clearly finding the files, and then griping that it can't find the module.
As I said in another email post...
http://sourceforge.net/mailarchive/forum.php?thread_name=CAGH67wTef4%2Bb4-eZ4sO%3Da6ZATKWMdZhX2hwX%3DbcHmDNEj50Mkw%40mail.gmail.com&forum_name=net-snmp-users
. The fix required to mute this unnecessary noise is trivial.
http://net-snmp.git.sourceforge.net/git/gitweb.cgi?p=net-snmp/net-snmp;a=blobdiff;f=snmplib/parse.c;h=905763c566e82743b76fdd76d62c860f2fc469a3;hp=c2e4d3f9ffe49f77d63e472c693741fc670fddcc;hb=2edccc9be064dc4d669f31d4dc0c571f648ad34d;hpb=994baa9f2032815a46b0f812149e6ab82aa8d381
Except that that violates the requirements specified in the
comment above parse:

/*
* Parses a mib file and returns a linked list of nodes found in the file.
* Returns NULL on error.
*/

and gMibError is only set when parsing notifications, not all of
the rest of the edge cases where things can fail in parse(..). That's
why my patch was so much longer than the commit referenced above.
And as I noted in the bug there should have really been objects
parsed in SNMPv2-SMI because there are multiple OBJECT declarations;
why there weren't any parsed OBJECTs reported is in and of itself,
dubious.
Thanks,
-Garrett

Garrett Cooper
2011-07-10 22:05:49 UTC
Permalink
   I'm a bit late to the party with this thread, but I ran into the
same exact issue on FreeBSD -- and this isn't a new "problem". The
old behavior (no noise) is present in net-snmp 5.5 as well, so what I
did was whipped up a patch to quiet down things by restoring the old
behavior (sort of):
https://sourceforge.net/tracker/?func=detail&aid=3362233&group_id=12694&atid=312694
. The problem is that the requirements defined in the original code,
and the return values are contradictory for some SMIs. So what I did
was extended hardraker's patch to catch actual MIB parsing errors in
parse().
   The issue may need to be resolved a different way in the future,
but this at least mutes the noise, which matches pre-5.7 behavior, and
catches errors during the MIB parsing process in a proper manner.
Thanks,
-Garrett
Loading...