Lots of "error on subcontainer 'ia_addr' insert (-1)" reports in /var/log/syslog

Bug #1246347 reported by Thomas Dreibholz on 2013-10-30
This bug affects 27 people
Affects Status Importance Assigned to Milestone
Fix Released
net-snmp (Debian)
Fix Released
net-snmp (Ubuntu)

Bug Description

Lots of "error on subcontainer ‘ia_addr’ insert (-1)" reports are written to /var/log/syslog. The problem *seems* to be IPv6 link-local addresses of GRE tunnels. Several GRE tunnels have the same IPv6 link-local address, which should be okay (since their scope is link-local). However, snmpd seems to have a problem with that.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: snmpd 5.4.3~dfsg-2.4ubuntu1.1
ProcVersionSignature: Ubuntu 3.2.0-55.85-generic 3.2.51
Uname: Linux 3.2.0-55-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: amd64
Date: Wed Oct 30 15:29:46 2013
InstallationMedia: Ubuntu-Server 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120817.3)
MarkForUpload: True
 NET-SNMP version: 5.4.3
 Web: http://www.net-snmp.org/
 Email: <email address hidden>
SourcePackage: net-snmp

UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.snmp.snmpd.conf: [modified]
mtime.conffile..etc.snmp.snmpd.conf: 2013-10-11T12:02:23

Thomas Dreibholz (dreibh) wrote :
Thomas Dreibholz (dreibh) wrote :

Modifying /etc/defaults/snmpd and setting "-Lsd" to "-LS6d" in SNMPDOPTS and TRAPDOPTS hides the error message (as suggested by http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559109). At least, this should be the default then. However, somebody should have a closer look into the code in order to make sure that the link-local IPv6 addresses do not cause any problems.

Changed in netsnmp:
status: Unknown → Fix Released
Thomas Dreibholz (dreibh) wrote :

The Debian bug #559109 is quite old (from 2010). The current Ubuntu package (at least in 12.04 LTS) does *not* have this solution applied. It still uses the wrong logging level, producing the error output.

Changed in net-snmp (Ubuntu):
importance: Undecided → Medium
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in net-snmp (Ubuntu):
status: New → Confirmed
Sina Sadeghi (sina-sa) wrote :

This bug still appears to be present in Ubuntu 14.04

Richard Laager (rlaager) wrote :

I can confirm that `sed -i "s|-Lsd|-LS6d|" /etc/default/snmpd` fixes the problem for me.

Nathan Neulinger (nneul-0) wrote :

Still broken in 16.04 as well.

Martend (martend-baas) wrote :

Same "bug" here on 16.04.1 installation.

Pik Master (pikmaster) wrote :

Hi, the only option that I found, was to recompile the source with this patch.
I created a patch, to get rid of this error:



This showed up "again" despite fixed and picked up in a merge due to switching to systemd.
The new Debian bug about it is https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684721

Changed in net-snmp (Debian):
status: Unknown → New
Kalle Tuulos (kalle-tuulos) wrote :

Just reporting, that this bug still exists in 16.04.3 LTS.

YG Kumar (ygk-kmr) wrote :

Hi All,

I am using 'Ubuntu 16.04.2 LTS \n \l' . I see the following errors when starting snmpd:
snmpd[130282]: error on subcontainer 'ia_addr' insert (-1)

Can someone help me to understand this error please ?

Same error here.!
Any advances with it?

Ivo Steinmann (isteinmann) wrote :

Same error here with Ubuntu 17.04

Mark Constable (markc) wrote :

FWIW I'm still getting this error in my logs on 17.10 artful.

Mark Constable (markc) wrote :

Looks like I can't edit a comment. I found this works for me on 17.10...

sudo -i
cp /lib/systemd/system/snmpd.service /etc/systemd/system/snmpd.service
sed -i "s|-Lsd|-LS6d|" /etc/systemd/system/snmpd.service
systemctl daemon-reload
systemctl restart snmpd

summary: - Lots of "error on subcontainer ‘ia_addr’ insert (-1)" reports in
+ Lots of "error on subcontainer 'ia_addr' insert (-1)" reports in
Andreas Hasenack (ahasenack) wrote :

Confirmed in bionic:
Apr 05 17:44:58 bionic-snmpd snmpd[4740]: error on subcontainer 'ia_addr' insert (-1)
Apr 05 17:45:28 bionic-snmpd snmpd[4740]: error on subcontainer 'ia_addr' insert (-1)

tags: added: bionic
Andreas Hasenack (ahasenack) wrote :

To clarify what I did:
- install snmpd
- install snmp-mibs-downloader
- add a nic alias. With ifconfig I did:
ifconfig eth0:1 netmask

- restart snmpd
- journalctl -u snmpd --follow

Wait a bit. The error should show up every 30s.

carlos (nitrosito) wrote :

Mee to, and not fix with sed -i "s|-Lsd|-LS6d|" /etc/default/snmpd

N1nj4888 (n1nj4888) wrote :

I'm still seeing this issue in Cosmic 18.10. It seems that, by default, snmpd is set to log at the DEBUG level which seems too intensive.

To fix I had to run the following (where "LS4d" indicates LOG_WARNING) as per the snmpd man page info below. With the log level set at LOG_WARNING this also has the added bonus that the many "Connection from UDP: [IP]:PORT->[IP]:PORT" snmpd INFO messages are also not output to /var/log/syslog...

$ sudo sed -i "s|-Lsd|-LS4d|" /lib/systemd/system/snmpd.service
$ sudo systemctl daemon-reload
$ sudo systemctl restart snmpd.service

snmpd man page (https://linux.die.net/man/1/snmpcmd):
0 or ! for LOG_EMERG,
1 or a for LOG_ALERT,
2 or c for LOG_CRIT,
3 or e for LOG_ERR,
4 or w for LOG_WARNING,
5 or n for LOG_NOTICE,
6 or i for LOG_INFO, and
7 or d for LOG_DEBUG.

Changed in net-snmp (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.