snmpd launched before network is fully up

Bug #844336 reported by Scott Duckworth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
net-snmp (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

If /etc/snmp/snmpd.conf contains hostnames which must be resolved using DNS, snmpd will not be able to resolve those hostnames and seems to ignore those entries. In most cases, DNS is available and this would not be an issue. However, when the system is booted, the snmpd daemon launches before networking is fully up (DHCP has not yet received an IP address from the DHCP server).

We see the following in /var/log/daemon.log:

Sep 7 15:31:08 dragon9 snmpd[1130]: /etc/snmp/snmpd.conf: line 4: Error: bad source address
Sep 7 15:31:08 dragon9 snmpd[1130]: /etc/snmp/snmpd.conf: line 5: Error: bad source address
Sep 7 15:31:08 dragon9 snmpd[1130]: /etc/snmp/snmpd.conf: line 13: Error: bad prefix match parameter "0", should be: exact or prefix - installing anyway
Sep 7 15:31:08 dragon9 snmpd[1130]: net-snmp: 3 error(s) in config file(s)
Sep 7 15:31:08 dragon9 snmpd[1130]: NET-SNMP version 5.4.2.1
Sep 7 15:31:11 dragon9 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 16
Sep 7 15:31:11 dragon9 dhclient: DHCPOFFER of 130.127.48.130 from 130.127.48.1
Sep 7 15:31:11 dragon9 dhclient: DHCPREQUEST of 130.127.48.130 on eth0 to 255.255.255.255 port 67
Sep 7 15:31:11 dragon9 dhclient: DHCPACK of 130.127.48.130 from 130.127.48.1

/etc/init.d/snmpd defines Required-Start to depend on the $network virtual facility, but LSB 3.1 defines $network to be "basic networking support is available. Example: a server program could listen on a socket." which does not imply that things such as DNS name resolution will be available.

Other daemons such as ntpd have the same issue, but they seem to begin to work properly once the system has acquired an IP address via DHCP. snmpd should exhibit this same behavior or it should wait until DNS name resolution is available.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: snmpd 5.4.2.1~dfsg0ubuntu1-0ubuntu2.1
ProcVersionSignature: Ubuntu 2.6.32-28.55-generic 2.6.32.27+drm33.12
Uname: Linux 2.6.32-28-generic x86_64
NonfreeKernelModules: btrfs zlib_deflate crc32c libcrc32c ufs qnx4 hfsplus hfs minix ntfs vfat msdos fat jfs xfs reiserfs vmblock vsock vmci vmmemctl vmhgfs isofs autofs4 binfmt_misc acpiphp nfsd exportfs nfs lockd nfs_acl auth_rpcgss sunrpc snd_ens1371 gameport snd_ac97_codec ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi fbcon tileblit font bitblit ppdev softcursor snd_rawmidi psmouse serio_raw snd_seq_midi_event snd_seq parport_pc snd_timer snd_seq_device snd vga16fb vgastate soundcore snd_page_alloc i2c_piix4 shpchp intel_agp lp parport floppy mptspi e1000 mptscsih mptbase scsi_transport_spi vmxnet
Architecture: amd64
Date: Wed Sep 7 18:16:51 2011
InstallationMedia: Ubuntu 10.04.2 LTS "Lucid Lynx" - Release amd64 (20110211.3)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US
 SHELL=/bin/bash
SNMPVersion:
 NET-SNMP version: 5.4.2.1
 Web: http://www.net-snmp.org/
 Email: <email address hidden>
SourcePackage: net-snmp
mtime.conffile..etc.default.snmpd: 2011-08-11T09:38:53.228531
mtime.conffile..etc.snmp.snmpd.conf: 2011-08-15T14:44:10.762401

Revision history for this message
Scott Duckworth (sduckwo) wrote :
James Page (james-page)
Changed in net-snmp (Ubuntu):
importance: Undecided → Medium
Revision history for this message
dino99 (9d9) wrote :

This version has expired long times ago, and so will never get support

Changed in net-snmp (Ubuntu):
status: New → Invalid
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.