Submitted by fdzicher on Thu, 04/24/2014 - 05:15
Hello,
every thirty minutes user root gets a message from CRON DAEMON
Error - Perl execution failed
Unknown encoding 'ANSI' at /usr/share/webmin/mailboxes/boxes-lib.pl line 1621
How can I fix this?
Kind Regards Frank
Status:
Active
Comments
Submitted by andreychek on Thu, 04/24/2014 - 09:23 Comment #1
Howdy -- take a look at the file /etc/cron.d/awstats -- what are it's contents?
If it's not commented out, my suggestion would be to comment out all the lines in that file.
Virtualmin uses another cron job for generating it's own awstats statistics, you don't actually need that one, and it can generate the errors you're seeing if not commented out. That normally occurs automatically during the installation process, but it's possible that didn't happen for some reason.
Submitted by fdzicher on Thu, 04/24/2014 - 10:32 Comment #2
Hello,
the content of /etc/cron.d/awstats is
MAILTO=root
# */10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh
# Generate static reports:
# 10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh
More interestings - and maybe the real cause of the failure message - seems the content of /etc/cron.d/php5
# /etc/cron.d/php5: crontab fragment for php5
# This purges session files older than X, where X is defined in seconds
# as the largest value of session.gc_maxlifetime from all your php.ini
# files, or 24 minutes if not defined. See /usr/lib/php5/maxlifetime
# Look for and purge old sessions every 30 minutes
0,30 * * * * root [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete
This one is the only one executet every 30 minutes
root gets the following message from Cron Daemon
Cron Daemon 2014/04/24 17:00 0.80 kB Cron <root@mail> [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && fin ..
The content of the message:
Error - Perl execution failed
Unknown encoding 'ANSI' at /usr/share/webmin/mailboxes/boxes-lib.pl line 1621
The line 1621 of /usr/share/webmin/mailboxes/boxes-lib.pl
1615 # convert_to_utf8(string, string-charset)
1616 # If possible, convert a string to the UTF-8 charset
1617 sub convert_to_utf8
1618 {
1619 my ($str, $cs) = @_;
1620 &can_convert_to_utf8(@_); # Load modules
1621 $str = Encode::decode($cs, $str);
1622 utf8::encode($str);
1623 return $str;
1624 }
I really get stucked with this. Is it save to comment out the content of /etc/cron.d/php5?
Kind Regards Frank
Submitted by andreychek on Thu, 04/24/2014 - 13:08 Comment #3
If you look at the contents of those emails outside of Usermin, what does it show as the message body?
It may be a simple issue with that php5 cron job that needs tweaked, but Usermin is throwing an unrelated error it seems.
Submitted by fdzicher on Thu, 04/24/2014 - 14:29 Comment #4
That's doing the trick!
message body gives the hint: geoip module already loaded
Thanks for showing me the direction.
Kind Regards Frank
Submitted by JamieCameron on Thu, 04/24/2014 - 19:10 Comment #5
To fix the ANSI issue, apply this patch : https://github.com/webmin/webmin/commit/09f965aff7d732c42d712320d0076e70...
Then run /etc/webmin/restart