Subject: snmpd: Default not sourced, SNMPDOPTS not changed, 'ia_addr' error resurrected

From: Alessandro Vesely <[email-masked]>
Date: Tue, 14 Jul 2020 18:47:32 +0200

Package: snmpd
Version: 5.7.3+dfsg-5
Severity: normal

Dear Maintainer,

after upgrading to Beowulf, daemon.log gets filled with these:

Jul 14 18:31:46 31 north snmpd[27013]: error on subcontainer 'ia_addr' insert (-1)
Jul 14 18:31:46 31 north snmpd[27013]: error on subcontainer 'ia_addr' insert (-1)
Jul 14 18:31:46 31 north snmpd[27013]: error on subcontainer 'ia_addr' insert (-1)
Jul 14 18:31:46 31 north snmpd[27013]: error on subcontainer 'ia_addr' insert (-1)
Jul 14 18:31:46 31 north snmpd[27013]: error on subcontainer 'ia_addr' insert (-1)
Jul 14 18:31:46 31 north snmpd[27013]: error on subcontainer 'ia_addr' insert (-1)
Jul 14 18:31:46 31 north snmpd[27013]: error on subcontainer 'ia_addr' insert (-1)
[...]

It is an old bug, with a known "solution" consisting in lowering the log level.

However, the Debian maintainer must have changed the original init.d/snmpd
file, since they use systemd instead, so that /etc/default/snmpd does not
get sourced.  Hence the logs.

I just changed /etc/init.d/snmpd (lazy me).

-- System Information:
Distributor ID:	Debian
Description:	Devuan GNU/Linux 3 (beowulf)
Release:	3
Codename:	beowulf
Architecture: x86_64

Kernel: Linux 4.19.0-9-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages snmpd depends on:
ii  adduser                3.118
ii  debconf [debconf-2.0]  1.5.71
ii  libc6                  2.28-10
ii  libmariadb3            1:10.3.22-0+deb10u1
ii  libsnmp-base           5.7.3+dfsg-5
ii  libsnmp30              5.7.3+dfsg-5
ii  libssl1.1              1.1.1d-0+deb10u3
ii  lsb-base               10.2019051400
ii  zlib1g                 1:1.2.11.dfsg-1

snmpd recommends no packages.

Versions of packages snmpd suggests:
pn  snmptrapd  <none>

-- Configuration Files:
/etc/default/snmpd changed:
export MIBS=
SNMPDRUN=yes
SNMPDOPTS='-LS6d -Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid'

/etc/init.d/snmpd changed:
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
DESC="SNMP Services"
DAEMON=/usr/sbin/snmpd
PIDFILE="/run/snmpd.pid"
OLD_MIBS_DIR="/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp"
MIBS_DIR="/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf"
export MIBDIRS="$MIBS_DIR:$OLD_MIBS_DIR"
DEFAULT_SNMPDOPTS="-Ls6d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf"
[ -z "$SNMPDOPTS" ] && SNMPDOPTS=$DEFAULT_SNMPDOPTS
DAEMON_ARGS="$SNMPDOPTS -p $PIDFILE"
do_start_prepare()
{
    	# remove old symlink with previous version
    	if [ -L /var/run/agentx ]; then
		rm -f /var/run/agentx
	fi
	if [ ! -d /var/run/agentx ]; then
		mkdir -p /var/run/agentx
	fi
}

/etc/snmp/snmpd.conf [Errno 13] Permission denied: '/etc/snmp/snmpd.conf'
/etc/snmp/snmptrapd.conf [Errno 13] Permission denied: '/etc/snmp/snmptrapd.conf'

-- debconf information:
  snmpd/upgradefrom36:
  snmpd/upgradefrom521:

---

From: Mark Hindley <[email-masked]>
Date: Tue, 14 Jul 2020 18:58:34 +0100

Control: tags -1 debian

> get sourced.  Hence the logs.

Alessandro,

Thanks for this. However, as you note, this is a Debian bug and Devuan uses the
Debian packages directly. Please would you report this directly to Debian?

Thanks

Mark

---

From: Alessandro Vesely <[email-masked]>
Date: Tue, 14 Jul 2020 20:20:04 +0200

> Debian packages directly. Please would you report this directly to Debian?

Hm... is SysV still a priority there?

Best
Ale

-------- Forwarded Message --------
Subject: Bug#965034: Acknowledgement (snmpd: Default not sourced, SNMPDOPTS not changed, 'ia_addr' error resurrected)
Date: Tue, 14 Jul 2020 18:15:04 +0000
From: Debian Bug Tracking System <[email-masked]>
Reply-To: [email-masked]
To: Alessandro Vesely <[email-masked]>

Thank you for filing a new Bug report with Debian.

You can follow progress on this Bug here: 965034: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965034.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 Net-SNMP Packaging Team <[email-masked]>

If you wish to submit further information on this problem, please
send it to [email-masked].

Please do not send mail to [email-masked] unless you wish
to report a problem with the Bug-tracking system.

-- 
965034: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965034
Debian Bug Tracking System
Contact [email-masked] with problems

---

From: Mark Hindley <[email-masked]>
Date: Tue, 14 Jul 2020 21:15:10 +0100

> Hm... is SysV still a priority there?

No, not a priority but certainly still an option.

Mark