Closed kasperbrandenburg closed 7 years ago
@kasperbrandenburg Hey there. I think the problem is the files aren't executable. Can you try chmod +x
on cron.php
and worker.php
and seeing if that gives better results?
Still seems to break after added +X
root@ubuntu-template:/var/www/411/bin# chmod +x cron.php
root@ubuntu-template:/var/www/411/bin# chmod +x worker.php
root@ubuntu-template:/var/www/411/bin# php cron.php
[+] Scheduler: 1475081804
except [NONE] Errno 2: "pcntl_exec(): Error has occurred: (errno 2) No such file or directory" at [/var/www/411/phplib/Scheduler.php:44] 0:[pcntl_exec() called at [/var/www/411/phplib/Scheduler.php:44]] 1:[FOO\Scheduler->process() called at [/var/www/411/bin/cron.php:47]]
err [411_Scheduler] Scheduler error site:[1] ret:[256]
root@ubuntu-template:/var/www/411/bin# ls -lh
total 36K
-rw-r--r-- 1 www-data www-data 597 Sep 28 12:44 backfill.php
-rw-r--r-- 1 www-data www-data 881 Sep 28 12:44 create_site.php
-rw-r--r-- 1 www-data www-data 879 Sep 28 12:44 create_user.php
-rwxr-xr-x 1 www-data www-data 1.1K Sep 28 12:44 cron.php
-rw-r--r-- 1 www-data www-data 698 Sep 28 12:44 db_cleanup.php
-rw-r--r-- 1 www-data www-data 769 Sep 28 12:44 es_sync.php
-rw-r--r-- 1 www-data www-data 1.3K Sep 28 12:44 migration.php
-rw-r--r-- 1 www-data www-data 281 Sep 28 12:44 shell.php
-rwxr-xr-x 1 www-data www-data 776 Sep 28 12:44 worker.php
root@ubuntu-template:/var/www/411/bin#
My own --date parameter did not work, cron.php will default if --date is not provided. I removed it
Hm, does the user the cron is running as have read access to that directory?
Running as root, and i just run chmod 777 recursively on /var/www/411/ Errormessages has changed
root@ubuntu-template:/var/www/411# php bin/cron.php
the time: 1475085910[+] Scheduler: 1475085910
except [NONE] Errno 2: "pcntl_exec(): Error has occurred: (errno 2) No such file or directory" at [/var/www/411/phplib/Scheduler.php:44] 0:[pcntl_exec() called at [/var/www/411/phplib/Scheduler.php:44]] 1:[FOO\Scheduler->process() called at [/var/www/411/bin/cron.php:48]]
err [411_Scheduler] Scheduler error site:[1] ret:[256]
Scheduler.php:39
defines a variable called $cmd
. Can you check whether this contains the full path of the cron.php
script?
// This is the child. Launch the scheduler for this site.
if($pid === 0) {
$cmd = sprintf('%s/bin/cron.php', BASE_DIR);
echo "----".$cmd."----";
$args = ["--date=$date", "--site={$site['id']}"];
if($backfill) {
$args[] = '--backfill';
This was the output. Looks good to me ----/var/www/411/bin/cron.php----
I'm out of ideas at this point... As a workaround, you could try invoking cron.php --site=1
instead of just cron.php
.
Yep, that seems to work... lets leave it at that.
Hi,
In the initial setup guide, the cronjob configuration seems outdated. I've followed the guide today, and got the system up and running, but cronjob didn't work
Running the CRON itself produces the following error
I had to change to this, which seems to make the cron functionality work
am i completely off, or is this correct?