Net-snmp subagent wont connect when * is ran as a service

Hi,

Anyone have a solution for this?

When I start asterisk using ‘asterisk -cvvvvv’ ie not run as a service, I can get my net-snmp subagent to connect:

“NET-SNMP version 5.3.1 AgentX subagent connected”

If I exit asterisk then run it as a service ie ‘service asterisk start’ then ‘asterisk -r’

Nothing for the AgentX subagent appears, even we we stop and start snmpd, or reload. It just doesn’t appear to see the subagent at all, or even try and look for it. Doing a ‘show modules like snmp’ reveals that the module is loaded OK.

Checking the * messages log reveal no recent errors or warnings using

cat /var/log/asterisk/messages | grep snmp

I am running asterisk as root (not sure this is 100% wise), and doing ‘ps -ef | grep asterisk’ reveals that they are being run as root using both methods of start, so do not see this as the issue.

Checking the system log at /var/log/messages reveals that when I start as a service I get this error

Aug 31 12:12:56 xiptel snmpd[3624]: NET-SNMP version 5.3.1 restarted
Aug 31 12:12:56 xiptel snmpd[3624]: Turning on AgentX master support.
Aug 31 12:12:56 xiptel snmpd[3624]: error on subcontainer ‘’ insert (-1)

which does not appear when started using asterisk -cvvvv

Googling reveals very little on this error - has anyone seen this before?

TIA

Robert McNaught

My snmpd.conf is

rocommunity astcom
master agentx
#agentXSocket tcp:192.168.2.54:705
agentXperms 0660 0550 nobody asterisk
com2sec local localhost astcom
com2sec mynetwork0 255.255.255.0/24 astcom
group MyROGroup v2c local
group MyROGroup v2c mynetwork0
#group MyROGroup any mynetwork1
#group MyROGroup any mynetwork2
#group MyROGroup any mynetwork3
view all included .1
access MyROGroup “” v2c noauth exact all none none