Cron jobs not running

Discussion in 'Installation/Configuration' started by IrDA, Feb 25, 2010.

  1. IrDA

    IrDA New Member

    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??
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  3. IrDA

    IrDA New Member

    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]
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Should be ok.
     
  5. IrDA

    IrDA New Member

    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 ??
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  7. cypriot

    cypriot New Member

    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
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

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

    cypriot New Member


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

Share This Page