HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Cron jobs not running (http://www.howtoforge.com/forums/showthread.php?t=43671)

IrDA 25th February 2010 11:19

Cron jobs not running
 
Hi all,

I am trying to set up some cron jobs for certain clients but I can't get them to work properly. I use the ISPconfig interface to set up cron jobs and the client have the option Full Cron enabled. The command is use for a test client to run every two minutes is:

Code:

2
*
*
*
*
/usr/bin/wget -O - -q -t 1 http://www.xxxx.gr/cron.php

This does not run. In /etc/cron.d/ there are an entry representing my test client (ipsc_chrooted_webX). These contain the jk_chrootsh shell which is not installed in my server, I didn't think that I would need jailkit.

Several errors appear in ISPC Cron-log (under "Monitor" tab).

Code:


chmod: cannot access `/var/www/clients/client7/web7/*': No such file or directory
chmod: cannot access `/var/www/clients/client8/web8/*': No such file or directory
chmod: cannot access `/var/www/clients/client7/web7/*': No such file or directory
chmod: cannot access `/var/www/clients/client8/web8/*': No such file or directory
/usr/local/ispconfig/server/scripts/create_jailkit_chroot.sh: line 24: jk_init: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_user.sh: line 25: jk_jailuser: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_chroot.sh: line 24: jk_init: command not found
mkdir: cannot create directory `/var/www/clients/client2/web2/var': File exists
mkdir: cannot create directory `/var/www/clients/client2/web2/var/run': File exists
mkdir: cannot create directory `/var/www/clients/client2/web2/var/run/mysqld': File exists
ln: creating hard link `/var/www/clients/client2/web2/var/run/mysqld/mysqld.sock': File exists
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_user.sh: line 25: jk_jailuser: command not found
usermod: no changes
/usr/local/ispconfig/server/scripts/create_jailkit_chroot.sh: line 24: jk_init: command not found
mkdir: cannot create directory `/var/www/clients/client2/web2/var': File exists
mkdir: cannot create directory `/var/www/clients/client2/web2/var/run': File exists
mkdir: cannot create directory `/var/www/clients/client2/web2/var/run/mysqld': File exists
ln: creating hard link `/var/www/clients/client2/web2/var/run/mysqld/mysqld.sock': File exists
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_user.sh: line 25: jk_jailuser: command not found
usermod: no changes

I am not sure about these errors at all. Some of them appear to be coming from missing jailkit programs. Could you please help me set up cron correctly and get rid of these errors??

till 25th February 2010 11:23

There is a problem in ispconfig 3.0.1.6 with the creation of the chroot enviroment for cronjobs, the cronjobs only work if you add also a chrootes ssh user for this website.

IrDA 25th February 2010 11:35

Since I don't have jailkit installed is it ok to create the ssh-user with "Chroot Shell" set to "None" ??

[edit]Thanks for the blazing fast reply till ;) [/edit]

till 25th February 2010 11:40

Quote:

Since I don't have jailkit installed is it ok to create the ssh-user with "Chroot Shell" set to "None" ??
Should be ok.

IrDA 25th February 2010 12:06

I can confirm that in /etc/cron.d/ there exists a file "ipsc_webX without any reference of chrooted in the file name nor inside it.

Checking syslog reveals that the cron is executed by the user.

Can I clear my ISPC cron-job log ??

till 25th February 2010 12:10

No need to clear the log, its just a logfile and you should not clear logfiles as this is done by the system automatically when they grow too big.

cypriot 18th November 2011 15:12

Ispconfig3 Cron jobs not working
 
where do i do wrong please ?


PHP Warning: mkdir(): File exists in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 293
/usr/local/ispconfig/server/scripts/create_jailkit_chroot.sh: line 24: jk_init: command not found
mkdir: cannot create directory `/var/www/clients/client0/web2/var': File exists
mkdir: cannot create directory `/var/www/clients/client0/web2/var/run': File exists
mkdir: cannot create directory `/var/www/clients/client0/web2/var/run/mysqld': File exists
ln: creating hard link `/var/www/clients/client0/web2/var/run/mysqld/mysqld.sock' => `/var/run/mysqld/mysqld.sock': Invalid cross-device link
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_user.sh: line 25: jk_jailuser: command not found
usermod: no changes
PHP Warning: mkdir(): File exists in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 293
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
/usr/local/ispconfig/server/scripts/create_jailkit_chroot.sh: line 24: jk_init: command not found
mkdir: cannot create directory `/var/www/clients/client0/web2/var': File exists
mkdir: cannot create directory `/var/www/clients/client0/web2/var/run': File exists
mkdir: cannot create directory `/var/www/clients/client0/web2/var/run/mysqld': File exists
ln: creating hard link `/var/www/clients/client0/web2/var/run/mysqld/mysqld.sock' => `/var/run/mysqld/mysqld.sock': Invalid cross-device link
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_user.sh: line 25: jk_jailuser: command not found
usermod: no changes
PHP Warning: mkdir(): File exists in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 293
/usr/local/ispconfig/server/scripts/create_jailkit_chroot.sh: line 24: jk_init: command not found
mkdir: cannot create directory `/var/www/clients/client0/web2/var': File exists
mkdir: cannot create directory `/var/www/clients/client0/web2/var/run': File exists
mkdir: cannot create directory `/var/www/clients/client0/web2/var/run/mysqld': File exists
ln: creating hard link `/var/www/clients/client0/web2/var/run/mysqld/mysqld.sock' => `/var/run/mysqld/mysqld.sock': Invalid cross-device link
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_programs.sh: line 20: jk_cp: command not found
/usr/local/ispconfig/server/scripts/create_jailkit_user.sh: line 25: jk_jailuser: command not found
usermod: no changes
PHP Warning: mkdir(): File exists in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 293
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0

till 18th November 2011 15:16

What exact problem do you have? The above output is ok, it means that the jail exists already, so thats no error.

cypriot 18th November 2011 15:17

Quote:

Originally Posted by till (Post 267804)
What exact problem do you have? The above output is ok, it means that the jail exists already, so thats no error.


I am trying to add cron jobs but they not working .... i tried with starting http:// and /var/ as well but not working ...


All times are GMT +2. The time now is 01:28.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.