Server: Error 500 and 503 "hooks not found"

Created on 30 Sep 2019  路  6Comments  路  Source: nextcloud/server

Hi there,
I get 500 and 503 since this morning

Steps to reproduce

  1. I dont know... to be honest...

Expected behaviour

No error should rise

Actual behaviour

If I try to access my Nextcloud, I get error 503. If I try to sync my contacts, calendars via webdac, I get error 500

Server configuration

Operating system: archlinux

Web server: apache 2.4.42

Database: mariadb

PHP version: 7.3.10

Nextcloud version: 16.0.5.1

Updated from an older Nextcloud/ownCloud or fresh install: updated

Where did you install Nextcloud from: zip, 3 years ago.. ;)

Signing status:


Signing status

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.


Interner Serverfehler

Der Server konnte die Anfrage nicht fertig stellen.

Sollte dies erneut auftreten, sende bitte die nachfolgenden technischen Einzelheiten an Deinen Server-Administrator.

Weitere Details k枚nnen im Server-Protokoll gefunden werden.
Technische Details

    Entfernte Adresse: 87.190.52.241
    Anfragekennung: RPZoCidTTv1c8mmVJ4HV


If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

sudo -u http php occ app:list
An unhandled exception has been thrown:
Error: Class 'OC\Accounts\Hooks' not found in /srv/http/www/nextcloud/lib/base.php:847
Stack trace:

0 /srv/http/www/nextcloud/lib/base.php(718): OC::registerAccountHooks()

1 /srv/http/www/nextcloud/lib/base.php(1056): OC::init()

2 /srv/http/www/nextcloud/console.php(46): require_once('/srv/http/www/n...')

3 /srv/http/www/nextcloud/occ(11): require_once('/srv/http/www/n...')

Nextcloud configuration:


Config report

<?php
$CONFIG = array (
  'instanceid' => 'oc07balonu3w',
  'passwordsalt' => 'blafasel',
  'secret' => 'u+F/b3MFOOBARxb/A/Qq+qV/z6rTIm+f+',
  'trusted_domains' =>
  array (
    0 => 'bla.spdns.org',
    1 => 'foo.spdns.org',
    2 => '192.168.0.4',
  ),
  'datadirectory' => '/srv/http/www/nextcloud/data',
  'overwrite.cli.url' => 'https://blablabla/nextcloud',
  'dbtype' => 'mysql',
  'version' => '16.0.5.1',
  'dbname' => 'nextcloud2',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_SECRET',
  'dbpassword' => 'SEEECREEET',
  'logtimezone' => 'UTC',
  'trashbin_retention_obligation' => 2,
  0 => 3,
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'app_install_overwrite' =>
  array (
    0 => 'calendar',
  ),
);

Are you using external storage, if yes which one: NO

Are you using encryption: yes, https

Are you using an external user-backend, if yes which one:
NO

Logs

Web server error log


Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)


Nextcloud log

87.190.52.242 - produnis [30/Sep/2019:10:29:58 +0200] "PROPFIND /nextcloud/remote.php/dav/files/produnis/ HTTP/1.1" 503 293
176.198.80.41 - produnis [30/Sep/2019:10:29:59 +0200] "PROPFIND /nextcloud/remote.php/dav/files/produnis/ HTTP/1.1" 503 293


Any help very welcome... ;)

0. Needs triage bug

All 6 comments

sorry, nextcloud log:

{"reqId":"QJI0aG20fpgf0hNZk57I","level":3,"time":"2019-09-30T10:34:48+00:00","remoteAddr":"87.190.52.242","user":"--","app":"PHP","method":"PROPFIND","url":"\/nextcloud\/remote.php\/dav\/files\/produnis\/","message":"include(): Failed opening '\/srv\/http\/www\/nextcloud\/lib\/composer\/composer\/..\/..\/..\/lib\/private\/Accounts\/Hooks.php' for inclusion (include_path='\/srv\/http\/www\/nextcloud\/3rdparty\/pear\/archive_tar:\/srv\/http\/www\/nextcloud\/3rdparty\/pear\/console_getopt:\/srv\/http\/www\/nextcloud\/3rdparty\/pear\/pear-core-minimal\/src:\/srv\/http\/www\/nextcloud\/3rdparty\/pear\/pear_exception:\/srv\/http\/www\/nextcloud\/apps') at \/srv\/http\/www\/nextcloud\/lib\/composer\/composer\/ClassLoader.php#444","userAgent":"Mozilla\/5.0 (Linux) mirall\/2.5.3git (Nextcloud)","version":"16.0.5.1"}
{"reqId":"QJI0aG20fpgf0hNZk57I","level":4,"time":"2019-09-30T10:34:48+00:00","remoteAddr":"87.190.52.242","user":"--","app":"webdav","method":"PROPFIND","url":"\/nextcloud\/remote.php\/dav\/files\/produnis\/","message":{"Exception":"Sabre\DAV\Exception\ServiceUnavailable","Message":"Error: Class 'OC\Accounts\Hooks' not found","Code":0,"Trace":[{"function":"{closure}","args":["* sensitive parameters replaced "]},{"file":"\/srv\/http\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[{"__class__":"Closure"},[" sensitive parameter replaced "," sensitive parameter replaced "]]},{"file":"\/srv\/http\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":466,"function":"emit","class":"Sabre\Event\EventEmitter","type":"->","args":["beforeMethod",[" sensitive parameter replaced "," sensitive parameter replaced "]]},{"file":"\/srv\/http\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\DAV\Server","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"\/srv\/http\/www\/nextcloud\/remote.php","line":72,"function":"exec","class":"Sabre\DAV\Server","type":"->","args":[]},{"file":"\/srv\/http\/www\/nextcloud\/remote.php","line":168,"function":"handleException","args":[{"__class__":"Error"}]}],"File":"\/srv\/http\/www\/nextcloud\/remote.php","Line":70,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Linux) mirall\/2.5.3git (Nextcloud)","version":"16.0.5.1"}
{"reqId":"eaQZEM02AX6e0VwR9CLC","level":3,"time":"2019-09-30T10:34:49+00:00","remoteAddr":"176.198.80.41","user":"--","app":"PHP","method":"PROPFIND","url":"\/nextcloud\/remote.php\/dav\/files\/produnis\/","message":"include(\/srv\/http\/www\/nextcloud\/lib\/composer\/composer\/..\/..\/..\/lib\/private\/Accounts\/Hooks.php): failed to open stream: Structure needs cleaning at \/srv\/http\/www\/nextcloud\/lib\/composer\/composer\/ClassLoader.php#444","userAgent":"Mozilla\/5.0 (Linux) mirall\/2.5.3git (Nextcloud)","version":"16.0.5.1"}
{"reqId":"eaQZEM02AX6e0VwR9CLC","level":3,"time":"2019-09-30T10:34:49+00:00","remoteAddr":"176.198.80.41","user":"--","app":"PHP","method":"PROPFIND","url":"\/nextcloud\/remote.php\/dav\/files\/produnis\/","message":"include(): Failed opening '\/srv\/http\/www\/nextcloud\/lib\/composer\/composer\/..\/..\/..\/lib\/private\/Accounts\/Hooks.php' for inclusion (include_path='\/srv\/http\/www\/nextcloud\/3rdparty\/pear\/archive_tar:\/srv\/http\/www\/nextcloud\/3rdparty\/pear\/console_getopt:\/srv\/http\/www\/nextcloud\/3rdparty\/pear\/pear-core-minimal\/src:\/srv\/http\/www\/nextcloud\/3rdparty\/pear\/pear_exception:\/srv\/http\/www\/nextcloud\/apps') at \/srv\/http\/www\/nextcloud\/lib\/composer\/composer\/ClassLoader.php#444","userAgent":"Mozilla\/5.0 (Linux) mirall\/2.5.3git (Nextcloud)","version":"16.0.5.1"}
{"reqId":"eaQZEM02AX6e0VwR9CLC","level":4,"time":"2019-09-30T10:34:49+00:00","remoteAddr":"176.198.80.41","user":"--","app":"webdav","method":"PROPFIND","url":"\/nextcloud\/remote.php\/dav\/files\/produnis\/","message":{"Exception":"Sabre\DAV\Exception\ServiceUnavailable","Message":"Error: Class 'OC\Accounts\Hooks' not found","Code":0,"Trace":[{"function":"{closure}","args":["
sensitive parameters replaced "]},{"file":"\/srv\/http\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[{"__class__":"Closure"},[" sensitive parameter replaced "," sensitive parameter replaced "]]},{"file":"\/srv\/http\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":466,"function":"emit","class":"Sabre\Event\EventEmitter","type":"->","args":["beforeMethod",[" sensitive parameter replaced "," sensitive parameter replaced "]]},{"file":"\/srv\/http\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\DAV\Server","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced *"]},{"file":"\/srv\/http\/www\/nextcloud\/remote.php","line":72,"function":"exec","class":"Sabre\DAV\Server","type":"->","args":[]},{"file":"\/srv\/http\/www\/nextcloud\/remote.php","line":168,"function":"handleException","args":[{"__class__":"Error"}]}],"File":"\/srv\/http\/www\/nextcloud\/remote.php","Line":70,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Linux) mirall\/2.5.3git (Nextcloud)","version":"16.0.5.1"}

apache log:

87.190.52.242 - produnis [30/Sep/2019:10:29:58 +0200] "PROPFIND /nextcloud/remote.php/dav/files/produnis/ HTTP/1.1" 503 293
176.198.80.41 - produnis [30/Sep/2019:10:29:59 +0200] "PROPFIND /nextcloud/remote.php/dav/files/produnis/ HTTP/1.1" 503 293

Does the file /srv/http/www/nextcloud/lib/composer/composer/../../../lib/private/Accounts/Hooks.php exist?

Hi kesselb,
no, the file does not exist.
the folder is just empty...
how could that be?

fsck threw several errors for the harddrive...

I moved the files from a fresh nextcloud.zip to my installation and now it works again.

How can I be sure that other files are not missing, too?

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 

I think this should print some warnings if files are missing or corrupted.

"no errors have been found"
thx kesselb!!!

Was this page helpful?
0 / 5 - 0 ratings