I hope someone can help me with a cron problem I'm getting.
I have a script that requires three cron jobs which I've been running since 2008 without problems. In 2012 I switched to VPS managed hosting and in July 2013 I installed the latest version of script.
On Monday night this week I started receiving emails reporting the following error each time one of the cron jobs runs -
My server is running CENTOS 5.10 x86_64 virtuozzo / WHM 11.40.1 (build 10)
The command line for the cron works fine when executed from a browser, so I know my script is working and produces the expected output.
The other two crons for this script are not generating any error. I've tried deleting cron job, rebooting server and re-establishing cron job, plus changing cron times, but the errors messages keep coming!
The function of the script is to empty the "catch all" mailbox of my autoresponder whenever the script is run.
Here's a copy of it. I've blocked out my mailbox password, but that is the only change I've made.
I'm a bit lost as to how the script can be suddenly causing the issue. It's been doing it's job for a long time without a problem.
I was hoping that the error message "Error, do this: mount -t proc none /proc " might actually mean something useful and point towards what the problem is?
A search on the forum regarding cron errors revealed a thread that mentions an error log at /var/log/cron
I've downloaded this, and attached a copy to this thread, but I can't see anything that explains the problem.
Having said that, I don't really know what I'm looking for! It's not really my field of expertise!
If anyone could throw any light on this, or what my next course of action might be, I'd be really grateful. In words suitable for a newbie please!
Many thanks,
Myles
I have a script that requires three cron jobs which I've been running since 2008 without problems. In 2012 I switched to VPS managed hosting and in July 2013 I installed the latest version of script.
On Monday night this week I started receiving emails reporting the following error each time one of the cron jobs runs -
The following command for cron was set to run on the hour and at 25 minute intervals. The error is produced each time it runs.Error, do this: mount -t proc none /proc
My hosting support have not been able to help and want to point the finger at the script. My position is that the script has remained unchanged since 31 July 2013, and has worked without problem until this week.*/25 * * * * /usr/bin/perl /home/mysite/public_html/cgi-bin/arp3/arp3-popreader.pl 1>&2 > /dev/null
My server is running CENTOS 5.10 x86_64 virtuozzo / WHM 11.40.1 (build 10)
The command line for the cron works fine when executed from a browser, so I know my script is working and produces the expected output.
The other two crons for this script are not generating any error. I've tried deleting cron job, rebooting server and re-establishing cron job, plus changing cron times, but the errors messages keep coming!
The function of the script is to empty the "catch all" mailbox of my autoresponder whenever the script is run.
Here's a copy of it. I've blocked out my mailbox password, but that is the only change I've made.
Code:
#!/usr/bin/perl
###################################################
# AutoResponse Plus (tm) #
# Copyright ECom24 Ltd 2000 - 2013 #
# All rights reserved #
# autoresponseplus.com #
###################################################
$ARP3_CGI_PATH = "/home/magicalw/public_html/cgi-bin/arp3";
$mailHost = "mail.magicalwonders.com";
# On a CPanel server this will be mail.yourdomain.com
$mailUser = "arplus\@magicalwonders.com";
# Remember \@ if this is an email address
# Example: you\@yourdomain.com
# On a CPanel server this will be whatever+yourdomain.com
$mailPassword = "xxxxxxxxxxx";
#######################################
# CHANGE NOTHING BELOW THIS LINE #
#######################################
print "Content-type: text/html\n\n";
exit if scalar(split "\n",`ps | grep 'arp3-popreader.pl'`) > 1;
use Net::POP3;
$pop = Net::POP3->new($mailHost);
if ($pop) {
$lastDate = "00000000000000";
if (open (LOG, "<$ARP3_CGI_PATH/temp/pop.last")) {
$lastDate = <LOG>;
close(LOG);
}
%months = (Jan=>"01",Feb=>"02",Mar=>"03",Apr=>"04",May=>"05",Jun=>"06",Jul=>"07",Aug=>"08",Sep=>"09",Oct=>"10",Nov=>"11",Dec=>"12");
@dozen = ("00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10");
$count = 0;
$msgs_number = $pop->login($mailUser, $mailPassword);
for ($msg = $msgs_number; $msg > 0; --$msg) {
$header = $pop->top($msg);
$currDate = "00000000000000";
foreach $line (@{$header}) {
if ($line =~ /(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),)? (\d+) (\w+) (\d+) (\d\d):(\d\d):(\d\d)/) {
$d = $1;
$d = $dozen[$d] if (10 > $d);
$m = $months{$2};
$currDate = "$3$m$d$4$5$6";
last;
}
}
if ($currDate > $lastDate) {
if (!$count++ && open (LOG, ">$ARP3_CGI_PATH/temp/pop.last")) {
print LOG $currDate;
close(LOG);
}
open (CAPTURE, "|/usr/bin/perl $ARP3_CGI_PATH/arp3-emailcapture.pl");
$pop->get($msg, *CAPTURE);
$pop->delete($msg);
close(CAPTURE);
} else {
last;
}
}
$pop->quit();
print "Count: $count\n";
}
I was hoping that the error message "Error, do this: mount -t proc none /proc " might actually mean something useful and point towards what the problem is?
A search on the forum regarding cron errors revealed a thread that mentions an error log at /var/log/cron
I've downloaded this, and attached a copy to this thread, but I can't see anything that explains the problem.
Having said that, I don't really know what I'm looking for! It's not really my field of expertise!
If anyone could throw any light on this, or what my next course of action might be, I'd be really grateful. In words suitable for a newbie please!
Many thanks,
Myles
Attachments
-
248.5 KB Views: 2