Cronjob: Unexpected error!

Ask all your questions regarding OC 5.x Please read the Support Forum Rules
Forum rules
ownCloud 5.x reached end of life and is officially unsupported. For details see Wiki page.

Please upgrade your ownCloud.
Spooky
Beginner
Posts: 46
Joined: Sun Sep 29, 2013 3:18 pm
ownCloud version: 8.2.2
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4.39
Location: Austria

Cronjob: Unexpected error!

Postby Spooky » Tue Oct 01, 2013 11:34 am

I am running ownCloud 5.0.11 on a Debian Root Server and tried to set up a new cronjob task for the cron.php of ownCloud. However, when I test the command via SSH on the server, i.e. by using

Code: Select all

php -f /var/www/owncloud/cron.php
(or php5), I simply get "Unexepcted error!".

Is there any way I can get it to give me more information about the error? I don't see anything in the Apache logs either.

nairda
Starter
Posts: 74
Joined: Mon Apr 22, 2013 1:44 pm

Re: Cronjob: Unexpected error!

Postby nairda » Tue Oct 01, 2013 11:57 am

Apache is not involved there, but sometimes, php is configured to write its errors into the apache log. However, this must not be the case for you.

You can try to call the cron.php-File from your Browser. See what you get there. If it works, as a workaround, you could call the cron.php-File in your cronjob via wget or curl.

//edit: just found this via search function: viewtopic.php?f=23&t=9339
(mostly) inactive, formerly running owncloud 5 - 5.0.12 on an Apache 2.2/PHP 5.3.3 using a PostgreSQL 8.4 on a Debian 6 (squeeze) server serving 11 users, currently running 8.* on strato webspace.

Spooky
Beginner
Posts: 46
Joined: Sun Sep 29, 2013 3:18 pm
ownCloud version: 8.2.2
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4.39
Location: Austria

Re: Cronjob: Unexpected error!

Postby Spooky » Tue Oct 01, 2013 12:03 pm

Right, well, if I set the Cron in the admin settings to Webcron, so that I can call https://domain/cron.php, I get the same error:

Code: Select all

{"data":{"message":"Unexpected error!"},"status":"error"}

And no entry in the error log of that domain.

Spooky
Beginner
Posts: 46
Joined: Sun Sep 29, 2013 3:18 pm
ownCloud version: 8.2.2
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4.39
Location: Austria

Re: Cronjob: Unexpected error!

Postby Spooky » Tue Oct 01, 2013 12:09 pm

nairda wrote://edit: just found this via search function: viewtopic.php?f=23&t=9339

That's not the same error though. In that case, a specific error was returned, i.e.

Code: Select all

{"app":"PHP","message":"Call to a member function getRoot() on a non-object at \/var\/www\/owncloud\/lib\/files\/filesystem.php#313","level":4,"time":1362496082}

And it was a problem in ownCloud's source, apparently (or rather a problem within a plugin), which was fixed in 5.0.3.

Whereas I only get

Code: Select all

{"data":{"message":"Unexpected error!"},"status":"error"}

Stonehenge
Newbie
Posts: 2
Joined: Sun Sep 22, 2013 10:35 pm
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.3

Re: Cronjob: Unexpected error!

Postby Stonehenge » Tue Oct 01, 2013 12:35 pm

I had that error, too, with 5.0.11.
First there were some "Zend Lucene"-Errors in the logs (after I disabled the full text search).
Then the cron.php wouldn't run as a cronjob.
So I manually deleted everything in these database tables:
oc_file_map
oc_filecache
oc_files_trash
oc_files_trashsize
oc_files_versions

No more problems since, cron runs fine.
(Note that I could easily delete everything because I had no important data stored yet, just testfiles. Don't know what happens if you delete everything in there in a production system.)

Spooky
Beginner
Posts: 46
Joined: Sun Sep 29, 2013 3:18 pm
ownCloud version: 8.2.2
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4.39
Location: Austria

Re: Cronjob: Unexpected error!

Postby Spooky » Tue Oct 01, 2013 1:50 pm

Stonehenge wrote:I had that error, too, with 5.0.11.
First there were some "Zend Lucene"-Errors in the logs (after I disabled the full text search).
Then the cron.php wouldn't run as a cronjob.
So I manually deleted everything in these database tables:
oc_file_map
oc_filecache
oc_files_trash
oc_files_trashsize
oc_files_versions

No more problems since, cron runs fine.
(Note that I could easily delete everything because I had no important data stored yet, just testfiles. Don't know what happens if you delete everything in there in a production system.)

Hm, well there are quite a lot of files now synced to the installation and these tables have a lot of information in them as well and I am expecting them to be crucial for the functionality of ownCloud.

There are a few zend lucene errors in the log, but I don't think they are that relevant.

Spooky
Beginner
Posts: 46
Joined: Sun Sep 29, 2013 3:18 pm
ownCloud version: 8.2.2
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4.39
Location: Austria

Re: Cronjob: Unexpected error!

Postby Spooky » Mon Oct 07, 2013 11:32 am

Any tips on how to debug the cron.php? I can't even make a var_dump(debug_backtrace()); within handleUnexpectedShutdown(), all it shows me is the call to handleUnexpectedShutdown().

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 laryllian » Tue Oct 08, 2013 1:10 pm

Yoho,
I have a somewhat similar problem. When I run the cron.php from the shell I only get "Unexepcted error!" nothing else. If run as cronjob, I only get:

PHP Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /var/www/virtual/user/owncloud.domain.com/lib/base.php on line 593
PHP Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /var/www/virtual/user/owncloud.domain.com/lib/base.php on line 631
PHP Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /var/www/virtual/user/owncloud.domain.com/lib/base.php on line 631

I also don't see any more detailed oc-error-reports anywhere, these are only php errors. I filed a bug report: https://github.com/owncloud/core/issues/5198#

Greetings

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Cronjob: Unexpected error!

Postby RealRancor » Tue Oct 08, 2013 1:23 pm

Hi,

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

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
*gone*

Spooky
Beginner
Posts: 46
Joined: Sun Sep 29, 2013 3:18 pm
ownCloud version: 8.2.2
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4.39
Location: Austria

Re: Cronjob: Unexpected error!

Postby Spooky » Tue Oct 08, 2013 5:16 pm

PHP version is 5.4.4 in my case (also when run from the CLI).


I "fixed" the problem by completely creating the ownCloud installation from scratch. So I have no idea what the actual problem could have been unfortunately. Though I didn't activate the File Encryption yet, may be it had something to do with that, but I'll run ownCloud for now without file encryption, to avoid further problems.


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Community Edition 5.x and older”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest