AgentX++ subagent and net-snmp

Frank Fock Frank.Fock____t-online.de
Fri Aug 30 11:33:16 CEST 2002


Christian,

Sorry that my response took that long, but I had to
install the latest NET-SNMP first ;-)

Running the AgentX++ subagent as subagent to a
NET-SNMP v5.0.3 master works on both UNIX domain
sockets and TCP.

In order to use UNIX domain sockets, run the NET-SNMP
agent with:

/snmpd hostname:port -x /var/agentx/master

In contrast to the AgentX++ master agent, the NET-SNMP
master does not create the "file" /var/agentx/master
if it is not present yet. So if it is not there on your
system, you might have to

touch /var/agentx/master

as root.

In order to use TCP for AgentX communication run the
NET-SNMP master as root with:

/snmpd hostname:port -x TCP:705

The subagent does not need to root in this case.
Hope this helps.

Best regards,
Frank

Bettendorf, Cristian wrote:
> Hello,
> 
> I'm new to the AgentX stuff and have problems to get running the subagent
> examples with the net snmp 5.0.3 on Solaris 7.
> I'm using AgentX++ v1.4.2b + AGENT++v3.5.4a + SNMP++ 3.2a
> 
> The net-snmp5.0.3 daemon 'snmpd' is running with root rights, agentx support
> is 'on', TCP port for agentx NOT configured in /etc/services:
> $ netstat -a | grep agentx
> 70d2d818 stream-ord 718b9750 00000000 /var/agentx/master  
> 
> The daemon don't listen on the default agentx TCP port 705.
> 
> The subagent is started also with root rights but don't connect to the
> master. 
> 
> Unix domain sockets:
> 20020828.12:43:40: 4372: (2)EVENT  : SubAgentXMib: opening socket
> 20020828.12:43:40: 4372: (1)INFO   : SubAgentX: bound local (socket)(sd):
> (/var/agentx/subagent04372), (7)
> 20020828.12:43:40: 4372: (1)INFO   : SubAgentX: connected local socket with
> master (sd)(socket): (7), (/var/agentx/master)
> 20020828.12:43:40: 4372: (1)EVENT  : SubAgentXMib: contacting master, please
> wait
> 20020828.12:43:40: 4372: (3)EVENT  : AgentX: sending agentx pdu
> (sd)(type)(sid)(tid)(pid)(err)(errind): (7), (1), (0), (0), (1), (0), (0)
> 20020828.12:43:45: 4372: (5)INFO   : AgentXSlave: no request within (milli
> seconds): (5000)
> 20020828.12:43:45: 4372: (5)DEBUG  : AgentXSlave: received
> (sd)(current)(stop)(status): (7), (-260725761), (-260725753), (0)
> 20020828.12:43:50: 4372: (5)INFO   : AgentXSlave: no request within (milli
> seconds): (5000)
> 20020828.12:43:50: 4372: (5)DEBUG  : AgentXSlave: received
> (sd)(current)(stop)(status): (7), (-260720761), (-260725753), (0)
> 20020828.12:43:50: 4372: (1)ERROR  : SubAgentXMib: could not open session
> (error): (-11)
> 
> Using only TCP sockets has the same result since it looks that the master
> don't use the TCP sockets. How to find out what's wrong with the net-snmp
> stuff? How to configure net-snmp to use Tcp ports?
> 
> The same subagent works using UNIX domain sockets communication if I'm using
> the provided master agent example.
> 
> Thanks in advance for any suggestions,
> Cristian
> 
> 
> 







More information about the AGENTPP mailing list