Forums / General / [Solved] cron error

[Solved] cron error

Author Message

Seth Gottlieb

Thursday 07 January 2010 10:35:10 am

Hello,
I am trying to run cron and it is giving me the following errors:
Running cronjobs/unpublish.php
Forcing to steal the mutex lock: cronjobs/unpublish.php
Stealing mutex. Old process has run too long.
Failed to steal cronjob part lock.

...
When I run the command with the -d command, I get errors about file permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/5897675159451032af26dc892b1b2daf.php', perhaps wrong permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/746a445527de1cc496f7b7567782af30.php', perhaps wrong permissions

....

This happens even when I recursively set permissions to be open to everyone and when I run the command sudo'ing as root or apache. I can even create a file that var/cache/ini/ directory manually with "touch"
Does anyone know what may be happening here?
Here is my PHP information in case that helps
-sh-3.2$ php -v
PHP 5.2.6 (cli) (built: May 2 2008 16:06:40)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with the ionCube PHP Loader v3.1.29, Copyright (c) 2002-2007, by ionCube Ltd.
Thanks,
Seth

Robin Muilwijk

Friday 08 January 2010 1:33:25 am

Hi Seth,

I searched the forum and read some other topics where people had problems with cronjobs running more than once. This is indicated by the "trying to steal the mutex lock..." message.

In one of those threads it was suggested to clear all cache, could you try that?

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Jérôme Vieilledent

Friday 08 January 2010 6:04:45 am

"

When I run the command with the -d command, I get errors about file permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/5897675159451032af26dc892b1b2daf.php', perhaps wrong permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/746a445527de1cc496f7b7567782af30.php', perhaps wrong permissions

"

Hi Seth

It seems that your user that runs your cronjobs doesn't have write access to the cache folder... Best thing to do is to run your cronjobs from your webserver's user (e.g. www-data on debian)

Fere DZON-OKO

Tuesday 12 January 2010 9:21:51 am

I dont think that it's a problem of webserver's user.

I have the same errors and i run the cronjobs with the account "root".

You have an other idea ?

Thk

Yolfa

Seth Gottlieb

Friday 15 January 2010 8:18:43 am

Sorry to have been absent. I thought the forum was going to mail me when there was a reply. I thought there was a way to subscribe to a thread but I can't find it now.

Anyway....

I had searched the earlier forum posts and tried the clearing cache tip. I am also able to create a file in that directory. Below is the ouput. See at the bottom how I am able to touch and rm the file that the script was not able to create. Is it possible that the script is working from a different base directory?

Thanks,

Seth

Error: (eZINI)
Couldn't create cache file 'var/cache/ini/5897675159451032af26dc892b1b2daf.php', perhaps wrong permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/746a445527de1cc496f7b7567782af30.php', perhaps wrong permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/08c6779a7f1b56d73d70d35758e94096.php', perhaps wrong permissions
Error: (eZINI)
Couldn't create cache file 'var/cache/ini/87482013ec594c2d938b1eec4eccb6cb.php', perhaps wrong permissions
Timing: ()
Script cronjobs/notification.php starting
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/6f64141d26ca036109446d9c7184dd2d
Timing: ()
Script cronjobs/notification.php done
Timing: ()
Script cronjobs/workflow.php starting
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb
Warning: (PHP: E_WARNING)
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/slateroofclient.com/httpdocs/scma/var/scma/cache/ezmutex owned by uid 48 in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Warning: (PHP: E_WARNING)
fopen(var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb): failed to open stream: No such file or directory in /var/www/vhosts/slateroofclient.com/httpdocs/scma/lib/ezutils/classes/ezmutex.php on line 70
Error: ()
Failed to open file: var/scma/cache/ezmutex/a1847e1bb5bf81edc3a166e3ee1847eb
Timing: ()
Script cronjobs/workflow.php done
Total script time: 0.0972 sec
-sh-3.2$ touch var/cache/ini/5897675159451032af26dc892b1b2daf.php
-sh-3.2$ rm var/cache/ini/5897675159451032af26dc892b1b2daf.php
-sh-3.2$

Robin Muilwijk

Friday 15 January 2010 11:16:34 am

Hi Seth,

Can you check if it is possible for you to disable SAFE_MODE? I checked the forums on this, and it could be (part of) the problem.

About tracking/notification of new replies on this forum thread; if you are logged in and you have not used this feature yet, there is a button on the bottom of a thread to track changes.

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Robin Muilwijk

Monday 25 January 2010 10:54:44 am

Hi Seth,

Someone else with a similar problem solved it, see http://share.ez.no/forums/general/cronjob-error2

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Seth Gottlieb

Monday 25 January 2010 12:49:17 pm

Hi Robin,

Thanks for your reply. I had already tried clearing cache but turning Safe_Mode to Off did the trick.

Thanks!

Seth

Robin Muilwijk

Tuesday 26 January 2010 2:03:09 am

Glad to see this is fixed, thanks for sharing the solution.

-- Robin

P.S. Could you edit your first post, add [RESOLVED] in front of the subject? Thanks

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Nicolas Pastorino

Monday 01 February 2010 9:09:30 am

"

Sorry to have been absent. I thought the forum was going to mail me when there was a reply. I thought there was a way to subscribe to a thread but I can't find it now.

"

Hi Seth,

Good to see your issue solved. You may want to edit the original post and prepend the '[Solved]' phrase (waiting for a simple and clear button 'Mark as solved' :) ).

As for the notifications, you should be able, when editing a forum topic or reply, to check the "Track this reply" checkbox right beside the "OK" and "Cancel" buttons below the text editor. This makes sure you are notified whenever a new reply is posted in the thread. Also, make sure the email you provided is valid. And last, check the spam folder, automatic emails sometimes land there. You can also check your notification settings here: http://share.ez.no/notification/settings.

Cheers !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye