in reply to Re^4: Net::SNMP ASN1 Type error
in thread Net::SNMP ASN1 Type error
Your problem was niggling me so I tried it myself.
Other than the $ip value, I used exactly what you have (with the mismatched quote problem fixed).
Here's my code:
#!perl use strict; use warnings; use Net::SNMP; my $ip = '127.0.0.1'; my $SESSION = Net::SNMP->session (-hostname=>$ip, -community=>"private +"); $SESSION->set_request(-varbindlist=> ['1.3.6.1.4.1.6080.3.1.2.4.0', IN +TEGER, 1]); print $SESSION->error();
And here's the output:
$ net_snmp_problem.pl No response from remote host "127.0.0.1"
As you can see, no problem with INTEGER.
Furthermore, when I ran it without fixing the quotes, I got:
Can't find string terminator "'" anywhere before EOF at ./net_snmp_pro +blem.pl line 12.
which suggests that you're posting different code to what you're actually running.
Anyway, if you're still having difficulties, my best advice would be to re-install Net::SNMP.
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Net::SNMP ASN1 Type error
by jbumsted (Initiate) on Oct 12, 2010 at 13:59 UTC | |
by VinsWorldcom (Prior) on Oct 12, 2010 at 16:43 UTC | |
by kcott (Archbishop) on Oct 12, 2010 at 20:49 UTC | |
by jbumsted (Initiate) on Oct 13, 2010 at 13:24 UTC | |
by Anonymous Monk on Oct 29, 2013 at 14:47 UTC | |
by Anonymous Monk on Jul 23, 2015 at 20:06 UTC |