Fork me on GitHub
Suzf  Blog

How-to fix SNMPD daemon fails to start

SNMPD daemon fails to start

Symptoms

The 'service snmpd start' command does not return any error, but 'ps auxw | grep snmpd' command shows that the SNMPD daemon is not running.

/var/log/snmpd.log shows:
getaddrinfo("IP_Address", NULL, ...): Address family for hostname not supported
Error opening specified endpoint "IP_Address:161"
Server Exiting with code 1

We should check that nothing in /etc/default/snmpd or /etc/sysconfig/snmpd.options is over-riding your configuration.
I think by default, the local loopback address (127.0.0.1) is passed in the SNMPDOPTS directive.
if yes, Remove the unknown IP_Address:161 from the SNMPDOPTS

now start the snmpd again.