AgentX++ subagent and net-snmp

Bettendorf, Cristian Cristian.Bettendorf____softwareag.com
Mon Sep 2 14:04:58 CEST 2002


Frank,

yes, this had turned me on the right way. As expected, the mistake was on my
side... I had compiled all stuff (snmp++, agent++, agentx++) with the same
settings taken from the agent++, whitout -DWORDS_BIGENDIAN for the agentx++
and this was bad. Your settings in the Makefile.solaris are right.

Also net-snmp and agentx++ are inter operable, nothing specific to do, just
use the right compiler defines for each involved part...

Thanks again for all infos,
Cristian

-----Original Message-----
From: Frank.Fock____t-online.de [mailto:Frank.Fock____t-online.de]
Sent: Montag, 2. September 2002 12:14
To: Bettendorf, Cristian
Cc: Agent++ Mailing List
Subject: Re: AgentX++ subagent and net-snmp


Christian,

Did you try to compile the AgentX++ library and subagent
without the
-DWORDS_BIGENDIAN
which is defined by default in the Makefile.solaris?

I had to define this in the past for NET-SNMP v4.x, to
make AgentX++ inter operate with NET-SNMP. In version
4.2.x the WORDS_BIGENDIAN seems to be defined in by
/configure on SPARC platform, whereas the 5.x version
does not ever define WORDS_BIGENDIAN. So please try
compiling either NET-SNMP with -DWORDS_BIGENDIAN or
AgentX++ without -DWORDS_BIGENDIAN to make both
implementations with the same setting.

 From the error code the AgentX++ subagent returns (-11),
the master agent does not understand the session open
AgentX PDU at all and thus the master does not respond
which leads to the timeout (-11).

Hope this helps.

Best regards,
Frank

Bettendorf, Cristian wrote:
> Frank,
> 
> I can't find any hint more on this problems and on my side the agentx++
> stuff still not working with net-snmp 5.0.3 on Solaris 7 32bit.
> I have recompiled the net-snmp stuff, the agentx++ 'subagent2' example and
> the original subagent tutorial example provided on the net-snmp site. The
> net-snmp subagent example works, the agentx++ subagent example NOT...
> 
> So far, here could be a bug inside the net-snmp or inside agentx++, anyway
> the systems looks to not work together.
> 
> Could you please confirm that the used agentx++ version(latest) works with
> this net-snmp version(latest) on Solaris7 and above?
> Attached the trace session logs.
> 
> Any help much appreciated.
> 
> Best regards,
> Cristian
> 
> 
> net-snmp snmpd trace, try to connect the agentx++ subagent2
> -------------------------------------------------------------
> 
>>sudo ./snmpd -f -L -x /var/agentx/master -Dagentx
> 
> type your password:
> agentx/subagent: init_subagent sess 002b2d48
> Turning on AgentX master support.
> Note this is still experimental and shouldn't be used on critical systems.
> agentx/master: initializing...
> agentx/master: initializing...   DONE
> NET-SNMP version 5.0.3
> agentx/master: transport disconnect on session 002e0f20
> agentx/master: close 002e0f20, -1
> 
> agentx++ subagent2 trace
> ----------------------------
> 20020902.10:01:33: 22910: (1)DEBUG  : TaskManager: thread started
> 20020902.10:01:33: 22910: (1)DEBUG  : Thread: started (tid): (4)
> 20020902.10:01:33: 22910: (1)DEBUG  : TaskManager: thread started
> 20020902.10:01:33: 22910: (1)DEBUG  : Thread: started (tid): (5)
> 20020902.10:01:33: 22910: (1)DEBUG  : Thread: started (tid): (6)
> 20020902.10:01:33: 22910: (1)DEBUG  : TaskManager: thread started
> 20020902.10:01:33: 22910: (1)DEBUG  : TaskManager: thread started
> 20020902.10:01:33: 22910: (1)DEBUG  : Thread: started (tid): (7)
> 20020902.10:01:33: 22910: (3)DEBUG  : MibContext: adding MIB object
> (context)(oid): (), (1.3.6.1.2.2.1.2.1.0)
> 20020902.10:01:33: 22910: (3)DEBUG  : MibContext: adding MIB object
> (context)(oid): (), (1.3.6.1.2.2.1.2.2.0)
> 20020902.10:01:33: 22910: (3)DEBUG  : MibContext: adding MIB object
> (context)(oid): (), (1.3.6.1.2.2.1.5.2.0)
> 20020902.10:01:33: 22910: (3)DEBUG  : MibContext: adding MIB object
> (context)(oid): (subagent2), (1.3.6.1.2.1.37)
> 20020902.10:01:33: 22910: (3)DEBUG  : MibContext: adding MIB object
> (context)(oid): (), (1.3.6.1.4.1.4976.6.3)
> 20020902.10:01:33: 22910: (3)DEBUG  : MibContext: adding MIB object
> (context)(oid): (), (1.3.6.1.4.1.4976.6.2)
> 20020902.10:01:33: 22910: (2)EVENT  : SubAgentXMib: opening socket
> 20020902.10:01:33: 22910: (1)INFO   : SubAgentX: bound local (socket)(sd):
> (/var/agentx/subagent22910), (3)
> 20020902.10:01:33: 22910: (1)INFO   : SubAgentX: connected local socket
with
> master (sd)(socket): (3), (/var/agentx/master)
> 20020902.10:01:33: 22910: (1)EVENT  : SubAgentXMib: contacting master,
> please wait
> 20020902.10:01:33: 22910: (3)EVENT  : AgentX: sending agentx pdu
> (sd)(type)(sid)(tid)(pid)(err)(errind): (3), (1), (0), (0), (1), (0), (0)
> 20020902.10:01:38: 22910: (5)INFO   : AgentXSlave: no request within
(milli
> seconds): (5000)
> 20020902.10:01:38: 22910: (5)DEBUG  : AgentXSlave: received
> (sd)(current)(stop)(status): (3), (161547254), (161547261), (0)
> 20020902.10:01:43: 22910: (5)INFO   : AgentXSlave: no request within
(milli
> seconds): (5000)
> 20020902.10:01:43: 22910: (5)DEBUG  : AgentXSlave: received
> (sd)(current)(stop)(status): (3), (161552254), (161547261), (0)
> 20020902.10:01:43: 22910: (1)ERROR  : SubAgentXMib: could not open session
> (error): (-11)
> 
> 
> Now I have used the net-snmp tutorial and build the provided subagent
> example (URL:
http://www.net-snmp.org/tutorial-5/toolkit/demon/index.html),
> executable name 'example-demon'. 
> 
> This subagent WORK!
> 
> 
> 
>>sudo example-demon&
> 
> type your password:
> 
>>snmpwalk -v 1 -c public localhost:9161 .1.3.6.1.4.1.8072.2.4
> 
> NET-SNMP-MIB::netSnmp.2.4.1.1.2.0 = INTEGER: 2
> 
> snmpd trace, looks better...
> ---------------------------------
> 
>>sudo ./snmpd -f -L -x /var/agentx/master -Dagentx
> 
> type your password:
> agentx/subagent: init_subagent sess 002b2d48
> Turning on AgentX master support.
> Note this is still experimental and shouldn't be used on critical systems.
> agentx/master: initializing...
> agentx/master: initializing...   DONE
> NET-SNMP version 5.0.3
> agentx/master: open 002e0c68
> agentx/master: opened 002e1628 = 7 with flags = a0
> agentx/master: send response, stat 0
> agentx_build: packet built okay
> agentx/master: in register_agentx_list
> agentx/master: registered ok
> agentx/master: send response, stat 0
> agentx_build: packet built okay
> agentx/master: agentx master handler starting, mode = 0xa1
> agentx/master: inexact request for variable () preceeding region ()
> agentx/master: INCLUSIVE varbind NET-SNMP-MIB::netSnmp.2.4.1.1.2.0 scoped
to
> NET-SNMP-MIB::netSnmp.2.4.1.1.2.1
> agentx: sending pdu
> agentx_build: packet built okay
> agentx/master: agentx_got_response() beginning...
> agentx/master:   handle_agentx_response: processing:
> NET-SNMP-MIB::netSnmp.2.4.1.1.2.0
> agentx/master: handle_agentx_response() finishing...
> agentx/master: agentx master handler starting, mode = 0xa1
> agentx/master: EXCLUSIVE varbind NET-SNMP-MIB::netSnmp.2.4.1.1.2.0 scoped
to
> NET-SNMP-MIB::netSnmp.2.4.1.1.2.1
> agentx: sending pdu
> agentx_build: packet built okay
> agentx/master: agentx_got_response() beginning...
> agentx/master:   handle_agentx_response: processing:
> NET-SNMP-MIB::netSnmp.2.4.1.1.2.0
> agentx/master: handle_agentx_response() finishing...
> agentx/master: agentx master handler starting, mode = 0xa1
> agentx/master: inexact request for variable () preceeding region ()
> agentx/master: INCLUSIVE varbind NET-SNMP-MIB::netSnmp.2.4.1.1.2.0 scoped
to
> NET-SNMP-MIB::netSnmp.2.4.1.1.2.1
> agentx: sending pdu
> agentx_build: packet built okay
> agentx/master: agentx_got_response() beginning...
> agentx/master:   handle_agentx_response: processing:
> NET-SNMP-MIB::netSnmp.2.4.1.1.2.0
> agentx/master: handle_agentx_response() finishing...
> agentx/master: agentx master handler starting, mode = 0xa1
> agentx/master: EXCLUSIVE varbind NET-SNMP-MIB::netSnmp.2.4.1.1.2.0 scoped
to
> NET-SNMP-MIB::netSnmp.2.4.1.1.2.1
> agentx: sending pdu
> agentx_build: packet built okay
> agentx/master: agentx_got_response() beginning...
> agentx/master:   handle_agentx_response: processing:
> NET-SNMP-MIB::netSnmp.2.4.1.1.2.0
> agentx/master: handle_agentx_response() finishing...
> 
> 
> 
> 
> 
> -----Original Message-----
> 
> --------> removed, see previous mails in the thread
> 





More information about the AGENTPP mailing list