Cronjob: Unexpected error!

Ask all your questions regarding OC 5.x Please read the Support Forum Rules
Forum rules
Version 4 is not supported anymore! Please upgrade your ownCloud for security and support.
Before you post; make sure you are using at least PHP Version 5.3.x - Also read Support Forum - Read this before posting

Re: Cronjob: Unexpected error!

Postby laryllian » Wed Oct 09, 2013 3:04 pm

Rancor wrote:Hi,

did you had a look at this existing thread about this issue:

https://forum.owncloud.org/viewtopic.php?f=23&t=9182

which was fixed when upgrading PHP to at least 5.3.2. Maybe the command line client of PHP at your system is still PHP 5.2? Just check it with:

php -v


Yes, it says:
PHP 5.3.10 (cli) (built: Mar 23 2012 21:39:03)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

so this cannot be the cause. Thx.
laryllian
Starter
 
Posts: 62
Joined: Thu Sep 20, 2012 5:05 pm
ownCloud version: 5.0.12
Webserver: Apache
Database: MySQL
OS: Linux Hosting Package
PHP version: 5.3.10

Re: Cronjob: Unexpected error!

Postby replax » Mon Oct 28, 2013 11:21 pm

Hi!
I am also getting an email every min. about the cron job. my installation works fine otherwise.
Also i deactivated the full text search.
the mail is:
Code: Select all
Return-Path: <http@DOMAIN>
Delivered-To: <http@DOMAIN>
Received: from DOMAIN
        by mybox (Dovecot) with LMTP id 6+U5B+KARVKHCAAA7SOVnA
        for <http@DOMAIN>; Fri, 27 Sep 2013 14:58:10 +0200
Received: by DOMAIN (Postfix, from userid 33)
        id AF7ED82A12; Fri, 27 Sep 2013 14:53:01 +0200 (CEST)
From: http@DOMAIN (Cron Daemon)
To: http@DOMAIN
Subject: Cron <http@mybox> php -f /usr/share/webapps/owncloud/cron.php
Content-Type: text/plain; charset=ANSI_X3.4-1968
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/srv/http>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=http>
X-Cron-Env: <USER=http>
Message-Id: <20130927125301.AF7ED82A12@DOMAIN>
Date: Fri, 27 Sep 2013 14:53:01 +0200 (CEST)

Unexpected error!


I run owncloud on arch linux with nginx and php-fpm.
i've so far received a few 100k of such emails... :(

how could i debug this further?

thanks :)
yes, I am running an Archlinux server :D
replax
Newbie
 
Posts: 4
Joined: Wed Sep 04, 2013 6:32 pm
ownCloud version: 5.0.12
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.5.3

Re: Cronjob: Unexpected error!

Postby RandolphCarter » Mon Oct 28, 2013 11:31 pm

For starters, to not get spammed by ownCloud cronjob, I'd recommend to disable the cronjob for the moment 8-) .

Then you could try to run the cronjob from the command line to see if you also get the error there.
Further, I'd recommend to check the owncloud logfile.
RandolphCarter
Inventory
 
Posts: 4301
Joined: Wed May 30, 2012 8:42 am
ownCloud version: 7.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.x

Re: Cronjob: Unexpected error!

Postby replax » Tue Oct 29, 2013 11:49 am

Hi!
I figured out that I was missing the php-mcrypt module. installed that and then tried to run it from the command line. interestingly, the error persists but only every other time i execute the command.
Which is really strange, I have to admit.
How could I debug further?
Thanks :)
yes, I am running an Archlinux server :D
replax
Newbie
 
Posts: 4
Joined: Wed Sep 04, 2013 6:32 pm
ownCloud version: 5.0.12
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.5.3

Re: Cronjob: Unexpected error!

Postby Spooky » Mon Nov 04, 2013 12:46 pm

The error is back for me (probably for an entirely different reason). Still no log entries or anything else other than "Unexpected error!". mcrypt is already present in my case.
Spooky
Beginner
 
Posts: 29
Joined: Sun Sep 29, 2013 3:18 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Linux Hosting Package
PHP version: 5.4.4

Re: Cronjob: Unexpected error!

Postby RandolphCarter » Mon Nov 04, 2013 2:13 pm

cron jobs run in a slightly different environment than a normal shell for the user. could be that you're e.g. running a different version of php or some modules fail to load. Did you try to run the cron php manually as I suggested?
RandolphCarter
Inventory
 
Posts: 4301
Joined: Wed May 30, 2012 8:42 am
ownCloud version: 7.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.x

Re: Cronjob: Unexpected error!

Postby Spooky » Mon Nov 04, 2013 6:26 pm

RandolphCarter wrote:cron jobs run in a slightly different environment than a normal shell for the user. could be that you're e.g. running a different version of php or some modules fail to load.

The error also happens when calling it from the web. i.e. when the cron is set to "Webcron" and called via http://domain/cron.php, instead of via the command line.

In my case the PHP version fo the console environment is the same as for the web environment. Modules may be different, but wouldn't that cause a more specific error than "Unexpected error!"?


RandolphCarter wrote:Did you try to run the cron php manually as I suggested?

Running it manually from the command line results in the same non-descriptive "Unexpected error!" output.


Actually I just noticed that there are some errors in the log visible. The error happening right before "Unexpected error!" is shown (on the CLI) is the following:
Code: Select all
Fatal   PHP   Cross-reference streams are not supported yet. at /apps/search_lucene/3rdparty/Zend/Pdf/Parser.php#318   2013-11-04T16:17:57+00:00
Spooky
Beginner
 
Posts: 29
Joined: Sun Sep 29, 2013 3:18 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Linux Hosting Package
PHP version: 5.4.4

Re: Cronjob: Unexpected error!

Postby Spooky » Tue Nov 05, 2013 9:38 am

There is a github issue about this actually: https://github.com/owncloud/apps/issues/1386

However, when I disable "Full Text Search" in "Apps", the Cronjob issues the following error:

Code: Select all
PHP Fatal error:  Class 'Zend_Search_Lucene_Document' not found in /apps/search_lucene/lib/indexer.php on line 68
Unexpected error!


Is it not possible to disable the Full Text Search completely? Or is it because there are still things in the Queue of the Cronjob, from when the Full Text Search was still active (since it always failed) and now it can't work because "Full Text Search" was disabled?

How can I safely remove these operations from the cronjob queue? i.e. is it safe to remove all entries from oc_queuedtasks which have 'search_lucene' in the app field?
Spooky
Beginner
 
Posts: 29
Joined: Sun Sep 29, 2013 3:18 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Linux Hosting Package
PHP version: 5.4.4

Re: Cronjob: Unexpected error!

Postby Rancor » Tue Nov 05, 2013 12:56 pm

Hi,

IIRC there was a bugreport at the bugtracker that background jobs for the search lucene app are not deleted when the app is disabled but i can't find it at the moment.

You could also have a look at the oc_backgroundjobs or oc_jobs table in your database. (Can't remember the exactly name of the table) for still runnings jobs of this app.
*mostly inactive*
Rancor
OwnCloud master
 
Posts: 7988
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 7.0.1
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 5.5.x

Re: Cronjob: Unexpected error!

Postby Spooky » Tue Nov 05, 2013 8:46 pm

Rancor wrote:Hi,

IIRC there was a bugreport at the bugtracker that background jobs for the search lucene app are not deleted when the app is disabled but i can't find it at the moment.

You could also have a look at the oc_backgroundjobs or oc_jobs table in your database. (Can't remember the exactly name of the table) for still runnings jobs of this app.


The only table I could find was the oc_queuedtasks table that I mentioned. It has ~32000 search_lucene tasks in there (all the tasks in there are from search_lucene). Well I went ahead and deleted those entries, so that I can run the cronjob now without the full text search (search_lucene).
Spooky
Beginner
 
Posts: 29
Joined: Sun Sep 29, 2013 3:18 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Linux Hosting Package
PHP version: 5.4.4

PreviousNext

Return to ownCloud Community Edition 5.x

Who is online

Users browsing this forum: Google [Bot] and 13 guests