I have recently installed Fedora 8 on a new server for doing some scripting, and moved a few scripts to it from another server (Fedora 4). Its a cgi-bin script that queries standard information off of devices. On the new server, when I run the script, I get an error, that I don't know how to fix, perhaps someone here can shed some light into it. I know the code has worked flawlessly on several OS Platforms... so I think its something moreso to do with an OS issue, but its worth a shot.
sub Read_DOCSIS_SNMP { my %DOCSISResults = (); my ($OIDName, $MACTableResult) = ""; my ($Session, $Error ) = Net::SNMP->session( -hostname => $IPAddress, -community => $ReadCommunityString, -retries => 3, -timeout => 5, -mtu => 1544, -nonblocking => 0x1 ); if (!defined($Session) ) { &ErrorOut("Error starting SNMP Session [DEBUG 1]: $Err +or"); } $Session->get_request( -callback => [\&DOCSIS_Call +back, \%DOCSISResults], -varbindlist => [$SystemDescri +ption, $SystemUptime, $MACAddress, $BootFile, $NumberOfInter +faces, $DSFrequency, $DSPowerLevel, $DSModulationType, $DSSNR, $USFre +quency, $USPowerLevel, $USChannelWidth, $USChannelID, $UnerroredCode +words, $CorrectedCodewords, $UncorrectableCodewords, $Microreflecti +ons, $InterfaceResets, $LostSyncs, $InvalidMaps, +$InvalidUCDs, $T1Timeouts, $T2Timeouts, $T3Timeouts, $T4Timeouts, $ +InvalidRangeRsp, $InvalidRegRsp, $SerialNumber, $SystemName, $ +SystemLocation] ); foreach $OIDName (keys %MACTableOIDs) { $MACTableResult = $Session->get_table( -callback => [ \&MACTable_Callback, $MACTableOIDs{$OIDName +}, $OIDName, \%MACTableResults, ], -baseoid => $MACTableOIDs{$OIDName +}, ); } if (!$MACTableResult) { &ErrorOut("SNMP Error while performing MAC tab +le Callback routine: $Error"); } snmp_dispatcher(); $Session->close(); if (!defined($ModemResults{DSPowerLevel})) { &ErrorOut("Unable to communicate with device, or it's +not a cable modem."); } }
ERROR:: ERROR! Error starting SNMP Session DEBUG 1: Failed to open UDP/IPv4 socket: Permission denied

In reply to Perl NET::SNMP by Jabber

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.