snmptrapd.service uses MIBSDIR instead of MIBDIRS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
net-snmp (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Won't Fix
|
Undecided
|
Unassigned | ||
Eoan |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
The snmptrapd.service file (which comes from net-snmp_
Environment=
However, snmptrapd expects to see the MIBDIRS rather than MIBSDIR so this line is not having the intended effect.
This seems to be an upstream Debian packaging issue, but when I looked at their bug tracker they said to use the reportbug program. And when I installed and ran it, it said to use ubuntu-bug.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: snmptrapd 5.7.3+dfsg-
ProcVersionSign
Uname: Linux 4.15.0-65-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Oct 9 09:38:51 2019
InstallationDate: Installed on 2019-02-11 (239 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: net-snmp
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
mtime.conffile.
summary: |
- snmptrapd.service uses MIBSDIRS instead of MIBDIRS + snmptrapd.service uses MIBSDIR instead of MIBDIRS |
tags: | added: bitesize |
Changed in net-snmp (Ubuntu Bionic): | |
assignee: | nobody → Michał Małoszewski (michal-maloszewski99) |
Yes, it does appear to be a typo, you're right. Grepping the source tree shows "MIBSDIR" only appears in ./debian/ snmptrapd. service and ./debian/ snmpd.service, whereas "MIBDIRS" shows up 144 times in the main source tree.
The issue appears to be present in both bionic (5.7.3+ dfsg-1. 8ubuntu3) and eoan (5.7.3+ dfsg-5ubuntu5) . Looks like it should probably also affect xenial and disco.
I notice, however, that none of these mibs directories actually exist, at least not with just snmptrapd installed (are there any packages that install mibs to any of these dirs?) The service itself seems to function identically with the typo'd env var and with the fixed one. I.e.:
$ sudo apt-get install -y snmptrapd
$ service snmptrapd status
● snmptrapd.service - Simple Network Management Protocol (SNMP) Trap Daemon. system/ snmptrapd. service; disabled; vendor preset: enabled) slice/snmptrapd .service
Loaded: loaded (/lib/systemd/
Active: active (running) since Wed 2019-10-09 22:21:50 UTC; 7s ago
Main PID: 2276 (snmptrapd)
Tasks: 1 (limit: 4915)
CGroup: /system.
└─2276 /usr/sbin/snmptrapd -Lsd -f
Oct 09 22:21:51 triage-bionic snmptrapd[2276]: Cannot adopt OID in UCD-SNMP-MIB: laErrorFlag ::= { laEntry 100 }
(Config search path: /etc/snmp: /usr/share/ snmp:/usr/ lib/x86_ 64-linux- gnu/snmp)
This receiver will *NOT* accept any incoming notifications.
Oct 09 22:21:51 triage-bionic snmptrapd[2276]: Cannot adopt OID in UCD-SNMP-MIB: laLoadFloat ::= { laEntry 6 }
Oct 09 22:21:51 triage-bionic snmptrapd[2276]: Cannot adopt OID in UCD-SNMP-MIB: laLoadInt ::= { laEntry 5 }
Oct 09 22:21:51 triage-bionic snmptrapd[2276]: Cannot adopt OID in UCD-SNMP-MIB: laConfig ::= { laEntry 4 }
Oct 09 22:21:51 triage-bionic snmptrapd[2276]: Cannot adopt OID in UCD-SNMP-MIB: laLoad ::= { laEntry 3 }
Oct 09 22:21:51 triage-bionic snmptrapd[2276]: Cannot adopt OID in UCD-SNMP-MIB: laNames ::= { laEntry 2 }
Oct 09 22:21:51 triage-bionic snmptrapd[2276]: Cannot adopt OID in UCD-SNMP-MIB: laIndex ::= { laEntry 1 }
Oct 09 22:21:51 triage-bionic snmptrapd[2276]: NET-SNMP version 5.7.3 AgentX subagent connected
Oct 09 22:21:51 triage-bionic snmptrapd[2276]: Warning: no access control information configured.
Oct 09 22:21:51 triage-bionic snmptrapd[2276]: NET-SNMP version 5.7.3
By chance, did you discover this error by it causing an actual issue for you? If so, it'd help in SRUing this to know more about how you triggered it and what the impact was.
Meanwhile, I believe you can use 'reportbug --bts debian' to force reporting the error to debian. You can include a link to this bug report (and please let us know the debian bug report so we can link to it from here).