--===============1025366619==
Content-Type: multipart/alternative;
boundary="----=_Part_2441_9955663.1208469110304"

------=_Part_2441_9955663.1208469110304
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Going on, I discovered man/snmpd.examples.5 suggested putting single quotes
(?) around do *.pl in the "perl do" line, and doing that made Bareword go
away, but still does not seem to do anything (like loading a subagent where
ps ax can see it). It further suggests some agentXPerms, which don't help,
and either putting a netsnmp_ds_set_string call into the subagent or an
agentXSocket line in the subagent's conf file (test.conf?). The latter did
not work and the former is beyond my Perl skills (there's a use
NetSNMP::agent (':all'); line high up in the subagent). If anyone knows of a
subagent that works in 5.4.1 it might help.

Larry

On 4/17/08, Larry Dickson wrote:
>
> Actually it was adding the agentXSocket directive that got me that far.
> Before, it just shot itself in the head. Now at least it stays alive along
> with the subagent, but they show no signs of ever communicating. In 5.2.1
> they used to talk happily and do snmpwalks and all kinds of nice things. The
> "perl do" seems to make no difference in either case - I think it just gets
> ignored.
>
> By the way, if you wander through the comments in perl/agent/agent.pm (in
> either 5.2.1 or 5.4.1) it suggests setting up a subagent in what looks to me
> like just the way my code snipped shows.
>
> Larry
>
> On 4/17/08, Magnus Fromreide wrote:
> >
> >
> > On ons, 2008-04-16 at 10:35 -0700, Larry Dickson wrote:
> >
> > > ::::::::::::::
> > > snmpd.conf-old
> > > ::::::::::::::
> > > #version 1
> > > rocommunity public
> > > rwcommunity private
> > > master agentx
> > > agentXSocket /var/agentx/master
> > > perl do /etc/edgeware-subagent.pl
> > > ::::::::::::::
> > > Dtdomain.out
> > > ::::::::::::::
> > > No log handling enabled - turning on stderr logging
> > > registered debug token tdomain, 1
> > > netsnmp_assert !"registration != duplicate" failed
> > > agent_registry.c:535 netsnmp_subtree_load()
> > > netsnmp_assert !"registration != duplicate" failed
> > > agent_registry.c:535 netsnmp_subtree_load()
> > > netsnmp_assert !"registration != duplicate" failed
> > > agent_registry.c:535 netsnmp_subtree_load()
> > > tdomain: netsnmp_tdomain_init() called
> > > tdomain: domain_list -> { iso.3.6.1.6.1.1, "udp" } ->
> > > { iso.3.6.1.2.1.100.1.5, "tcp" } -> { iso.3.6.1.2.1.100.1.13, "unix" }
> > > -> { iso.3.6.1.2.1.100.1.2, "udp6/ipv6/udpv6/udpipv6" } ->
> > > { iso.3.6.1.2.1.100.1.6, "tcp6/tcpv6/tcpipv6" } -> [NIL]
> > > Turning on AgentX master support.

> >
> > Here the agent failed to even try to open an agentx socket.
> >
> > > Bareword found where operator expected at (eval 2) line 1, near
> > > "/etc/edgeware"
> > > (Missing operator before edgeware?)
> > > NET-SNMP version 5.4.1
> > > Connection from UDP: [127.0.0.1]:32775
> > > ::::::::::::::
> > > subagent.out
> > > ::::::::::::::
> > > 286 keys found in ordered_leaf_oids after get_in_order_oids call.
> > > 339 = size of oids_chomp; 339 size of next_leaf_str.
> > > .1.3.6.1.4.1.22782 (cuttedge) = first oid; .1.3.6.1.4.1.22782.1.1.1
> > > (productType) = first leaf.
> > > perl_module.pl loaded ok
> > > registering at cuttedge
> > > netsnmp_assert !"registration != duplicate" failed
> > > agent_registry.c:535 netsnmp_subtree_load()
> > > netsnmp_assert !"registration != duplicate" failed
> > > agent_registry.c:535 netsnmp_subtree_load()
> > > netsnmp_assert !"registration != duplicate" failed
> > > agent_registry.c:535 netsnmp_subtree_load()
> > > started us as a subagent (NetSNMP::agent=HASH(0x1182030))
> > > BEFORE registration at cuttedge
> > > AFTER registration at cuttedge
> > > Yes I am a subagent approaching running loop.
> > > ::::::::::::::
> > > snmpd.conf
> > > ::::::::::::::
> > > #version 1
> > > rocommunity public
> > > rwcommunity private
> > > master agentx
> > > agentXSocket /var/agentx/master
> > > ::::::::::::::
> > > Dtdomain2.out
> > > ::::::::::::::
> > > No log handling enabled - turning on stderr logging
> > > registered debug token tdomain, 1
> > > netsnmp_assert !"registration != duplicate" failed
> > > agent_registry.c:535 netsnmp_subtree_load()
> > > netsnmp_assert !"registration != duplicate" failed
> > > agent_registry.c:535 netsnmp_subtree_load()
> > > netsnmp_assert !"registration != duplicate" failed
> > > agent_registry.c:535 netsnmp_subtree_load()
> > > tdomain: netsnmp_tdomain_init() called
> > > tdomain: domain_list -> { iso.3.6.1.6.1.1, "udp" } ->
> > > { iso.3.6.1.2.1.100.1.5, "tcp" } -> { iso.3.6.1.2.1.100.1.13, "unix" }
> > > -> { iso.3.6.1.2.1.100.1.2, "udp6/ipv6/udpv6/udpipv6" } ->
> > > { iso.3.6.1.2.1.100.1.6, "tcp6/tcpv6/tcpipv6" } -> [NIL]
> > > Turning on AgentX master support.
> > > tdomain: tdomain_transport_full("agentx", "/var/agentx/master", 1,
> > > "[NIL]", "[NIL]")
> > > tdomain: Address starts with '/', so assume "unix" domain
> > > tdomain: Found domain "unix" from specifier "unix"
> > > tdomain: domain "unix" address "/var/agentx/master" default address
> > > "/var/agentx/master"

> >
> > Here we can see that
> > a) The agent tries to open a unix socket at /var/agentx/master
> > b) You do not need the agentXsocket config directive, you needed, as you
> > noted, to remove the perl do directive. As for further perl
> > interactions that is out of my league.
> >
> > /MF
> >
> >

>


------=_Part_2441_9955663.1208469110304
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Going on, I discovered man/snmpd.examples.5 suggested putting single quotes (?) around do *.pl in the "perl do" line, and doing that made Bareword go away, but still does not seem to do anything (like loading a subagent where ps ax can see it). It further suggests some agentXPerms, which don't help, and either putting a netsnmp_ds_set_string call into the subagent or an agentXSocket line in the subagent's conf file (test.conf?). The latter did not work and the former is beyond my Perl skills (there's a use NetSNMP::agent (':all'); line high up in the subagent). If anyone knows of a subagent that works in 5.4.1 it might help.


 

Larry
 

On 4/17/08, Larry Dickson <ldickson@cuttedge.com> wrote:

Actually it was adding the agentXSocket directive that got me that far. Before, it just shot itself in the head. Now at least it stays alive along with the subagent, but they show no signs of ever communicating. In 5.2.1 they used to talk happily and do snmpwalks and all kinds of nice things. The "perl do" seems to make no difference in either case - I think it just gets ignored.


 

By the way, if you wander through the comments in perl/agent/agent.pm (in either 5.2.1 or 5.4.1) it suggests setting up a subagent in what looks to me like just the way my code snipped shows.


 

Larry
 


On 4/17/08, Magnus Fromreide <magfr@lysator.liu.se> wrote:

On ons, 2008-04-16 at 10:35 -0700, Larry Dickson wrote:

> ::::::::::::::
> snmpd.conf-old

> ::::::::::::::
> #version 1
> rocommunity public
> rwcommunity private
> master agentx
> agentXSocket /var/agentx/master
> perl do /etc/edgeware-subagent.pl
> ::::::::::::::

> Dtdomain.out
> ::::::::::::::
> No log handling enabled - turning on stderr logging
> registered debug token tdomain, 1
> netsnmp_assert !"registration != duplicate" failed
> agent_registry.c:535 netsnmp_subtree_load()

> netsnmp_assert !"registration != duplicate" failed
> agent_registry.c:535 netsnmp_subtree_load()
> netsnmp_assert !"registration != duplicate" failed
> agent_registry.c:535 netsnmp_subtree_load()

> tdomain: netsnmp_tdomain_init() called
> tdomain: domain_list -> { iso.3.6.1.6.1.1, "udp" } ->
> { iso.3.6.1.2.1.100.1.5, "tcp" } -> { iso.3.6.1.2.1.100.1.13, "unix" }

> -> { iso.3.6.1.2.1.100.1.2, "udp6/ipv6/udpv6/udpipv6" } ->
> { iso.3.6.1.2.1.100.1.6, "tcp6/tcpv6/tcpipv6" } -> [NIL]
> Turning on AgentX master support.

Here the agent failed to even try to open an agentx socket.


> Bareword found where operator expected at (eval 2) line 1, near
> "/etc/edgeware"
>  (Missing operator before edgeware?)
> NET-SNMP version 5.4.1
> Connection from UDP: [127.0.0.1]:32775

> ::::::::::::::
> subagent.out
> ::::::::::::::
> 286 keys found in ordered_leaf_oids after get_in_order_oids call.
> 339 = size of oids_chomp; 339 size of next_leaf_str.
> .1.3.6.1.4.1.22782 (cuttedge) = first oid; .1.3.6.1.4.1.22782.1.1.1

> (productType) = first leaf.
> perl_module.pl loaded ok
> registering at cuttedge
> netsnmp_assert !"registration != duplicate" failed
> agent_registry.c:535 netsnmp_subtree_load()

> netsnmp_assert !"registration != duplicate" failed
> agent_registry.c:535 netsnmp_subtree_load()
> netsnmp_assert !"registration != duplicate" failed
> agent_registry.c:535 netsnmp_subtree_load()

> started us as a subagent (NetSNMP::agent=HASH(0x1182030))
> BEFORE registration at cuttedge
> AFTER registration at cuttedge
> Yes I am a subagent approaching running loop.
> ::::::::::::::

> snmpd.conf
> ::::::::::::::
> #version 1
> rocommunity public
> rwcommunity private
> master agentx
> agentXSocket /var/agentx/master
> ::::::::::::::
> Dtdomain2.out

> ::::::::::::::
> No log handling enabled - turning on stderr logging
> registered debug token tdomain, 1
> netsnmp_assert !"registration != duplicate" failed
> agent_registry.c:535 netsnmp_subtree_load()

> netsnmp_assert !"registration != duplicate" failed
> agent_registry.c:535 netsnmp_subtree_load()
> netsnmp_assert !"registration != duplicate" failed
> agent_registry.c:535 netsnmp_subtree_load()

> tdomain: netsnmp_tdomain_init() called
> tdomain: domain_list -> { iso.3.6.1.6.1.1, "udp" } ->
> { iso.3.6.1.2.1.100.1.5, "tcp" } -> { iso.3.6.1.2.1.100.1.13, "unix" }

> -> { iso.3.6.1.2.1.100.1.2, "udp6/ipv6/udpv6/udpipv6" } ->
> { iso.3.6.1.2.1.100.1.6, "tcp6/tcpv6/tcpipv6" } -> [NIL]
> Turning on AgentX master support.
> tdomain: tdomain_transport_full("agentx", "/var/agentx/master", 1,

> "[NIL]", "[NIL]")
> tdomain: Address starts with '/', so assume "unix" domain
> tdomain: Found domain "unix" from specifier "unix"
> tdomain: domain "unix" address "/var/agentx/master" default address

> "/var/agentx/master"

Here we can see that
a) The agent tries to open a unix socket at /var/agentx/master
b) You do not need the agentXsocket config directive, you needed, as you
  noted, to remove the perl do directive. As for further perl

interactions that is out of my league.

/MF





------=_Part_2441_9955663.1208469110304--


--===============1025366619==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757...un.com/javaone
--===============1025366619==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders

--===============1025366619==--