Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Whee! This is fun!

Please reference the original question by someone named Geetha. Sure, madtoperl could be "Geetha", but why would madtoperl change the name of the script, and the IP address (but only slightly) when posting in a different forum?

Net::SNMP session creating problem Posted by geetha... on 9/7/2004 11:34:00 AM Hi , I'm using NET::SNMP perl package to send do SNMP operations. This requires establishing snmp session. upon calling create session , I'm getting error "ERROR: Unknown error +creating socket." The code which gives the above error is given below. *************************************************************** # /usr//bin/perl # snmp.pl to test snmp functions use strict; use vars qw($session $error $response); use Net::SNMP; ($session, $error) = Net::SNMP->session( -hostname => shift || 'localhost', -community => shift || 'public', -port => shift || 161 ); if (!defined($session)) { printf("ERROR: %s.\n", $error); exit 1; } *************************************END ***************************** +************* I execute the program as : perl snmp.pl 192.168.20.158 public output of the program: ERROR: Unknown error creating socket. ********************************************************************** +************** As part of debugging this, I read that NET::SNMP package requires Soc +ket6 & IO::Socket::INET6 packages . I installed them, but problem is +still persisting As regarding system configuration , it is a linux OS ,localhost is ena +bled through httpd server. On the command prompt "snmpwalk -v2c -c public localhost system" gives + the output of snmpwalk Can someone help with this session creating problem. I 'm debugging t +his problem from past 3 days, but ... Thanks, Geetha


--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)

In reply to Re: How to solve Net::SNMP error? by chargrill
in thread How to solve Net::SNMP error? by madtoperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-04-19 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found