Skip to main content.
March 15th, 2007

OS X snmpd problems - startup and listening port specification

For some reason, for a long while now net-snmp which the snmpd agent on OS X is based on has been broken in several aspects.

First: there is some wierd error that keeps coming up (sometimes) when you try and start snmpd:

nlist err: neither icmpstat nor _icmpstat found.

which I found the answer to fixing here.

Pretty simple, change this line in /System/Library/StartupItems/SNMP/SNMP from:

/usr/sbin/snmpd to /usr/sbin/snmpd -I -icmp

OK, that fixes that.

Second, I want to specify in the snmpd.conf file data for the “agentaddress”. I want to run snmpd on a different port and/or to restrict it to a backside interface.

so, every time I would put something like this into snmpd.conf:

agentaddress 16001

which is what the interactive snmpconf program put in there itself, I’d get this annoying error message in /var/log/snmpd.log

Error opening specified endpoint “16001″
Server Exiting with code 1

ugh.

I finally figured out how to make the stupid thing work. Don’t put the agentaddress specification into snmpd.conf; add it to the command that launches snmpd as it can be a command line option.

So finally to get snmpd on OS X to work:

/usr/sbin/snmpd -I -icmp

becomes:

/usr/sbin/snmpd -I -icmp 16001 or

/usr/sbin/snmpd -I -icmp 127.0.0.1:16001

So apparently the issue is somewhere in the code that picks up this information from the config file and not with snmpd in general.

Like I said: VERY annoying.

Update: John Welch of AFP548.com fame has a new article giving a primer on snmp and it’s use/setup in 10.5/Leopard Server. From what we’ve seen with Leopard Server, Apple has fixed some of the basic flaws in snmp. As in, you don’t have to do the nonsense above any longer.

Posted by Brian Blood in OS X Server, Servers

This entry was posted on Thursday, March 15th, 2007 at 4:22 pm and is filed under OS X Server, Servers. You can follow any responses to this entry through the comments RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.