[horde] grandchild failed in cron

Andreas Mauser andreas at mauser.info
Sun Apr 8 13:54:15 UTC 2012


Hi,

----- Nachricht von Vilius ?umskas <vilius at lnk.lt> ---------
   Datum: Sun, 8 Apr 2012 15:28:36 +0300
     Von: Vilius ?umskas <vilius at lnk.lt>
Betreff: Re: [horde] grandchild failed in cron
      An: horde at lists.horde.org


> Sveiki,
>
> Sunday, April 8, 2012, 12:46:13 PM, you wrote:
>
>>>>>>> >>>>>>>>>>>>>>> Am 05.03.2012 12:56, schrieb Andreas Mauser:
>>>>>>> >>>>>>>>>>>>>>>> In crontab I have:
>>>>>>> >>>>>>>>>>>>>>>>
>>>>>>> >>>>>>>>>>>>>>>> */5 * * * * root
>>>>>>> >>>>>>>>>>>>>>>>
>>>>>>> PHP_PEAR_SYSCONF_DIR=/var/www/mauser.info/mailoffice
>>>>>>> >>>>>>>>>>>>>>>> php -d
>>>>>>> include_path=/var/www/mauser.info/mailoffice/pear/php
>>>>>>> >>>>>>>>>>>>>>>> /var/www/mauser.info/mailoffice/pear/horde-alarms
>>>>>>> >>>>>>>>>>>>>>>>
>>>>>>> >>>>>>>>>>>>>>>> and I get a:
>>>>>>> >>>>>>>>>>>>>>>>
>>>>>>> >>>>>>>>>>>>>>>> /USR/SBIN/CRON[4915]: (CRON) error (grandchild
>>>>> #4916
>>>>>>> >>>>>>>>>>>>>>>> failed with exit
>>>>>>> >>>>>>>>>>>>>>>> status 127)
>>>>>>> >>>>>>>>>>>>>>>> and:
>>>>>>> >>>>>>>>>>>>>>>> /bin/sh: root: not found
>>>>>>> >>>>>>>>>>>>>>>>
>>>>>>> >>>>>>>>>>>>>>>> Removing 'root' at the line beginning I get:
>>>>>>> >>>>>>>>>>>>>>>> PHP Fatal error:  Call to a member function setObs()
>>>>>>> >>>>>>>>>>>>>>>> on a non-object in
>>>>>>> >>>>>>>>>>>>>>>>
>>>>>>> >>>>>>>>>>>>>>>> Anything to fix that?
>>>>>>> >>>>>>>>>>>>>
>>>>>>> >>>>>>>>>>>>> Sorry I didnt give you the full error message:
>>>>>>> >>>>>>>>>>>>>
>>>>>>> >>>>>>>>>>>>> Removing 'root' at the line beginning I get:
>>>>>>> >>>>>>>>>>>>> PHP Fatal error:  Call to a member function setObs() on
>>>>>>> >>>>>>>>>>>>> a non-object in /PATH/SQL.php in line 130
>>>>>>> >>>>>>>>>>>>>
>>>>>>> >>>>>>>>>>>>> Does that help some more?
>>>>>>> >>>>>>>>>>>>
>>>>>>> >>>>>>>>>>>> If it's really SQL.php (and not Sql.php), that's not even
>>>>>>> >>>>>>>>>>>> Horde 4 code.
>>>>>>> >>>>>>>>>>>>
>>>>>>> >>>>>>>>>>>
>>>>>>> >>>>>>>>>>> Sorry about that, I wrote the last words by myself because
>>>>>>> >>>>>>>>>>> I already closed the console window.
>>>>>>> >>>>>>>>>>>
>>>>>>> >>>>>>>>>>> PHP Fatal error:  Call to a member function setObs() on a
>>>>>>> >>>>>>>>>>> non-object in
>>>>>>> >>>>>>>>>>>
>>>>>>> /var/www/mauser.info/mailoffice/pear/php/Horde/Perms/Sql.php on
>>>>>>> >>>>>>>>>>> line 130
>>>>>>> >>>>>>>>>>>
>>>>>>> >>>>>>>>>>> In fact you are right, it is Sql.php and because it is in
>>>>>>> >>>>>>>>>>> horde directories I assume its a horde part?
>>>>>>> >>>>>>>>>>>
>>>>>>> >>>>>>>>>>> Is that fixable? Because I get hundrets of messages a day
>>>>>>> >>>>>>>>>>> in the logfile.
>>>>>>> >>>>>>>>>>
>>>>>>> >>>>>>>>>> Is there anything I can do?
>>>>>>> >>>>>>>>>
>>>>>>> >>>>>>>>> This could only happen if the unserialization in the line
>>>>>>> >>>>>>>>> fails, but you should have that in your logs too. And that
>>>>>>> >>>>>>>>> could only happen if you have some broken permission object
>>>>>>> >>>>>>>>> in the cache.
>>>>>>> >>>>>>>>
>>>>>>> >>>>>>>> Ok, I take this as a fact. But what would one do in  
>>>>>>> such a case?
>>>>>>> >>>>>>>
>>>>>>> >>>>>>> A reboot did not help at all.
>>>>>>> >>>>>>
>>>>>>> >>>>>> Anyone who can help? It fills my logs daily with a hundred of
>>>>>>> messages.
>>>>>>> >>>>>
>>>>>>> >>>>> Did you read my reponse? First of all there has to be some error
>>>>>>> >>>>> in any of the logs about failed unserialization. Is this  
>>>>>>> the case?
>>>>>>> >>>>>
>>>>>>> >>>>> And I wrote that this may only happen if a cached value is
>>>>>>> >>>>> broken. So you need to empty the cache if that's the case.
>>>>>>> >>>>
>>>>>>> >>>> Yes, I read, but I thought a reboot of the server will do the
>>>>>>> >>>> clear cache as well. I rebooted because if I run the script:
>>>>>>> >>>>
>>>>>>> >>>> php -d include_path=/var/www/mauser.info/mailoffice/pear/php
>>>>>>> >>>> /var/www/mauser.info/mailoffice/pear/horde-clear-cache
>>>>>>> >>>>
>>>>>>> >>>> I get:
>>>>>>> >>>>
>>>>>>> >>>> PHP Fatal error:  Call to a member function setObs() on a
>>>>>>> >>>> non-object in
>>>>>>> >>>> /var/www/mauser.info/mailoffice/pear/php/Horde/Perms/Sql.php
>>>>> on
>>>>>>> >>>> line 130
>>>>>>> >>>>
>>>>>>> >>>> and was afraid to ask what I did wrong now. How can I clear the
>>>>> cache?
>>>>>>> >>>
>>>>>>> >>> No idea. You didn't tell us which caching backend you use. Whether
>>>>>>> >>> it's cleared by a reboot depends on whether you use a persistant
>>>>>>> >>> cache storage.
>>>>>>> >>
>>>>>>> >> After an upgrade of mysql in Debian I was able to clear the cache,
>>>>>>> >> but the grandchild error doesnt go away.
>>>>>>> >>
>>>>>>> >> I use memcache, the memcache application is installed, also an
>>>>>>> >> entry in php.ini has been created. php5-memcache is also installed.
>>>>>>> >
>>>>>>> > I still get the grandchild error.
>>>>>>> >
>>>>>>> > I use memcache as a backend.
>>>>>>> > I rebootet the server.
>>>>>>> > I cleared the horde cache.
>>>>>>> >
>>>>>>> > Error dont go away.
>>>>>>> >
>>>>>>> > Any ideas how can I proceed?
>>>>>>>
>>>>>>> I can verify that the grandchild PID is the same which is generated
>>>>>>> when running the Horde cron entry:
>>>>>>>
>>>>>>> cat /var/log/syslog |grep 1229
>>>>>>>
>>>>>>> Apr  4 08:35:01 webster /USR/SBIN/CRON[1229]: (root) CMD (root
>>>>>>> PHP_PEAR_SYSCONF_DIR=/var/www/mauser.info/mailoffice php -d
>>>>>>> include_path=/var/www/mauser.info/mailoffice/pear/php
>>>>>>> /var/www/mauser.info/mailoffice/pear/horde-alarms > /dev/null 2>&1)
>>>>>>>
>>>>>>> Apr  4 08:35:01 webster /USR/SBIN/CRON[1228]: (CRON) error (grandchild
>>>>>>> #1229 failed with exit status 127)
>>>>>>>
>>>>>>> The entry in the crontab is:
>>>>>>>
>>>>>>> ##### Horde Alarms
>>>>>>> */5 * * * * root
>>>>> PHP_PEAR_SYSCONF_DIR=/var/www/mauser.info/mailoffice
>>>>>>> php -d include_path=/var/www/mauser.info/mailoffice/pear/php
>>>>>>> /var/www/mauser.info/mailoffice/pear/horde-alarms > /dev/null 2>&1
>>>>>>>
>>>>>>> How can I fix this or work around?
>>>>>>
>>>>>> Error 127 means "command not found", so there is something wrong
>>>>>> with your cron or environment. Make sure you can execute
>>>>>> "PHP_PEAR_SYSCONF_DIR=/var/www/mauser.info/mailoffice  php -d
>>>>>> include_path=/var/www/mauser.info/mailoffice/pear/php
>>>>>> /var/www/mauser.info/mailoffice/pear/horde-alarms" with the root
>>>>> user.
>>>>>
>>>>> I can not execute:
>>>>>
>>>>> PHP_PEAR_SYSCONF_DIR=/var/www/mauser.info/mailoffice  php -d
>>>>> include_path=/var/www/mauser.info/mailoffice/pear/php
>>>>> /var/www/mauser.info/mailoffice/pear/horde-alarms
>>>>>
>>>>> I get a:
>>>>>
>>>>> PHP Fatal error:  Call to a member function setObs() on a non-object
>>>>> in /var/www/mauser.info/mailoffice/pear/php/Horde/Perms/Sql.php on
>>>>> line 130
>>>>>
>>>>> Line 130 is:
>>>>>
>>>>>   $this->_permsCache[$name]->setObs($this->_cache, $this->_db);
>>>>>
>>>>> What is wrong here?
>>>>
>>>> Jan have already explained. Your cache is corrupt most probably.
>>>
>>> I know. But I cleared the cache successfully but the grandchild
>>> error does not go away.
>>>
>>>> You need to debug this line by line in PHP code and see where it goes.
>>>
>>> I dont know how to debug PHP, but I can take steps if you can suggest.
>>>
>>>> Also try disabling Caching completely to see if that helps.
>
>> I disabled the memcache server, and I set all to cache on local files
>> which works.
>
>> But the grandchild error does NOT go away.
>
>> It only goes away if I comment the Horde Alarms line in crontab.
>
>> It seems to be the only thing in cron which produces error, as all my
>> other scripts works well.
>
>> Any help welcome.
>
>> Andreas
>
> As   I  said  before  there  is  something  wrong  with your cron  or  the
> shell environment. You should contact your OS mailing list.
>
> BTW,  searching google for the grandchild error gives a ton of results
> regarding cron on debian/ubuntu.

I have found and read them all.

And I also used different shells to test. And I used several tricks to  
work around.
But it is definitely this Horde Alarm line which causes this behaviour.

Can you tell on which Linux distribution Horde 4 shall work the nicest?
Then I will just move to another distribution. What about CentOS6?  
Supported and ok?

Andreas


More information about the horde mailing list