Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^6: Net::SNMP ASN1 Type error

by jbumsted (Initiate)
on Oct 12, 2010 at 13:59 UTC ( [id://864862]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Net::SNMP ASN1 Type error
in thread Net::SNMP ASN1 Type error

Thanks for your help Ken. I neglected to mention that this is running on ActiveState Perl. I copied my code and ran it on OSX in a shell and had no issues with the INTEGER constant. I re-installed the Net::SNMP module on my Activestate Windows box, but still get the same error. In this case, probably not a huge deal, I'll do a work around by using the system command to run snmpset in a dos prompt. I just hate doing that, seems slower and more clunky. Thanks again.

Replies are listed 'Best First'.
Re^7: Net::SNMP ASN1 Type error
by VinsWorldcom (Prior) on Oct 12, 2010 at 16:43 UTC

    I also have Activestate (v5.10.1) on Windows XP and the above code from Ken works fine for me - no issue with bareword INTEGER.

    What version of Net::SNMP are you using - I'm at v6.0.0. I've seen this error in the past with older versions of Net::SNMP, the fix was as described above in the 'use' line:

    use Net::SNMP qw(:asn1 :snmp);
Re^7: Net::SNMP ASN1 Type error
by kcott (Archbishop) on Oct 12, 2010 at 20:49 UTC

    I have a Windows box but I'm running Strawberry Perl. Worked fine here too:

    C:\_\tmp>net_snmp_problem.pl No response from remote host "127.0.0.1" C:\_\tmp>

    The earlier output was from Cygwin.

    I've got Perl 5.12.0 on both and Net::SNMP 6.0.1 on both. I didn't have Net::SNMP running on either so they're both fresh installs and the latest version.

    And, unfortunately, that's me completely out of ideas.

    -- Ken

      I am using Net::SNMP 6.0.1 on Activestate 5.12.1. I'm not sure what is going on, perhaps I will reinstall everything. I added the qw's to the use line to no avail. Thanks again for all of your help.

        I also had this problem and found that I was able to fix it like this:
        my $result = $modemSession->set_request(-varbindlist => ['1.3.6.1.2.1. +69.1.1.3.0', Net::SNMP::INTEGER, 1]);
Re^7: Net::SNMP ASN1 Type error
by Anonymous Monk on Jul 23, 2015 at 20:06 UTC
    I was able to get this to work by using the asn.1 value for INTEGER (2) and OCTET_STRING (4).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://864862]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-25 18:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found