Why does snmp fail to use its own MIBs?

47,113

Solution 1

apt-get install snmp-mibs-downloader

The above command downloads various non-free MIBs which the free MIBs (included with distro) require to work.

There are still a handful of errors, after installing this non-free package, but the snmpwalk now works.

Solution 2

It seems you do not have snmp installed. Just do

sudo apt-get install snmp
Share:
47,113

Related videos on Youtube

fadedbee
Author by

fadedbee

Updated on September 18, 2022

Comments

  • fadedbee
    fadedbee over 1 year

    I've done a fresh install of Ubuntu 12.04LTS, and installed the snmpd and snmp packages.

    If I type:

    snmpwalk -m ALL -v2c -c public localhost 1.3

    I get swathes of errors, of the form:

    Cannot adopt OID in SQUID-MIB: cacheClients ::= { cacheProtoAggregateStats 15 }
    Cannot adopt OID in NET-SNMP-EXTEND-MIB: nsExtendLineIndex ::= { nsExtendOutput2Entry 1 }
    Cannot adopt OID in NET-SNMP-EXTEND-MIB: nsExtendOutLine ::= { nsExtendOutput2Entry 2 }
    Cannot adopt OID in UCD-SNMP-MIB: laIndex ::= { laEntry 1 }
    Cannot adopt OID in UCD-SNMP-MIB: laNames ::= { laEntry 2 }
    Cannot adopt OID in UCD-SNMP-MIB: laLoad ::= { laEntry 3 }
    Cannot adopt OID in UCD-SNMP-MIB: laConfig ::= { laEntry 4 }
    Cannot adopt OID in UCD-SNMP-MIB: laLoadInt ::= { laEntry 5 }
    Cannot adopt OID in UCD-SNMP-MIB: laLoadFloat ::= { laEntry 6 }
    Cannot adopt OID in UCD-SNMP-MIB: laErrorFlag ::= { laEntry 100 }
    Cannot adopt OID in UCD-SNMP-MIB: laErrMessage ::= { laEntry 101 }
    Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyRestart ::= { netSnmpNotifications 3 }
    Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyShutdown ::= { netSnmpNotifications 2 }
    Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyStart ::= { netSnmpNotifications 1 }
    

    There a literally hundreds of these.

    If snmp doesn't even like the distro-included MIBs, what chance to I have of getting my own used? (I get the same form of error with my own MIB, on a different machine, which is why I set up a clean install to test the distro's sanity.)

    Do other distros have this issue? Is there something obvious that I am overlooking here?

    • Tiberiu-Ionuț Stan
      Tiberiu-Ionuț Stan almost 10 years
      I was getting these on stdoud when running PHP from CLI (otherwise I wasn't) on Ubuntu server. They were beeing output by the PHP snmp module. The fix was apt-get install snmp. The mibs were present in the mibs folder already.
  • e-sushi
    e-sushi over 10 years
    Thanks - your answer just saved me hours of logfile debugging. [+1]
  • Alex Summers
    Alex Summers almost 7 years
    I was running a scanimage -T (Mint), doing a simple test, and got all these errors. Installing this cleared it out completely. While not the same cause of the SNMP errors, the underlining issue was the same. Not sure why you got a downvote, ++
  • lane
    lane about 6 years
    The OP said "..installed the snmpd and snmp packages..."
  • Chris Cleeland
    Chris Cleeland over 5 years
    FYI, still applies in 16.04LTS