Error 503 "hooks not found"

Hi there,
I get an 503-Error since yesterdays system updates…

Nextcloud version (eg, 16.0.5): 16.0.5
Operating system and version (archlinux): archlinux
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.42
PHP version (eg, 7.1): 7.3.10

The issue you are facing:

I get an 503-Error when trying to access nextcloud via http(s) or webdav.
If I use shell for a command, I got exception "Class ‘OC\Accounts\Hooks’ not found "

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. don’t know

The output of your Nextcloud log in Admin > Logging:

{"reqId":"PaTEboinz6nhpHirwbT6","level":4,"time":"2019-09-30T08:13:04+00:00","remoteAddr":"176.1xy.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"}
{"reqId":"Ff5ShopeeGat3eD8j8RX","level":3,"time":"2019-09-30T08:13:04+00:00","remoteAddr":"176.xyz.80.41","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/status.php","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":"Ff5ShopeeGat3eD8j8RX","level":3,"time":"2019-09-30T08:13:04+00:00","remoteAddr":"176.xyz.80.41","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/status.php","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":"Ff5ShopeeGat3eD8j8RX","level":3,"time":"2019-09-30T08:13:04+00:00","remoteAddr":"176.xyz.80.41","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/status.php","message":"Error: Class 'OC\\Accounts\\Hooks' not found at \/srv\/http\/www\/nextcloud\/lib\/base.php#847","userAgent":"Mozilla\/5.0 (Linux) mirall\/2.5.3git (Nextcloud)","version":"16.0.5.1"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?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',
  ),
);

The output of your Apache/nginx/system log in /var/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 hints very welcome!!!

problem solved:
my directory “nextcloud/lib/private/Accounts” was just empty!!

fschek threw several errors for that device, I need to exchange it…

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

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