[erlang-questions] More Information: snmpm:register_agent/3 suddenly stopped working!

Raimo Niskanen raimo+erlang-questions@REDACTED
Thu Feb 12 16:15:00 CET 2015


On Tue, Feb 10, 2015 at 11:36:43PM -0500, jim rosenblum wrote:
> Sorry, I said it backwards in my last email. It works on 17.1 does not work
> on 17.4.
> 
> More information:
> 
> on 17.1 CentOS release 6.2
>  > snmpm:register_agent(snmp_manager,"Hope", [{engine_id,
> "mgrEngine"},{community,"CLSENTRY"},{address, "10.7.42.11"},{port,161},
> {tdomain,transportDomainUdpIpv4},{sec_level, noAuthNoPriv},{sec_name,
> "initial"},{version, v2},{timeout,1000}]).
> > ok
> 
> on 17.4 CentOS release 5.5 -- used to work before I upgraded to 17.4
> snmpm:register_agent(snmp_manager,"Hope", [{engine_id,
> "mgrEngine"},{community,"CLSENTRY"},{address, "10.7.42.11"},{port,161},
> {tdomain,transportDomainUdpIpv4},{sec_level, noAuthNoPriv},{sec_name,
> "initial"},{version, v2},{timeout,1000}]).
> 
> {error,{bad_address,{transportDomainUdpIpv4,"10.7.42.11"}}}

Most of the address handling code in SNMP was rewritten to handle IPv6,
maybe it was after 17.1, my memory is weak.  Anyway, I did not see that an
address in string format was valid in the address parsing functions so I
may have destroyed that possibility...  An address should be an Erlang
style address tuple: {10,7,42,11} or an SNMP style byte list [10,7,42,11].

Is this way of specifying the address important to you, and if so should an
address "host.domain" also be allowed and looked up, or is it just the
parseable strings that are needed?  If this is important enough it can
probably be fixed.

/ Raimo Niskanen, Erlang/OTP


> 
> 
> On Tue, Feb 10, 2015 at 10:40 PM, jim rosenblum <jim.rosenblum@REDACTED>
> > wrote:
> >
> >> Folks,
> >>
> >> I have an application that uses snmp that used to work and all of a
> >> sudden doesn't - I did upgrade from 17.1 to 17.4 - but other than that
> >> nothing has changed that I know of. I am having trouble down-grading, so I
> >> cannot confirm that the upgrade is the culprit.
> >>
> >> When I do the following from a machine with IP address 10.6.81.19
> >> 1> snmpm:register_agent(hope,"Hope", [{engine_id,
> >> "mgrEngine"},{community,"CLSENTRY"},{address, "10.7.42.11"}]).
> >>
> >> I get
> >> {error,{bad_address,{snmpUDPDomain,"10.7.42.11"}}}
> >>
> >> I have an appropriate snmpd.conf on 10.7.42.11 that has
> >>
> >> com2sec sentrysrv 10.6.81.19/32 CLSENTRY
> >> group CLROGroup v2c sentrysrv
> >> view all included .1 80
> >> access CLROGroup "" v2c noauth exact all none none
> >>
> >> adding {tdomain, transportDomainUdpIpv4} to the option list results in
> >> the, essentially, same error:
> >>
> >> {error,{bad_address,{{error,{bad_address,{transportDomainUdpIpv4,"10.7.42.11"}}}
> >>
> >>
> >> Both machines can ping each other. The snmpd daemon is running on .11, I
> >> have tried all kinds of additional options (port, etc.), but cannot get it
> >> to work
> >>
> >> This is *killing* me, can anyone point out what stupid thing I am doing
> >> wrong?
> >>
> >>
> >

> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions


-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list