eZ Community » Forums » General » [Solved] cron error
expandshrink

[Solved] cron error

[Solved] cron error

Thursday 07 January 2010 7:35:10 pm - 9 replies

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

Modified on Tuesday 02 February 2010 2:40:45 am by Seth Gottlieb

Friday 08 January 2010 10: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

Friday 08 January 2010 3:04:45 pm

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)

Tuesday 12 January 2010 6:21:51 pm

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

Friday 15 January 2010 5:18:43 pm

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$

Friday 15 January 2010 8:16:34 pm

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

Monday 25 January 2010 7:54:44 pm

Hi Seth,

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

Regards Robin

Monday 25 January 2010 9: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

Tuesday 26 January 2010 11: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

Monday 01 February 2010 6:09:30 pm

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' happy.gif Emoticon ).

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 !

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from