[mrtg] Fw: SNMP_Session error
Nick Price
np121 at hotmail.com
Tue Jan 3 16:17:16 CET 2017
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 mrtgadmin) that can view it.
I have never set up mrtg as a daemon and not sure how to achieve the same results as with crontab.
What has changes in the later version of perl that wasn't in fedora 22 where I didn't have this problem
Any help setting it up to run as a daemon or a cure for the error would help please.
I'm not a Linux expert nor do I write perl, I just install and use
Nick
________________________________
From: mrtg <mrtg-bounces+np121=hotmail.com at lists.oetiker.ch> on behalf of Niall O'Reilly <niall.oreilly at ucd.ie>
Sent: Tuesday, January 3, 2017 3:41 PM
To: mrtg at lists.oetiker.ch
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
mrtg at lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
mrtg Info Page - lists.oetiker.ch Mailing Lists<https://lists.oetiker.ch/cgi-bin/listinfo/mrtg>
lists.oetiker.ch
To see the collection of prior postings to the list, visit the mrtg Archives. Using mrtg: To post a message to all the list members, send email to ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/mrtg/attachments/20170103/c4a57846/attachment.html>
More information about the mrtg
mailing list