• 12

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

SNMPD bind error in Ubuntu 14.04 Server

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:"
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:
view   systemonly  included   .
view   systemonly  included   .
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=
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'

The problem seems to be here:

-c /etc/snmp/snmpd.conf

Remove that from your /etc/default/snmpd so it looks like this:

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /var/run/snmpd.pid'

If you want to get snmpd to listen on (or all interfaces) then edit:


So it looks like this:

#  Listen for connections from the local system only
#agentAddress  udp:
#  Listen for connections on all interfaces (both IPv4 *and* IPv6)
agentAddress udp:161,udp6:[::1]:161

Restart SNMP.

  • 3
Reply Report
    • Thanks, but I will have to take your word that this is the solution as we don't even have Zenoss anymore. But hopefully this will be useful to someone else.

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.

  • 0
Reply Report
    • 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.
    • Well, I tried using the servers IP address instead (ie: udp: and that didn't work. I then tried just commenting out the line entirely and that DID work. It binds to This will work for me although I didn't really want to allow outside access.

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags