8

OS: Debian 5.0.3
SNMPD Version: 5.4.1

I have the following two lines in my snmpd.conf file:

interface eth0
agentaddress udp:161

I'm getting the following errors in my syslog:

Oct 5 18:04:44 webdb003 snmpd[29864]: /etc/snmp/snmpd.conf: line 434: Error: Missing TYPE parameter
Oct 5 18:04:44 webdb003 snmpd[29864]: net-snmp: 1 error(s) in config file(s)
Oct 5 18:04:44 webdb003 snmpd[29864]: Error opening specified endpoint "udp:161"
Oct 5 18:04:44 webdb003 snmpd[29864]: Server Exiting with code 1

The documentation here says that thats the correct syntax though. However, if I change it to agentaddress 127.0.0.1:161, I can properly snmpwalk the MIB listing when connecting to localhost. My issue is that I also want it to be able to snmpwalk on the public address too without having to specify a public address because I have to push out this config file to all my servers and I really don't feel like writing a config file for each server just because of the ip address differences.

3 Answers 3

6

You may want to double check that nothing in /etc/default/snmpd is over-riding your configuration. I think by default, the local loopback address (127.0.0.1) is passed in the SNMPDOPTS directive.

I could be mistaken, I just remember having to change that the last time I installed it for Cacti on a Debian system, but I think that was the prior version.

0
5

Try the following:

agentaddress 0.0.0.0:161

Using the address "0.0.0.0" tells most applications/libraries to bind to all addresses.

2
  • although what you said works, the problem is actually the answer submitted by tinkertim. thanks anyways!
    – chizou
    Oct 6, 2009 at 15:14
  • 1
    The suggestion by @tim-post didn't help me but the one by @charles-hooper did. I now have agentAddress udp:0.0.0.0:161,udp6:[::1]:161 in /etc/snmp/snmpd.conf and my daemon starts. Sep 7, 2016 at 15:48
1

I got this error when attempting to start snmpd on a system where IPv6 was disabled.

I fixed the issue by changing the below line in /etc/snmp/snmpd.conf:

agentAddress udp:161,udp6:[::1]:161

To the following:

agentAddress udp:161

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .