Fw: SNMP_Session error
Nick Price <[email protected]> Tue, 3 Jan 2017 15:17:16 +0000
| Newsgroups | gmane.network.mrtg.user |
|---|---|
| Message-ID | <AM5PR0901MB14903B1CE054EBFA1FFAA126E36E0@AM5PR0901MB1490.eurprd09.prod.outlook.com> |
--===============6648738232159259536== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_AM5PR0901MB14903B1CE054EBFA1FFAA126E36E0AM5PR0901MB1490_" --_000_AM5PR0901MB14903B1CE054EBFA1FFAA126E36E0AM5PR0901MB1490_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I use contrab because the output of every device is sent to a different fol= der, so that the owner of that device is the only person (except mrtgadmin)= that can view it. I have never set up mrtg as a daemon and not sure how to achieve the same r= esults as with crontab. What has changes in the later version of perl that wasn't in fedora 22 wher= e I didn't have this problem Any help setting it up to run as a daemon or a cure for the error would hel= p please. I'm not a Linux expert nor do I write perl, I just install and use Nick ________________________________ From: mrtg <[email protected]> on behalf of= Niall O'Reilly <[email protected]> Sent: Tuesday, January 3, 2017 3:41 PM To: [email protected] Subject: Re: [mrtg] SNMP_Session error On 2 Jan 2017, at 11:33, Nick Price wrote: > HI All > > I have just install fedora 25 with all the updates for it and perl to > latest versions > > I installed mrtg (2.17.4) and when I run it I get in the crontab mail > box > > Subroutine SNMP_Session::pack_sockaddr_in6 redefined at > /usr/share/perl5/vendor_perl/Exporter.pm line 66. > at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_Session.pm line 149. > Subroutine SNMP_Session::unpack_sockaddr_in6 redefined at > /usr/share/perl5/vendor_perl/Exporter.pm line 66. > at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_Session.pm line 149. > Subroutine SNMPv1_Session::pack_sockaddr_in6 redefined at > /usr/share/perl5/vendor_perl/Exporter.pm line 66. > at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_Session.pm line 604. > Subroutine SNMPv1_Session::unpack_sockaddr_in6 redefined at > /usr/share/perl5/vendor_perl/Exporter.pm line 66. > at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_Session.pm line 604. > > I have copied the SNMP_Sessions.pm from mrtg folder to the perl folder > and I still get this. > > My last install of fedora was ver 22 and doing this cured it this time > it hasn't > > Any ideas as this is flooding the mailbox every 5 minutes Since you ask ... Whenever I've seen the kind of messages you've shown above, they've been fallout from sloppy initialization code in one or a couple of Perl modules resulting in repeated definitions of the same subroutine. For me, there were two reasons for this to be inconsequential; first: any subsequent code re-definition seemed to be compatible with the original one, so the application just worked; second: I always used to run MRTG in daemon mode in order to avoid the repeated startup overhead involved in using cron to launch each sampling run. You don't say whether MRTG is otherwise working correctly for you, so I don't know whether the re-definitions have any other effect than flooding your e-mail. If reducing the noise is all you need to do, three options occur to me, of which tracking down the root of the problem and eliminating the redefinitions is the "most correct", but likely the most troublesome. Moreover, this option may be subverted by any future upgrade of one or other of the collection of packages on which MRTG depends. MRTG's daemon mode will eliminate repeated startup of MRTG, and so avoid repeated emission of startup-time warnings. You'll need to configure daemon mode in your MRTG configuration file, and provide or obtain a suitable init script or systemd configuration for starting and stopping the MRTG daemon. Another approach, which I've used on occasion for some other application, is to invoke a wrapper script from cron; this might redirect error output to a temporary file, somehow check for a "real" failure, and only generate output for cron to send on by mail in case such a failure occurred. I'ld happily let you have the scripts I used to use in a previous job for each of these approaches, but have some connectivity trouble just now and so am without the necessary access. I hope this is of some help. Best regards, Niall O'Reilly _______________________________________________ mrtg mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg mrtg Info Page - lists.oetiker.ch Mailing Lists<https://lists.oetiker.ch/cg= i-bin/listinfo/mrtg> lists.oetiker.ch To see the collection of prior postings to the list, visit the mrtg Archive= s. Using mrtg: To post a message to all the list members, send email to ... --_000_AM5PR0901MB14903B1CE054EBFA1FFAA126E36E0AM5PR0901MB1490_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-= 1"> <style type=3D"text/css" style=3D"display:none;"><!-- P {margin-top:0;margi= n-bottom:0;} --></style> </head> <body dir=3D"ltr"> <div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt;color:#000000;font= -family:Calibri,Arial,Helvetica,sans-serif;" dir=3D"ltr"> <p><br> </p> <p>I use contrab because the output of every device is sent to a different = folder, so that the owner of that device is the only person (except mrtgadm= in) that can view it.</p> <p><br> </p> <p>I have never set up mrtg as a daemon and not sure how to achieve the sam= e results as with crontab.</p> <p><br> </p> <p>What has changes in the later version of perl that wasn't in fedora 22 w= here I didn't have this problem</p> <p><br> </p> <p>Any help setting it up to run as a daemon or a cure for the error would = help please.</p> <p><br> </p> <p>I'm not a Linux expert nor do I write perl, I just install and use</p> <p><br> </p> <p>Nick<br> <br> </p> <div style=3D"color: rgb(0, 0, 0);"> <div> <hr tabindex=3D"-1" style=3D"width: 98%; display: inline-block;"> <div id=3D"x_divRplyFwdMsg" dir=3D"ltr"><font color=3D"#000000" face=3D"Cal= ibri, sans-serif" style=3D"font-size: 11pt;"><b>From:</b> mrtg <mrtg-bou= nces+[email protected]> on behalf of Niall O'Reil= ly <[email protected]><br> <b>Sent:</b> Tuesday, January 3, 2017 3:41 PM<br> <b>To:</b> [email protected]<br> <b>Subject:</b> Re: [mrtg] SNMP_Session error</font> <div> </div> </div> </div> <font size=3D"2"><span style=3D"font-size: 10pt;"> <div class=3D"PlainText">On 2 Jan 2017, at 11:33, Nick Price wrote:<br> <br> > HI All<br> ><br> > I have just install fedora 25 with all the updates for it and perl to = <br> > latest versions<br> ><br> > I installed mrtg (2.17.4) and when I run it I get in the crontab mail = <br> > box<br> ><br> > Subroutine SNMP_Session::pack_sockaddr_in6 redefined at <br> > /usr/share/perl5/vendor_perl/Exporter.pm line 66.<br> > at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_Session.pm line 149.<br> > Subroutine SNMP_Session::unpack_sockaddr_in6 redefined at <br> > /usr/share/perl5/vendor_perl/Exporter.pm line 66.<br> > at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_Session.pm line 149.<br> > Subroutine SNMPv1_Session::pack_sockaddr_in6 redefined at <br> > /usr/share/perl5/vendor_perl/Exporter.pm line 66.<br> > at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_Session.pm line 604.<br> > Subroutine SNMPv1_Session::unpack_sockaddr_in6 redefined at <br> > /usr/share/perl5/vendor_perl/Exporter.pm line 66.<br> > at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_Session.pm line 604.<br> ><br> > I have copied the SNMP_Sessions.pm from mrtg folder to the perl folder= <br> > and I still get this.<br> ><br> > My last install of fedora was ver 22 and doing this cured it this time= <br> > it hasn't<br> ><br> > Any ideas as this is flooding the mailbox every 5 minutes<br> <br> Since you ask ...<br> <br> Whenever I've seen the kind of messages you've shown above, th= ey've <br> been fallout<br> from sloppy initialization code in one or a couple of Perl mod= ules <br> resulting in<br> repeated definitions of the same subroutine. For me, the= re were two <br> reasons for<br> this to be inconsequential; first: any subsequent code re-defi= nition <br> seemed to be<br> compatible with the original one, so the application just work= ed; <br> second: I always<br> used to run MRTG in daemon mode in order to avoid the repeated= <br> startup overhead<br> involved in using cron to launch each sampling run.<br> <br> You don't say whether MRTG is otherwise working correctly for = you, so <br> I don't<br> know whether the re-definitions have any other effect than flo= oding <br> your e-mail.<br> <br> If reducing the noise is all you need to do, three options occ= ur to <br> me, of which<br> tracking down the root of the problem and eliminating the <br> redefinitions is the<br> "most correct", but likely the most troublesome.&nbs= p; Moreover, this <br> option may be<br> subverted by any future upgrade of one or other of the collect= ion of <br> packages<br> on which MRTG depends.<br> <br> MRTG's daemon mode will eliminate repeated startup of MRTG, an= d so <br> avoid<br> repeated emission of startup-time warnings. You'll need = to configure <br> daemon<br> mode in your MRTG configuration file, and provide or obtain a = <br> suitable init<br> script or systemd configuration for starting and stopping the = MRTG <br> daemon.<br> <br> Another approach, which I've used on occasion for some other <= br> application, is<br> to invoke a wrapper script from cron; this might redirect erro= r <br> output to a<br> temporary file, somehow check for a "real" failure, = and only generate <br> output<br> for cron to send on by mail in case such a failure occurred.<b= r> <br> I'ld happily let you have the scripts I used to use in a previ= ous job <br> for each<br> of these approaches, but have some connectivity trouble just n= ow and <br> so am<br> without the necessary access.<br> <br> I hope this is of some help.<br> <br> Best regards,<br> Niall O'Reilly<br> <br> _______________________________________________<br> mrtg mailing list<br> [email protected]<br> <a id=3D"LPlnk429517" href=3D"https://lists.oetiker.ch/cgi-bin/listinfo/mrt= g" previewremoved=3D"true">https://lists.oetiker.ch/cgi-bin/listinfo/mrtg</= a> <p></p> <div id=3D"LPBorder_GT_14834562710380.7615896549720593" style=3D"width: 100= %; text-indent: 0px; overflow: auto; margin-bottom: 20px; display: inline-b= lock;"> <table id=3D"LPContainer_14834562710260.8144033816398484" style=3D"width: 9= 0%; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20= px; border-top-color: rgb(200, 200, 200); border-bottom-color: rgb(200, 200= , 200); border-top-width: 1px; border-bottom-width: 1px; border-top-style: = dotted; border-bottom-style: dotted; position: relative; background-color: = rgb(255, 255, 255);" cellspacing=3D"0"> <tbody> <tr valign=3D"top" style=3D"border-spacing: 0px;"> <td id=3D"TextCell_14834562710280.9587000468043374" style=3D"padding: 0px; = vertical-align: top; display: table-cell; position: relative;" colspan=3D"2= "> <div id=3D"LPRemovePreviewContainer_14834562710290.40727398457861946" style= =3D"float: right;"> </div> <div id=3D"LPTitle_14834562710290.563249734795168" style=3D"top: 0px; color= : rgb(0, 120, 215); line-height: 21px; font-family: "wf_segoe-ui_light= ", "Segoe UI Light", "Segoe WP Light", "Segoe= UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 21px= ; font-weight: 400;"> <a id=3D"LPUrlAnchor_14834562710310.8213350219484252" style=3D"text-decorat= ion: none;" href=3D"https://lists.oetiker.ch/cgi-bin/listinfo/mrtg" target= =3D"_blank">mrtg Info Page - lists.oetiker.ch Mailing Lists</a></div> <div id=3D"LPMetadata_14834562710320.7075384719314816" style=3D"margin: 10p= x 0px 16px; color: rgb(102, 102, 102); line-height: 14px; font-family: &quo= t;wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tah= oma, Arial, sans-serif; font-size: 14px; font-weight: 400;"> lists.oetiker.ch</div> <div id=3D"LPDescription_14834562710350.8123446365243552" style=3D"color: r= gb(102, 102, 102); line-height: 20px; overflow: hidden; font-family: "= wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahom= a, Arial, sans-serif; font-size: 14px; font-weight: 400; display: block; ma= x-height: 100px;"> To see the collection of prior postings to the list, visit the mrtg Archive= s. Using mrtg: To post a message to all the list members, send email to ...= </div> </td> </tr> </tbody> </table> </div> <p></p> <br> <br> </div> </span></font></div> </div> </body> </html> --_000_AM5PR0901MB14903B1CE054EBFA1FFAA126E36E0AM5PR0901MB1490_-- --===============6648738232159259536== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ mrtg mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg --===============6648738232159259536==--