Public bug reported:

Sometimes snmpd starts too early in the bootprocess and cannot resolve
hostnames in the access control part of the configuration.

This might be related to the dependencies of the snmpd systemd-unit.
Seems like snmpd should depend on network-online.target, not network.target.

Logging output:

sebastian.schneider@HOSTNAME:~$ sudo less /var/log/syslog
...
Sep  4 03:07:54 hostname snmpd[736]: /etc/snmp/snmpd.conf: line 1: Error: 
cannot resolve source hostname
Sep  4 03:07:54 hostname snmpd[736]: net-snmp: 1 error(s) in config file(s)
...

snmpd.conf:

sebastian.schneider@HOSTNAME:~$ cat /etc/snmp/snmpd.conf
rocommunity COMMUNITY HOSTNAME .1
rwcommunity COMMUNITY HOSTNAME
...

relevant part of the systemd-unit:

sebastian.schneider@HOSTNAME:~$ sudo systemctl cat snmpd | grep network
After=network.target
sebastian.schneider@HOSTNAME:~$


Ubuntu Release / Package Version:

snmpd Package 5.7.3+dfsg-5ubuntu5 on Ubuntu 19.10
snmpd Package 5.8+dfsg-2ubuntu2.3 on Ubuntu 20.04.1 LTS


Please note that this has been confirmed as a bug and was fixed in RedHat 
Packages of net-snmp:

https://bugzilla.redhat.com/show_bug.cgi?id=1775304
https://bugzilla.redhat.com/show_bug.cgi?id=1388118

** Affects: net-snmp (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1894190

Title:
  snmpd starts before the network stack is fully online (network.target
  vs network-online.target)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1894190/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to