Description of problem: When crond runs mrtg every 5 minutes, I was getting emails with the /etc/cron.d/mrtg command line as the subject, of course, and complaining of "Undefined subroutine &main::AF_UNSPEC called at /usr/bin/mrtg line 2107." A little poking around, and examining other old mrtg bugs (especially bug #134241 and bug #438931, which led me to bug #437681) led me to suspect it was my "EnableIPv6: yes" in /etc/mrtg/mrtg.cfg which contributed to the problem. So, for the moment, I've turned off IPv6, which stemmed the deluge of email. But, it would be nice to either have IPv6 fully working, or at least disable it and remove some references to it in docs, annotate others, so people don't expect it to work. Unless it does work on some systems but not on others. Then I'd be scratching my head a bit. I found some likely-looking AF_UNSPEC lines grepping through the /usr/lib/perl5/ directory, so I included the version numbers of those here. Version-Release number of selected component (if applicable): mrtg-2.16.1-1.fc9.i386 perl-5.10.0-22.fc9.i386 perl-Socket6-0.20-1.fc9.i386 perl-IO-Socket-INET6-2.54-1.fc9.noarch How reproducible: Try to run mrtg with IPv6 support. Steps to Reproduce: 1. Install mrtg and configure it to use IPv6. 2. Check your inbox (if crond & mail are configured correctly). 3. Check the timestamp on files in /var/www/mrtg/. Actual results: Lots of email, no updated files in /var/www/mrtg/. Expected results: No email, fresh graph updates in /var/www/mrtg/. Additional info: Oh, and here's the context of line 2107 (it's the one with getaddrinfo & AF_UNSPEC in it): } else { # Hostname. Look it up my @res; my ($too,$port,$otheropts) = split(':',$$target{SnmpOpt}, 3); $port = 161 unless defined $port; @res = getaddrinfo($hostname, $port, AF_UNSPEC(), SOCK_DGRAM()); if (scalar (@res) < 5) { warn "$NOW: WARNING: Skipping host $hostname as it does not resolve to an IPv4 or IPv6 address\n"; return 'DEADHOST'; } } Also, I'm sorry to say, I didn't think to check the dates of /var/lib/mrtg/* before I turned off IPv6. I'd rather not turn it on, but could if anyone really thought it'd help. Given where the error was, I'm pretty sure they would not have been updated, either.
I think I have a fix - let me test it for a while...
mrtg-2.16.1-4.fc9 has been submitted as an update for Fedora 9
mrtg-2.16.1-4.fc9 has been pushed to the Fedora 9 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update mrtg'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-5806
OK, I've been running mrtg-2.16.1-4.fc9 for about 10 minutes now with IPv6 turned back on, and it's still updating, and not sending out any complaining emails. Looks good from here! Thanks.
mrtg-2.16.1-4.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.