Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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


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

Replies are listed 'Best First'.
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.


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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://567177]
[Happy-the-monk]: Good morrow monks!

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2018-04-24 06:59 GMT
Find Nodes?
    Voting Booth?