GreatGator

Member
Aug 9, 2008
17
0
51
I get this error every 5 minutes in my emails from an mrtg cron.

Subroutine SNMPv1_Session::AF_INET6 redefined at /usr/lib/perl5/5.8.8/Exporter.pm line 65.
at /usr/bin/../lib/mrtg2/SNMP_Session.pm line 594 Subroutine main::AF_INET6 redefined at /usr/lib/perl5/5.8.8/Exporter.pm line 65.
at /usr/bin/mrtg line 97


Does anyone have a fix for it?

Do I need to reinstall mrtg ? If so, how to do it in cPanel.

Thanks
 

GreatGator

Member
Aug 9, 2008
17
0
51
Fised it myself - I THINK

Let's start by installing the newest version of CPAN, so we're not
working with outdated code.

# perl -MCPAN -e shell
install Bundle::CPAN

After install

cpan> reload cpan
(CPAN__unchanged__v1.9205)(CPAN::Debug__unchanged__v5.402212)(CPAN::HandleConfig__unchanged__v5.402212)(CPAN::Queue__unchanged__v5.402212)(CPAN::Tarzip__unchanged__v5.402213)(CPAN::Version__unchanged__v5.5)
0 subroutines redefined

cpan> install Socket6
....... Stuff here removed ........
Running make install
Prepending /home/.cpan/build/Socket6-0.22-jeYjPG/blib/arch /home/.cpan/build/Socket6-0.22-jeYjPG/blib/lib to PERL5LIB for 'install'
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Socket6/Socket6.so
Installing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Socket6/Socket6.bs
Installing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Socket6.pm
Writing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Socket6/.packlist
Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod
UMEMOTO/Socket6-0.22.tar.gz
/usr/bin/make install UNINST=1 -- OK

cpan> install IO::Socket::INET6
IO::Socket::INET6 is up to date (2.55).

tested cron:
mrtg root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mr
tg/mrtg.ok

returned:
ERROR: Mrtg will most likely not work properly when the environment
variable LANG is set to UTF-8. Please run mrtg in an environment
where this is not the case.

Changed Cron to:
env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok

Working I think .. got no errors so far
 

Mat-d-rat

Well-Known Member
Jul 30, 2003
108
2
168
Hi, I've got the same problem :( (After upading assp deluxe)

I've gone though and copied as per your instructions, all ok - till the cron point. I'm logged in as route which CRON file did you change? Crontab -l doesn't show any mrtg that runs on a 5min basis?
 

xanaxa

Registered
Feb 9, 2010
1
0
51
Here is how I fixed it after much head banging

#BEGIN {
# if($SNMP_Session::ipv6available) {
# import IO::Socket::INET6;
# import Socket6;
# }
#}


I commented the stuff out above on line 594 in file /usr/bin/../lib/mrtg2/SNMP_Session.pm file. That fixed it as I am not running IPv6.