AgentX++ subagent and net-snmp

Frank Fock Frank.Fock____t-online.de
Fri Aug 30 16:31:00 CEST 2002


Christian,

I tested the NET-SNMP code with AgentX++ on SuSE Linux 8.0.
So, maybe the NET-SNMP work different on Solaris? The
problem could be the different endian. But this has worked
in the past...

I know that Dave Shield has done some work on the AgentX
stuff, maybe you could ask him on the NET-SNMP mailing list.

Best regards,
Frank

Bettendorf, Cristian wrote:
> Thanks Frank, 
> 
> but I still having trouble, sorry but looks that I have no idea about how
> the net-snmp works... may bye you can help me.
> 
> The net-snmp snmpd 5.0.3 daemon create the /var/agentx/master file! ( but
> this don't helps...)
> 
> subagent trace
> ---------------
> 20020830.12:07:56: 7248: (2)EVENT  : SubAgentXMib: opening socket
> 20020830.12:07:56: 7248: (1)INFO   : SubAgentX: bound local (socket)(sd):
> (/var/agentx/subagent07248), (3)
> 20020830.12:07:56: 7248: (1)INFO   : SubAgentX: connected local socket with
> master (sd)(socket): (3), (/var/agentx/master)
> 20020830.12:07:56: 7248: (1)EVENT  : SubAgentXMib: contacting master, please
> wait
> 20020830.12:07:56: 7248: (3)EVENT  : AgentX: sending agentx pdu
> (sd)(type)(sid)(tid)(pid)(err)(errind): (3), (1), (0), (0), (1), (0), (0)
> 20020830.12:08:01: 7248: (5)INFO   : AgentXSlave: no request within (milli
> seconds): (5000)
> 20020830.12:08:01: 7248: (5)DEBUG  : AgentXSlave: received
> (sd)(current)(stop)(status): (3), (-90069207), (-90069211), (0)
> 20020830.12:08:01: 7248: (1)ERROR  : SubAgentXMib: could not open session
> (error): (-11)
> 
> 
> 
> 
> net-snmp snmpd  start sequence
> ----------------------------------
> first removed the /var/agentx/master
> 
> 
>>sudo snmpd -L -f -c
> 
> /FS/fs1065/ARGUS/net-snmp5.0.3/sunsol7_32/sbin/snmpd.conf sunhydra:9161 -x
> /var/agentx/master
> Turning on AgentX master support.
> Note this is still experimental and shouldn't be used on critical systems.
> Error opening specified endpoint "-x"
> Server Exiting with code 1
> 
> o.k. since the /var/agentx/master was not here...
> now starting again, the daemon create self the /var/agentx/master file
> 
> 
>> sudo snmpd -L -f -c
> 
> /FS/fs1065/ARGUS/net-snmp5.0.3/sunsol7_32/sbin/snmpd.conf sunhydra:9161
> Turning on AgentX master support.
> Note this is still experimental and shouldn't be used on critical systems.
> NET-SNMP version 5.0.3
> ^CReceived TERM or STOP signal...  shutting down...
> 
> killed, since the subagent don't connect, '/var/agentx/master' was created
> by snmpd! , next try to start
> 
> 
>>sudo snmpd -L -f sunhydra:9161 -x /var/agentx/master
> 
> Warning: no access control information configured.
>   It's unlikely this agent can serve any useful purpose in this state.
>   Run "snmpconf -g basic_setup" to help you configure the snmpd.conf file
> for this agent.
> Error opening specified endpoint "-x"
> Server Exiting with code 1
> 
>>sudo rm /var/agentx/master
>>sudo touch /var/agentx/master
>>sudo snmpd -L -f sunhydra:9161 -x /var/agentx/master
> 
> Warning: no access control information configured.
>   It's unlikely this agent can serve any useful purpose in this state.
>   Run "snmpconf -g basic_setup" to help you configure the snmpd.conf file
> for this agent.
> Error opening specified endpoint "-x"
> Server Exiting with code 1
> 
> I have compiled the net-snmp whitout any special customization, simple:
> ./configure
> make
> make install
> snmpconf -> created the file
> '/FS/fs1065/ARGUS/net-snmp5.0.3/sunsol7_32/sbin/snmpd.conf' , here are the
> lines:
> 
> rocommunity  public
> rwcommunity  private
> master  agentx
> agentaddress  9161
> 
> Thanks in advance 
> Cristian
> 
> 
> -----Original Message-----
> From: Frank.Fock____t-online.de [mailto:Frank.Fock____t-online.de]
> Sent: Freitag, 30. August 2002 11:33
> To: Bettendorf, Cristian
> Cc: Agent++ Mailing List; 'Frank.Fock____t-online.de'
> Subject: Re: AgentX++ subagent and net-snmp
> 
> 
> 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