Cannot start the Net-SNMP daemon from systemd (but it works from the command-line)

Solution 1:

The problem comes from the fork of snmpd during start.

My service file (for Exherbo) forces snmpd to not use fork() (-f) and run the service with Type=simple.

Type=forking is the good way for the default behavior of snmpd, but it is incomplete.

It is highly recommended to specify PIDFile when using Type=forking because systemd is not always able to know which process to monitor after the first process exits.

Just add this:

Type=forking
PIDFile=/var/run/snmpd.pid
ExecStart=/usr/sbin/snmpd -p /var/run/snmpd.pid

This change will also fix ExecReload.