Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th June 2012, 23:27
manarak manarak is offline
Senior Member
 
Join Date: Apr 2009
Posts: 263
Thanks: 32
Thanked 6 Times in 5 Posts
Default ISPC 3.0.4.5: Cron Jobs don't work

Hi, I have trouble with the cron jobs.

I have installed ISPC on debian squeeze following falko's perfect server How-To (thanks!)

I created the cron job in ISPC config under the proper user (web7)

syslog is telling me the following:
Quote:
Jun 24 17:05:01 bababobo1 /USR/SBIN/CRON[23877]: (web7) CMD (/usr/bin/php /var/www/clients/client1/web7/web/cronjobs/il_test.php^I#domain)
Jun 24 17:05:01 bababobo1 /USR/SBIN/CRON[23871]: (CRON) error (grandchild #23877 failed with exit status 17)
I also tried to change /usr/bin/php into /var/www/clients/client1/web7/usr/bin/php but the log stays the same, I presume both resolve to the chrooted shell.

Exit status 17 baffles me a little, according to
http://www.visualcron.com/ExitCodes.aspx
it means "The system cannot move the file to a different disk drive." ??
(even more baffling, I was unable to find another cron exit codes list on the internet)

Anyway, I don't know what's wrong.

I checked the log in /var/log/ispconfig/cron.log, and it says:
Quote:
mkdir: cannot create directory `/var/www/clients/client1/web7/var': File exists
mkdir: cannot create directory `/var/www/clients/client1/web7/var/run': File exists
usermod: user web7 is currently logged in
failed to execute usermod -d /var/www/clients/client1/web7/. -s /usr/sbin/jk_chrootsh web7
failed to modify user web7
usermod: user web7 is currently logged in
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
usermod: user web7 is currently logged in
failed to execute usermod -d /var/www/clients/client1/web7/. -s /usr/sbin/jk_chrootsh web7
failed to modify user web7
usermod: user web7 is currently logged in
PHP Warning: mkdir(): File exists in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 293
usermod: user web7 is currently logged in
failed to execute usermod -d /var/www/clients/client1/web7/. -s /usr/sbin/jk_chrootsh web7
failed to modify user web7
usermod: user web7 is currently logged in
PHP Warning: mkdir(): File exists in /usr/local/ispconfig/server/plugins-available/cron_jailkit_plugin.inc.php on line 293
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
I have no idea what these things mean and if that is the cause of my crons not working.
Who can help?
Thank you

Last edited by manarak; 24th June 2012 at 23:30.
Reply With Quote
Sponsored Links
  #2  
Old 24th June 2012, 23:37
manarak manarak is offline
Senior Member
 
Join Date: Apr 2009
Posts: 263
Thanks: 32
Thanked 6 Times in 5 Posts
Default

grep web7 /etc/passwd outputs:

Quote:
web7:x:5010:5006::/var/www/clients/client1/web7:/bin/false
Reply With Quote
  #3  
Old 25th June 2012, 08:33
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,401
Thanks: 834
Thanked 5,493 Times in 4,324 Posts
Default

Quote:
I also tried to change /usr/bin/php into /var/www/clients/client1/web7/usr/bin/php but the log stays the same, I presume both resolve to the chrooted shell.
Please undo that as there is no php binary in the jail.

If you want to execute a php script, then put it into the web folder of the website and then enter the URL starting with http://..... into the cron command field.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 25th June 2012, 11:19
manarak manarak is offline
Senior Member
 
Join Date: Apr 2009
Posts: 263
Thanks: 32
Thanked 6 Times in 5 Posts
Default

the file
/var/www/clients/client1/web7/usr/bin/php
does exist

I tried just putting http:// path to the script, but it doesn't work either. CRON now exits with code 8 "not enough storage" ??
Reply With Quote
  #5  
Old 25th June 2012, 12:15
manarak manarak is offline
Senior Member
 
Join Date: Apr 2009
Posts: 263
Thanks: 32
Thanked 6 Times in 5 Posts
Default

hmmm... I edited /etc/crontab and put it there to run under user web7, and sure enough it ran.

so why doesn't it run when set inside ISPConfig?
Reply With Quote
  #6  
Old 25th June 2012, 12:32
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 932
Thanks: 16
Thanked 262 Times in 208 Posts
Default

Did you have a look into the /etc/cron.d/ispc_webXX or ispc_chrooted_webX file? Everything correct in there?
__________________
Marius Cramer

pixcept KG
Reply With Quote
  #7  
Old 25th June 2012, 12:41
manarak manarak is offline
Senior Member
 
Join Date: Apr 2009
Posts: 263
Thanks: 32
Thanked 6 Times in 5 Posts
Default

it *looks* correct:

Quote:
MAILTO=''
SHELL='/usr/sbin/jk_chrootsh'
* * * * * web7 /usr/bin/php /var/www/clients/client1/web7/web/cronjobs/il_test.php #domain
(domain being the domain setup on web7)

Last edited by manarak; 25th June 2012 at 12:44.
Reply With Quote
  #8  
Old 25th June 2012, 12:46
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,401
Thanks: 834
Thanked 5,493 Times in 4,324 Posts
Default

The path to the php script is wrong, it has to be:

/web/cronjobs/il_test.php

and not:

/var/www/clients/client1/web7/web/cronjobs/il_test.php

when you call a script inside the jail.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 25th June 2012, 13:11
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 932
Thanks: 16
Thanked 262 Times in 208 Posts
Default

Quote:
Originally Posted by till View Post
The path to the php script is wrong, it has to be:

/web/cronjobs/il_test.php

and not:

/var/www/clients/client1/web7/web/cronjobs/il_test.php

when you call a script inside the jail.
Just to be a bit off-topic:
Maybe this could be automatically done by ISPC when using a chrooted cron. Just replace all "web root" paths with /
__________________
Marius Cramer

pixcept KG
Reply With Quote
  #10  
Old 25th June 2012, 13:30
manarak manarak is offline
Senior Member
 
Join Date: Apr 2009
Posts: 263
Thanks: 32
Thanked 6 Times in 5 Posts
 
Default

ok, I tried /usr/bin/php /web/cronjobs/il_test.php

and also just /web/cronjobs/il_test.php

neither works, both exit with code 17.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron jobs doesn't start. vaio1 Installation/Configuration 1 11th May 2012 09:36
Cron jobs not getting run 99miles General 3 29th February 2012 23:16
ISPc with frontal and specialized work for PC servers DreamK Tips/Tricks/Mods 1 8th February 2010 10:33
Upgraded and all webs work but dont show in ISPC grandpagenocide General 3 10th April 2008 14:18
cron jobs again DaRKNeSS666NL Installation/Configuration 8 29th March 2007 09:18


All times are GMT +2. The time now is 16:47.


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