 {"id":20,"date":"2007-03-15T16:22:40","date_gmt":"2007-03-15T21:22:40","guid":{"rendered":"http:\/\/www.networkjack.info\/blog\/archives\/20"},"modified":"2007-12-11T14:52:57","modified_gmt":"2007-12-11T19:52:57","slug":"os-x-snmpd-problems-startup-and-listening-port-specification","status":"publish","type":"post","link":"http:\/\/www.networkjack.info\/blog\/2007\/03\/15\/os-x-snmpd-problems-startup-and-listening-port-specification\/","title":{"rendered":"OS X snmpd problems &#8211; startup and listening port specification"},"content":{"rendered":"<p>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.<\/p>\n<p>First: there is some wierd error that keeps coming up (sometimes) when you try and start snmpd:<\/p>\n<blockquote><p>nlist err: neither icmpstat nor _icmpstat found.<\/p><\/blockquote>\n<p>which I found the answer to fixing <a href=\"http:\/\/www.net-snmp.org\/docs\/README.osX.html\">here.<\/a><\/p>\n<p>Pretty simple, change this line in \/System\/Library\/StartupItems\/SNMP\/SNMP from:<\/p>\n<blockquote><p>\/usr\/sbin\/snmpd  to      \/usr\/sbin\/snmpd -I -icmp<\/p><\/blockquote>\n<p>OK, that fixes that.<\/p>\n<p>Second, I want to specify in the snmpd.conf file data for the &#8220;agentaddress&#8221;. I want to run snmpd on a different port and\/or to restrict it to a backside interface.<\/p>\n<p>so, every time I would put something like this into snmpd.conf:<\/p>\n<blockquote><p>agentaddress  16001<\/p><\/blockquote>\n<p>which is what the interactive snmpconf program put in there itself, I&#8217;d get this annoying error message in \/var\/log\/snmpd.log<\/p>\n<blockquote><p>Error opening specified endpoint &#8220;16001&#8221;<br \/>\nServer Exiting with code 1<\/p><\/blockquote>\n<p>ugh.<\/p>\n<p>I finally figured out how to make the stupid thing work. Don&#8217;t put the agentaddress specification into snmpd.conf; add it to the command that launches snmpd as it can be a command line option.<\/p>\n<p>So finally to get snmpd on OS X to work:<\/p>\n<blockquote><p>\/usr\/sbin\/snmpd -I -icmp<\/p>\n<blockquote><p>becomes:<\/p><\/blockquote>\n<p>\/usr\/sbin\/snmpd -I -icmp 16001  or<\/p>\n<p>\/usr\/sbin\/snmpd -I -icmp 127.0.0.1:16001<\/p><\/blockquote>\n<p>So apparently the issue is somewhere in the code that picks up this information from the config file and not with snmpd in general.<\/p>\n<p>Like I said: VERY annoying.<\/p>\n<p><strong>Update<\/strong>: John Welch of <a href=\"http:\/\/www.afp548.com\/\">AFP548.com<\/a> fame has a new article giving a <a href=\"http:\/\/www.bynkii.com\/archives\/2007\/12\/a_primer_to_snmp_on_mac_os_x_1.html\" title=\" A Primer to SNMP on Mac OS X 10.5 and Mac OS X 10.5 Server\">primer<\/a> on snmp and it&#8217;s use\/setup in 10.5\/Leopard Server. From what we&#8217;ve seen with Leopard Server, Apple has fixed some of the basic flaws in snmp. As in, you don&#8217;t have to do the nonsense above any longer.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.networkjack.info\/blog\/2007\/03\/15\/os-x-snmpd-problems-startup-and-listening-port-specification\/\">Continue reading<span class=\"screen-reader-text\">OS X snmpd problems &#8211; startup and listening port specification<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,8],"tags":[],"class_list":["post-20","post","type-post","status-publish","format-standard","hentry","category-os-x-server","category-servers","entry"],"_links":{"self":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/posts\/20"}],"collection":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":0,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.networkjack.info\/blog\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}