[SRU] snmpd: error getting netmask for interface

Bug #270713 reported by Ian! D. Allen
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
net-snmp (Ubuntu)
Fix Released
Undecided
Unassigned
Hardy
Fix Released
Undecided
Chuck Short
Intrepid
Won't Fix
Undecided
Chuck Short
Jaunty
Fix Released
Undecided
Chuck Short

Bug Description

Binary package hint: snmpd

Ubuntu 8.04.1
snmpd 5.4.1~dfsg-4ubuntu4

snmpd 5.4.1 needs to be updated to 5.4.2 to get rid of these errors in syslog:

    snmpd[27689]: error getting netmask for interface 2

Syslog fills with hundreds of these errors if you have a network
interface, e.g. eth2, with no IP address, but you have an alias,
e.g. eth2:1, that does have an IP address (and netmask).

Please pull down the patched version 5.4.2 from upstream?
Or perhaps you can point me at a package repository that has a patched version?

ProblemType: Bug
Architecture: i386
Date: Mon Sep 15 19:46:56 2008
DistroRelease: Ubuntu 8.04
Package: snmpd 5.4.1~dfsg-4ubuntu4
PackageArchitecture: i386
ProcEnviron:
 SHELL=/bin/bash
 PATH=/home/idallen/bin86:/home/idallen/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LC_COLLATE=C
 LANG=C
 LC_CTYPE=en_CA.utf8
SourcePackage: net-snmp
Uname: Linux 2.6.24-19-generic i686

Revision history for this message
Ian! D. Allen (idallen) wrote :
Revision history for this message
Chuck Short (zulcss) wrote :

Hi Ian,

Is that all the message you are getting about snmpd in your syslog?

Thanks
chuck

Changed in net-snmp:
status: New → Invalid
status: Invalid → Incomplete
Revision history for this message
Ian! D. Allen (idallen) wrote :

No, I'm getting lots of informational messages as well. A small excerpt today:

Sep 22 18:40:02 idallen-oak snmpd[27689]: Connection from UDP: [127.0.0.1]:59952
Sep 22 18:40:02 idallen-oak snmpd[27689]: Connection from UDP: [127.0.0.1]:33307
Sep 22 18:40:09 idallen-oak snmpd[27689]: error getting netmask for interface 2
Sep 22 18:40:10 idallen-oak snmpd[27689]: error getting netmask for interface 2

It's the only *error* message I'm getting. Go read the change logs for 5.4.2 - it's all documented there.

Revision history for this message
Chuck Short (zulcss) wrote :

Ill see if I can backport the patch for you.

Regards
chuck

Revision history for this message
Chuck Short (zulcss) wrote :

Can you try the version in my ppa when its built (http://launchpad.net/~zulcss/+archive)?

Thanks
chuck

Revision history for this message
Ian! D. Allen (idallen) wrote : Re: [Bug 270713] Re: snmpd: error getting netmask for interface
Download full text (3.2 KiB)

On Mon, Oct 27, 2008 at 01:35:44PM -0000, Chuck Short wrote:
> Can you try the version in my ppa when its built
> (http://launchpad.net/~zulcss/+archive)?

- added your two deb entries to /etc/apt/sources.list
- apt-get install snmpd:

The following packages will be upgraded:
  snmpd
1 upgraded, 0 newly installed, 0 to remove and 54 not upgraded.
Need to get 74.3kB of archives.
After this operation, 0B of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  snmpd
Install these packages without verification [y/N]? y
Get:1 http://ppa.launchpad.net hardy/main snmpd 5.4.1~dfsg-4ubuntu5~ppa2 [74.3kB]
Fetched 74.3kB in 0s (90.5kB/s)
Preconfiguring packages ...
(Reading database ... 160245 files and directories currently installed.)
Preparing to replace snmpd 5.4.1~dfsg-4ubuntu4 (using .../snmpd_5.4.1~dfsg-4ubuntu5~ppa2_i386.deb) ...
Stopping network management services: snmpd snmptrapd.
Unpacking replacement snmpd ...
Setting up snmpd (5.4.1~dfsg-4ubuntu5~ppa2) ...
Starting network management services: snmpd.

- then it said:

Oct 27 12:16:31 hardy snmpd[27523]: netsnmp_assert !"registration != duplicate" failed agent_registry.c:535 netsnmp_subtree_load()
Oct 27 12:16:31 hardy last message repeated 2 times
Oct 27 12:16:31 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:16:31 hardy snmpd[27523]: error getting netmask for interface 3
Oct 27 12:16:31 hardy snmpd[27523]: could not open /proc/net/if_inet6
Oct 27 12:16:31 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:16:31 hardy snmpd[27523]: error getting netmask for interface 3
Oct 27 12:16:31 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:16:31 hardy snmpd[27523]: error getting netmask for interface 3
Oct 27 12:16:46 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:16:46 hardy snmpd[27523]: error getting netmask for interface 3
Oct 27 12:17:01 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:17:01 hardy snmpd[27523]: error getting netmask for interface 3
Oct 27 12:17:01 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:17:01 hardy snmpd[27523]: error getting netmask for interface 3
Oct 27 12:17:16 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:17:16 hardy snmpd[27523]: error getting netmask for interface 3
Oct 27 12:17:31 hardy snmpd[27523]: cannot open /proc/net/snmp6 ...
Oct 27 12:17:31 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:17:31 hardy snmpd[27523]: error getting netmask for interface 3
Oct 27 12:17:31 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:17:31 hardy snmpd[27523]: error getting netmask for interface 3
Oct 27 12:17:46 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:17:46 hardy snmpd[27523]: error getting netmask for interface 3
Oct 27 12:18:01 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:18:01 hardy snmpd[27523]: error getting netmask for interface 3
Oct 27 12:18:01 hardy snmpd[27523]: error getting netmask for interface 2
Oct 27 12:18:01 hardy snmpd[27523]: error getting netmask for interface...

Read more...

Revision history for this message
Ian! D. Allen (idallen) wrote : Re: snmpd: error getting netmask for interface

Updated info on Chuck's attempt to fix the bug - didn't work. -Ian!

Changed in net-snmp:
status: Incomplete → New
Revision history for this message
wolfiewo (jce-ral-cpa) wrote :

I am also getting this error message and it is filling up my syslogs.

Revision history for this message
JacobSteelsmith (jacobsteelsmith) wrote :

Same here.

May 18 07:03:16 b67694-shk220 snmpd[4034]: error getting netmask for interface 1

Revision history for this message
Chuck Short (zulcss) wrote :

Ill take a look at this some more.

Regards.
chuck

Changed in net-snmp (Ubuntu):
status: New → Confirmed
Revision history for this message
Chuck Short (zulcss) wrote :
Changed in net-snmp (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Chuck Short (zulcss) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package net-snmp - 5.4.1~dfsg-12ubuntu6

---------------
net-snmp (5.4.1~dfsg-12ubuntu6) karmic; urgency=low

  * debian/patches/101-fix-ipalias.patch : Fix flooding syslog -
    Syslog fills with hundreds of these errors if you have a network
    interface, e.g. eth2, with no IP address, but you have an alias,
    e.g. eth2:1, that does have an IP address (and netmask).
    (LP: #270713)
  * debian/patches/103-fix-ubuntu-lmsensors.patch: Point to the right
    place for /etc/sensors3.conf. (LP: #192745)

 -- Chuck Short <email address hidden> Mon, 14 Sep 2009 12:19:41 -0400

Changed in net-snmp (Ubuntu):
status: In Progress → Fix Released
Chuck Short (zulcss)
summary: - snmpd: error getting netmask for interface
+ [SRU] snmpd: error getting netmask for interface
Revision history for this message
Chuck Short (zulcss) wrote :

statement explaining the impact

Net-snmp in all versions of Ubuntu up until Karmic have this problem. This is caused by a bug in net-snmp and ip aliasing. When a user tries to use an interface with the physical interface is unconfigured and an ip alias is configured for the same interface the following will be spewed out in /var/log/syslog:

snmpd[27523]: error getting netmask for interface 2

How this bug has been addresses:

The bug has been fixed in the SVN tree for net-snmp at:

http://net-snmp.svn.sourceforge.net/viewvc/net-snmp/trunk/net-snmp/agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c?r1=16381&r2=16778

I have backported the patch to Karmic and tested it myself, its now fixed in Karmic. I have attached the patch to this bug report as well.

How to reproduce:

1. In a virtual machine, add a second ethernet interface.
2. Create an ipalias such as the following:
          sudo ifconfig ethX:1 xxx.xxx.xxx.xxx netmask 255.255.255.0 up
3. Install and configure snmpd and snmp
4. Run snmpd and check the output of /var/log/syslog.

Impact:

There should be no regression potential with this patch.

If you have any question please let me know.

Regards
chuck

Revision history for this message
Chuck Short (zulcss) wrote :
Changed in net-snmp (Ubuntu Hardy):
assignee: nobody → Chuck Short (zulcss)
Changed in net-snmp (Ubuntu Intrepid):
assignee: nobody → Chuck Short (zulcss)
Changed in net-snmp (Ubuntu Jaunty):
assignee: nobody → Chuck Short (zulcss)
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted net-snmp into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in net-snmp (Ubuntu Jaunty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted net-snmp into hardy-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in net-snmp (Ubuntu Hardy):
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted net-snmp into intrepid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in net-snmp (Ubuntu Intrepid):
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Anyone who could test the packages in *-proposed?

Revision history for this message
JacobSteelsmith (jacobsteelsmith) wrote :

I am no longer getting this error, but I can still test the package if you'd like.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 270713] Re: [SRU] snmpd: error getting netmask for interface

JacobSteelsmith [2009-10-28 18:56 -0000]:
> I am no longer getting this error, but I can still test the package if
> you'd like.

Would be nice. Regression testing is very important, and if the
package still works, it can go to -updates. Thanks!
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
JacobSteelsmith (jacobsteelsmith) wrote :

I have this in syslog after upgrading:

Oct 28 12:55:23 b67694-shk220 snmpd[4109]: Received TERM or STOP signal... shutting down...
Oct 28 12:55:31 b67694-shk220 snmpd[27883]: /etc/snmp/snmpd.conf: line 77: Error: Blank line following proc token.
Oct 28 12:55:31 b67694-shk220 snmpd[27883]: /etc/snmp/snmpd.conf: line 92: Error: Blank line following disk token.
Oct 28 12:55:31 b67694-shk220 snmpd[27883]: net-snmp: 2 error(s) in config file(s)
Oct 28 12:55:31 b67694-shk220 snmpd[27883]: /etc/snmp/snmpd.conf: line 77: Error: Blank line following proc token.
Oct 28 12:55:31 b67694-shk220 snmpd[27883]: /etc/snmp/snmpd.conf: line 92: Error: Blank line following disk token.
Oct 28 12:55:31 b67694-shk220 snmpd[27883]: /etc/snmp/snmpd.conf: line 136: Warning: Unknown token: system.sysDescr.0.
Oct 28 12:55:31 b67694-shk220 snmpd[27883]: /etc/snmp/snmpd.conf: line 137: Warning: Unknown token: system.sysContact.0.
Oct 28 12:55:31 b67694-shk220 snmpd[27883]: /etc/snmp/snmpd.conf: line 138: Warning: Unknown token: system.sysName.0.
Oct 28 12:55:31 b67694-shk220 snmpd[27883]: /etc/snmp/snmpd.conf: line 139: Warning: Unknown token: system.sysLocation.0.
Oct 28 12:55:31 b67694-shk220 snmpd[27883]: net-snmp: 2 error(s) in config file(s)
Oct 28 12:55:31 b67694-shk220 snmpd[27883]: NET-SNMP version 5.4.1

But it seems that was happening before. Other than that, things seem normal and functional. I'll comment here if I experience otherwise.

Revision history for this message
Martin Pitt (pitti) wrote :

Jacob, thanks. Which release are you on?

Revision history for this message
JacobSteelsmith (jacobsteelsmith) wrote :

No problem. Kubuntu 9.04. I can confirm the snmp information is being
read by another box running cacti. I can also use snmpwalk to view the
information.

On Thu, Oct 29, 2009 at 8:32 AM, Martin Pitt <email address hidden> wrote:
> Jacob, thanks. Which release are you on?
>
> --
> [SRU] snmpd: error getting netmask for interface
> https://bugs.launchpad.net/bugs/270713
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package net-snmp - 5.4.1~dfsg-12ubuntu3.1

---------------
net-snmp (5.4.1~dfsg-12ubuntu3.1) jaunty-proposed; urgency=low

  * debian/patches/101-fix-ipalias.patch: Fix flooding syslog -
     Syslog fills with hundreds of these errors if you have a network
     interface, e.g. eth2, with no IP address, but you have an alias,
     e.g. eth2:1, that does have an IP address (and netmask).
     (LP: #270713)
  * debian/patches/103-fix-ubuntu-lmsensors.patch: Point to the right
     place for /etc/sensors3.conf. (LP: #192745)
  * debian/patches/99-fix-perl-counter-in-subagent.patch: Fix for Counter64 in
     perl subagent. (LP: #406171)

 -- Chuck Short <email address hidden> Tue, 15 Sep 2009 15:53:48 -0400

Changed in net-snmp (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Martin Pitt (pitti)
tags: added: verification-needed
removed: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package net-snmp - 5.4.1~dfsg-4ubuntu4.3

---------------
net-snmp (5.4.1~dfsg-4ubuntu4.3) hardy-proposed; urgency=low

  * debian/patches/101-fix-ipalias.patch: Fix flooding syslog -
    Syslog fills with hundreds of these errors if you have a network
    interface, e.g. eth2, with no IP address, but you have an alias,
    e.g. eth2:1, that does have an IP address (and netmask).
    (LP: #270713)
  * debian/patches/103-fix-ubuntu-lmsensors.patch: Point to the right
    place for /etc/sensors3.conf. (LP: #192745)
  * debian/patches/99-fix-perl-counter-in-subagent.patch: Fix for Counter64 in
    perl subagent. (LP: #406171)
  * debian/patches/53_fix_python_regression.patch: Fix python segmentation fault.
    (LP: #347361)
  * debian/patches/54_fix_registration_error.patch: Surpresses annoying
    registrations in startup. (LP: #200614)

 -- Chuck Short <email address hidden> Tue, 15 Sep 2009 14:13:51 -0400

Changed in net-snmp (Ubuntu Hardy):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Hardy update was tested in bug 200614.

Revision history for this message
Martin Pitt (pitti) wrote :

Anyone who can test the package in intrepid-proposed and confirm that it still works and fixes the issue? Otherwise it will be removed from -proposed again.

Revision history for this message
Martin Pitt (pitti) wrote :

This intrepid-proposed SRU has not been verified in the last three months or longer. Intrepid will go out of support in less than two months, so it is not worth pursuing this SRU any further.

I removed the intrepid-proposed version from the archive.

Changed in net-snmp (Ubuntu Intrepid):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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