Nextcloud version : 23.0.12)
Operating system and version : Ubuntu 20.04.06 LTS
Apache or nginx version : NGINX 1.19.0
PHP version : 7.4
The issue you are facing:
Hopefully someone has seen this before. I am new to Nextcloud! So I have tried to include as much as possible.
Old 18.04 ubuntu server running nextcloud (postgresql and Nginx). No apache.
Plan is to upgrade ubuntu to 20.04.6 LTS, then to 22.04
I have run the upgrade a number of times which have failed. I thought I had the steps correct, but stuck on another error.
After lots of research, the upgrade plan became
Run do-release-upgrade to upgrade ubuntu.
Using the php-updater update php to 7.4 from 7.3
(wget -qO /usr/local/bin/php-updater https://global-social.net/script/php-updater)
Nginx would not start so reinstall nginx copying over the files in /etc/nginx (installing ngnix-core first then installing, nginx, nginx-common, nignx-full).
Postgresql is running fine.
All seemed to work and the webserver was available.
Nextcloud status all looked ok.
However the nextcloud webpage showed the Internal Server Error page and the nextcloud.error.log shows:
[error] 925#925: *1762 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Class ‘OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin’ not found in /var/www/nextcloud/remote.php:61
Stack trace:
#0 /var/www/nextcloud/remote.php(172): handleException(Object(RedisException))
#1 {main}
thrown in /var/www/nextcloud/remote.php on line 61” while reading response header from upstream, client: firewall IP, server: nextcloud.DomainName.com, request: “PROPFIND /remote.php/dav/files/User/ HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php7.3-fpm.sock:”, host: “nextcloud.DomainName.com”
A few related pages suggested to install php7.4-apcu and php7.4-memcached. But this did not resolve the error in the log.
I have tried switching back to php7.3 but the issue remained.
Nginx is running correctly, the log only shows this warning:
Servername nginx[915]: nginx: [warn] “ssl_stapling” ignored, issuer certificate not found for certificate “/etc/nginx/certs/cert.pem”
Therefore can anyone tell me what the error Uncaught Error: Class ‘OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin’ not found refers to?
The remote.php config is as below:
<?php /** * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Brice Maron * @author Christopher Schäpers * @author Christoph Wurst * @author Georg Ehrke * @author Joas Schilling * @author Jörn Friedrich Dreyer * @author Lukas Reschke * @author Morris Jobke * @author Robin Appelman * @author Robin McCorkell * @author Roeland Jago Douma * @author Thomas Müller * @author Vincent Petry * * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see * */ require_once __DIR__ . '/lib/versioncheck.php'; use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin; use Sabre\DAV\Exception\ServiceUnavailable; use Sabre\DAV\Server; /** * Class RemoteException * Dummy exception class to be use locally to identify certain conditions * Will not be logged to avoid DoS */ class RemoteException extends Exception { } /** * @param Exception|Error $e */ function handleException($e) { try { $request = \OC::$server->getRequest(); // in case the request content type is text/xml - we assume it's a WebDAV request $isXmlContentType = strpos($request->getHeader('Content-Type'), 'text/xml'); if ($isXmlContentType === 0) { // fire up a simple server to properly process the exception $server = new Server(); if (!($e instanceof RemoteException)) { // we shall not log on RemoteException $server->addPlugin(new ExceptionLoggerPlugin('webdav', \OC::$server->getLogger())); } $server->on('beforeMethod:*', function () use ($e) { if ($e instanceof RemoteException) { switch ($e->getCode()) { case 503: throw new ServiceUnavailable($e->getMessage()); case 404: throw new \Sabre\DAV\Exception\NotFound($e->getMessage()); } } $class = get_class($e); $msg = $e->getMessage(); throw new ServiceUnavailable("$class: $msg"); }); $server->exec(); } else { $statusCode = 500; if ($e instanceof \OC\ServiceUnavailableException) { $statusCode = 503; } if ($e instanceof RemoteException) { // we shall not log on RemoteException OC_Template::printErrorPage($e->getMessage(), '', $e->getCode()); } else { \OC::$server->getLogger()->logException($e, ['app' => 'remote']); OC_Template::printExceptionErrorPage($e, $statusCode); } } } catch (\Exception $e) { OC_Template::printExceptionErrorPage($e, 500); } } /** * @param $service * @return string */ function resolveService($service) { $services = [ 'webdav' => 'dav/appinfo/v1/webdav.php', 'dav' => 'dav/appinfo/v2/remote.php', 'caldav' => 'dav/appinfo/v1/caldav.php', 'calendar' => 'dav/appinfo/v1/caldav.php', 'carddav' => 'dav/appinfo/v1/carddav.php', 'contacts' => 'dav/appinfo/v1/carddav.php', 'files' => 'dav/appinfo/v1/webdav.php', 'direct' => 'dav/appinfo/v2/direct.php', ]; if (isset($services[$service])) { return $services[$service]; } return \OC::$server->getConfig()->getAppValue('core', 'remote_' . $service); } try { require_once __DIR__ . '/lib/base.php'; // All resources served via the DAV endpoint should have the strictest possible // policy. Exempted from this is the SabreDAV browser plugin which overwrites // this policy with a softer one if debug mode is enabled. header("Content-Security-Policy: default-src 'none';"); if (\OCP\Util::needUpgrade()) { // since the behavior of apps or remotes are unpredictable during // an upgrade, return a 503 directly throw new RemoteException('Service unavailable', 503); } $request = \OC::$server->getRequest(); $pathInfo = $request->getPathInfo(); if ($pathInfo === false || $pathInfo === '') { throw new RemoteException('Path not found', 404); } if (!$pos = strpos($pathInfo, '/', 1)) { $pos = strlen($pathInfo); } $service = substr($pathInfo, 1, $pos - 1); $file = resolveService($service); if (is_null($file)) { throw new RemoteException('Path not found', 404); } $file = ltrim($file, '/'); $parts = explode('/', $file, 2); $app = $parts[0]; // Load all required applications \OC::$REQUESTEDAPP = $app; OC_App::loadApps(['authentication']); OC_App::loadApps(['filesystem', 'logging']); switch ($app) { case 'core': $file = OC::$SERVERROOT .'/'. $file; break; default: if (!\OC::$server->getAppManager()->isInstalled($app)) { throw new RemoteException('App not installed: ' . $app); } OC_App::loadApp($app); $file = OC_App::getAppPath($app) .'/'. $parts[1]; break; } $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; require_once $file; } catch (Exception $ex) { handleException($ex); } catch (Error $e) { handleException($e); } And if you are still reading, can anyone tell me why the Nextcloud error log still shows: **fastcgi://unix:/run/php/php7.3-fpm.sock** even though i have updated PHP to 7.4. Is there another location where i need to update this. Is this the first time you've seen this error? _(Y/N)_: Y Steps to replicate it: 1. Completed the entire upgrade twice and seen the same issue The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!): ``` <?php $CONFIG = array ( 'passwordsalt' => 'x', 'secret' => 'x', 'trusted_domains' => array ( 0 => 'localhost', 1 => 'domainname1', 2 => 'domainame2', 3 => 'domainname3', 4 => 'domainname4', ), 'datadirectory' => '/mnt/shares', 'dbtype' => 'pgsql', 'version' => '23.0.12.2', 'overwrite.cli.url' => 'https://nextcloud.domainname.com', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => 'nextcloud', 'dbpassword' => 'password', 'installed' => true, 'instanceid' => 'oclvhotev5cu', 'memcache.local' => '\\OC\\Memcache\\APCu', 'redis' => array ( 'host' => '/var/run/redis/redis.sock', 'port' => '0', 'timeout' => '0.0', ), 'memcache.locking' => '\\OC\\Memcache\\Redis', 'filelocking.enabled' => 'true', 'enable_previews' => 'true', 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\PNG', 1 => 'OC\\Preview\\JPEG', 2 => 'OC\\Preview\\GIF', 3 => 'OC\\Preview\\BMP', 4 => 'OC\\Preview\\XBitmap', 5 => 'OC\\Preview\\Movie', 6 => 'OC\\Preview\\PDF', 7 => 'OC\\Preview\\MP3', 8 => 'OC\\Preview\\TXT', 9 => 'OC\\Preview\\MarkDown', ), 'preview_max_x' => '1024', 'preview_max_y' => '768', 'preview_max_scale_factor' => '1', 'auth.bruteforce.protection.enabled' => 'true', 'trashbin_retention_obligation' => 'auto,7', 'skeletondirectory' => '', 'defaultapp' => 'file', 'activity_expire_days' => '14', 'integrity.check.disabled' => 'false', 'updater.release.channel' => 'stable', 'ldapIgnoreNamingRules' => false, ``` The output of your Apache/nginx/system log in `/var/log/____`: ``` PASTE HERE ``` nginx: [warn] "ssl_stapling" ignored, issuer certificate not found for certificate "/etc/nginx/certs/cert.pem" nginx: [warn] "ssl_stapling" ignored, issuer certificate not found for certificate "/etc/nginx/certs/cert.pem" nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary. ``` [error] 925#925: *1762 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin' not found in /var/www/nextcloud/remote.php:61 Stack trace: #0 /var/www/nextcloud/remote.php(172): handleException(Object(RedisException)) #1 {main} thrown in /var/www/nextcloud/remote.php on line 61" while reading response header from upstream, client: FirewallIP, server: nextcloud.Domainname, request: "PROPFIND /remote.php/dav/files/User/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "nextcloud.DomainName" 2024/10/03 22:40:06 [error] 925#925: *1833 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin' not found in /var/www/nextcloud/remote.php:61 Stack trace: #0 /var/www/nextcloud/remote.php(172): handleException(Object(RedisException)) #1 {main} thrown in /var/www/nextcloud/remote.php on line 61" while reading response header from upstream, client: FirewallIP, server: nextcloud.DomainName, request: "PROPFIND /remote.php/dav/files/User/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "nextcloud.DomainName" ```