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 Job error (http://www.howtoforge.com/forums/showthread.php?t=60084)

pawan 1st January 2013 21:49

cron Job error
 
I have added a magento cron job, but in the monitor job queue it is not getting cleared.

the command for cron job added is like this:
/var/www/clients/client22/web35/sub-domain-directory/cron.sh

the server debug logs:
Code:

2013-01-02 02:11        server1.mywebsolutions.co.in        Debug        There is already a lockfile set. Waiting another 10 seconds...       
2013-01-02 02:11        server1.mywebsolutions.co.in        Debug        There is already a lockfile set. Waiting another 10 seconds...       
2013-01-02 02:10        server1.mywebsolutions.co.in        Debug        Added jailkit user to chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_user.sh web35 /var/www/clients/client22/web35 /home/web35 /bin/bash       
2013-01-02 02:10        server1.mywebsolutions.co.in        Debug        Added cron programs to jailkit chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_programs.sh /var/www/clients/client22/web35 '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php'       
2013-01-02 02:10        server1.mywebsolutions.co.in        Debug        Added programs to jailkit chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_programs.sh /var/www/clients/client22/web35 '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico'       
2013-01-02 02:10        server1.mywebsolutions.co.in        Debug        Jailkit Plugin (Cron) -> setting up jail       
2013-01-02 02:10        server1.mywebsolutions.co.in        Debug        Calling function 'update' from plugin 'cron_jailkit_plugin' raised by event 'cron_update'.       
2013-01-02 02:10        server1.mywebsolutions.co.in        Debug        Found 1 changes, starting update process.

Need a solution to overcome this problem.

till 2nd January 2013 08:15

The cronjob is jailed according to the output, so the command executed by cron must be relative to the jail, cahnge the command to:

/sub-domain-directory/cron.sh

pawan 2nd January 2013 10:46

Tiil

I am really sorry, but I I need further clarification. I have used the command

/var/www/clients/client22/web35/sub-domain-directory/cron.sh

now you say change the command to:
/sub-domain-directory/cron.sh

does it mean that I should omit /var/www/clients/client22/web35/ or just remove /web35/ like:

/var/www/clients/client22/sub-domain-directory/cron.sh

Thanks.

till 2nd January 2013 10:48

Enter this into the command field:

/sub-domain-directory/cron.sh

pawan 2nd January 2013 11:16

my cronjob list look like this:

server1.example.com domain.com 10 * * * * /subdomain-directory/cron.sh

But the the monitor - show job queue shows it pending.

I tried running the command in the terminal the output is like this:
HTML Code:

pawan@server1:~$ sudo su
[sudo] password for pawan:
root@server1:/home/pawan# rm -f /usr/local/ispconfig/server/temp/.ispconfig_lockroot@server1:/home/pawan# rm -f /usr/local/ispconfig/server/temp/.ispconfig_lockroot@server1:/home/pawan# rm -f /usr/local/ispconfig/server/temp/.ispconfig_lockroot@server1:/home/pawan# rm -f /usr/local/ispconfig/server/temp/.ispconfig_lockroot@server1:/home/pawan# /usr/bin/php -q /usr/local/ispconfig/server/server.php02.01.2013-15:33 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
02.01.2013-15:33 - DEBUG - Found 3 changes, starting update process.
02.01.2013-15:33 - DEBUG - Calling function 'update' from plugin 'cron_jailkit_plugin' raised by event 'cron_update'.
02.01.2013-15:33 - DEBUG - Jailkit Plugin (Cron) -> setting up jail
02.01.2013-15:33 - DEBUG - Added programs to jailkit chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_programs.sh /var/www/clients/client22/web35 '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico'
02.01.2013-15:33 - DEBUG - Added cron programs to jailkit chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_programs.sh /var/www/clients/client22/web35 '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php'
usermod: no changes
02.01.2013-15:33 - DEBUG - Added jailkit user to chroot with command: /usr/local/ispconfig/server/scripts/create_jailkit_user.sh web35 /var/www/clients/client22/web35 /home/web35 /bin/bash
PHP Fatal error:  Call to a member function mkdir() on a non-object in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 302
root@server1:/home/pawan#

One more thing while adding a cronjob - in the dropdown list I get the list of the parent website names only and not subdomain.domain.tld. is it ok?

server debug log is like this:
2013-01-02 15:47 server1.mywebsolutions.co.in Debug There is already a lockfile set. Waiting another 10 seconds...
2013-01-02 15:47 server1.mywebsolutions.co.in Debug There is already an instance of server.php running. Exiting.
2013-01-02 15:46 server1.mywebsolutions.co.in Debug There is already a lockfile set. Waiting another 10 seconds...
2013-01-02 15:46 server1.mywebsolutions.co.in Debug There is already a lockfile set. Waiting another 10 seconds...
2013-01-02 15:46 server1.mywebsolutions.co.in Debug There is already a lockfile set. Waiting another 10 seconds...
2013-01-02 15:46 server1.mywebsolutions.co.in Debug There is already a lockfile set. Waiting another 10 seconds...
2013-01-02 15:46 server1.mywebsolutions.co.in Debug There is already a lockfile set. Waiting another 10 seconds...

till 2nd January 2013 11:36

Which ISPConfig version do you use?

Quote:

One more thing while adding a cronjob - in the dropdown list I get the list of the parent website names only and not subdomain.domain.tld. is it ok?
Yes, thats ok as subdomains can not have cronjobs, a cronjob is always assigned to a website.

pawan 2nd January 2013 13:03

Ispconfig 3.0.5 rc1

pawan 3rd January 2013 22:20

Till,
No matter how I try, I have used all combinations like fro example:

Quote:

/var/www/clients/clientxx/cron.sh
/var/www/clients/clientxx/webxx/cron.sh
/var/www/clients/clientxx/webxx/web/cron.sh
/var/www/clinets/clientxx/domain.tld/cron.sh
/web/cron.sh
But none of them work,
but url cron like http://domain.tld/cron.php works fine. so my cron is running fine with domain.tld/cron.php
and for subdomain like http://subdomain.domain.tld/cron.php is also working fine.

So why the .sh command not working? is there any issue with that or I am doing it wrong?
and is there any con in running URL cron.

Thanks.

pawan 5th January 2013 21:30

ISPC cron log error:

PHP Fatal error: Call to a member function mkdir() on a non-object in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 302
ERROR: /var/www/clients/client48/web77/etc is not owned by root:root!
ERROR: /var/www/clients/client48/web77/etc is not owned by root:root!
usermod: no changes

falko 6th January 2013 15:30

I've added this to our bugtracker, so we will check that.


All times are GMT +2. The time now is 15:02.

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