Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: SNMP using perl/cgi

by msk_0984 (Friar)
on Aug 14, 2006 at 09:29 UTC ( #567177=note: print w/ replies, xml ) Need Help??


in reply to Re: SNMP using perl/cgi
in thread SNMP using perl/cgi

Yes

Your are right when i hav changed it to

print ("Err Creation Session Obj: $error ");
I get the output as

Err Creation Session Obj: Failed to open UDP/IPv4 socket: Permission denied

Update : But how should i overcome this prob please help me out.

Work Hard Party Harderrr!!
Sushil Kumar


Comment on Re^2: SNMP using perl/cgi
Download Code
Re^3: SNMP using perl/cgi
by gellyfish (Monsignor) on Aug 14, 2006 at 10:44 UTC

    It's not immediately obvious what the origin of this message is from the Net::SNMP source, normally I wouldn't expect EPERM from simply try to create a UDP socket, but as you don't say what your OS is I can't be sure. You might want to get more diagnostic information by adding -debug => 0x04, to the arguments to session(). Also can you confirm whether the program works properly from the command line or not.

    /J\

Re^3: SNMP using perl/cgi
by idsfa (Vicar) on Aug 14, 2006 at 14:46 UTC

    /usr/bin/perl implies some sort of Unix. You are trying to listen to port number 161. On most unices, only the root user is allowed to open ports lower than 1024. You need to be root or use a different port. (Note that running CGI programs as root is not a GoodIdea(tm).


    The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-09-21 13:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (171 votes), past polls