AgentX config directives (like agentxsocket) are
applied too late in AgentX subagents (like snmptrapd).
The subagent tries to connect to the AgentX master
*before* it has parsed and applied the necessary config
settings which leads to timeouts or errors, depending
on how the config differs from the default settings.
Here's an example (CVS MAIN):
foo# cat /tmp/snmp/snmptrapd.conf
[snmp] persistentDir /tmp/snmp/persist
agentxsocket /tmp/snmp/agentxsocket
foo# SNMPCONFPATH=/tmp/snmp:/tmp/snmp/persist
/bc/net-snmp-5.3cvs/sbin/snmptrapd -f -Le -Dagentx
localhost:8162
registered debug token agentx, 1
agentx/subagent: initializing....
agentx/subagent: agentx_reopen_session(0) called
agentx/subagent: opening session...
agentx/subagent: subagent not properly attached,
postponing registration till later....
agentx_register_app_config_handler: registering .conf
token for "agentxsocket"
agentx/subagent: init_subagent sess 080528e8
agentx_register_app_config_handler: registering .conf
token for "agentxsocket"
agentx/config: port spec: /tmp/snmp/agentxsocket
2005-10-18 00:11:50 NET-SNMP version 5.3.dev Started.
Logged In: YES
user_id=76148
Fixed in 5.3. Not sure about backporting to 5.2.x.. need to find a minimal set of changes..