Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to get SNMPD working on my Zenoss server that runs Ubuntu Server 14.04. I installed it and configured it but when I start it up, i get the following error in syslog:

Aug 14 08:19:16 zenoss snmpd[9904]: Turning on AgentX master support.
Aug 14 08:19:16 zenoss snmpd[9904]: Turning on AgentX master support.
Aug 14 08:19:16 zenoss snmpd[9904]: Error opening specified endpoint "udp:127.0.0.1:161"
Aug 14 08:19:16 zenoss snmpd[9904]: Server Exiting with code 1

If I run SNMPD at a command line (sudo /usr/sbin/snmpd -f) it works fine. I did a netstat -oan | grep 161 and there is nothing else binding to port 161. Here is my config file (comments removed):

agentAddress  udp:127.0.0.1:161
view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1
rocommunity public  localhost
rwcommunity private localhost
rouser   authOnlyUser
sysLocation    Virtual Machine
sysContact     IT Manager
sysServices    72
load   12 10 5
trap2sink    localhost public
master          agentx

And my snmpd settings file (comments removed):

export MIBS=
SNMPDRUN=yes
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'
TRAPDRUN=no
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
share|improve this question

1 Answer 1

This might be a Permission problem.

under normal situations non-root users are not able to bind to ports <1024 in linux.

However if the SNMPD drops it privileges after creating the socket/endpoint then this should not be your issue.

share|improve this answer
    
I'm fairly new to Linux. How do I check / correct this? –  Caynadian Aug 14 at 13:42
    
try to use a different free port (above 1024) in the config file ( agentAddress), if that is working you know that it is a permission problem and can narrow it down with the search engine of your choice. –  Dennis Nolte Aug 14 at 13:57
    
No, that didn't work either: Error opening specified endpoint "udp:127.0.0.1:11161". –  Caynadian Aug 14 at 14:00
    
Well, I tried using the servers IP address instead (ie: udp:172.16.112.65:161) and that didn't work. I then tried just commenting out the line entirely and that DID work. It binds to 0.0.0.0:161. This will work for me although I didn't really want to allow outside access. –  Caynadian Aug 14 at 14:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.