Jabber has asked for the wisdom of the Perl Monks concerning the following question:
ERROR:: ERROR! Error starting SNMP Session DEBUG 1: Failed to open UDP/IPv4 socket: Permission deniedsub 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."); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl NET::SNMP
by pc88mxer (Vicar) on Apr 29, 2008 at 18:21 UTC | |
by glide (Pilgrim) on Apr 30, 2008 at 09:26 UTC | |
by Jabber (Initiate) on May 01, 2008 at 18:31 UTC | |
|
Re: Perl NET::SNMP
by mr_mischief (Monsignor) on Apr 29, 2008 at 22:32 UTC |