Nextcloud nicht mehr erreichbar nach apt autoremove php8.2

Hallo,

ich betreibe auf meiner Synology Diskstation eine Virtual Machine mit einem Server mit Ubuntu 22.04.4, auf dem eine Nextcloud 29.0.2.2 Instanz läuft. Bislang ohne Probleme.

Heute habe ich über die Konsole dummerweise mit “apt autoremove” verschiedene php8.2 Module deinstalliert, was zu einem “Internal Server Error” führte. Über das nextcloud.log konnte ich das fehlende php8.2-xml Modul identifizieren, nach dessen Re-Installation die Benutzeroberfläche wieder erschien und ich mich anmelden konnte.

In der Verwaltungsoberfläche wurden verschiedene Fehler u.a. weitere fehlende php Module angezeigt, die ich installierte: php8.2-bcmath php8.2-gmp php8.2-intl.

Zudem habe ich die OPCache Einstellungen wie vorher angepasst.

Leider kann ich nun die Nextcloud nicht mehr erreichen, es kommt die Meldung “Fehler: Verbindung fehlgeschlagen”, die Verbindung wird verweigert.

Diese php Module sind derzeit installiert:

ii  libapache2-mod-php                     2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          server-side, HTML-embedded scripting language (Apache 2 module) (default)
rc  libapache2-mod-php8.0                  1:8.0.30-1+ubuntu22.04.1+deb.sury.org+1      amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  libapache2-mod-php8.2                  8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  libapache2-mod-php8.3                  8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        server-side, HTML-embedded scripting language (Apache 2 module)
ii  php                                    2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          server-side, HTML-embedded scripting language (default)
ii  php-apcu                               5.1.23-1+ubuntu22.04.1+deb.sury.org+1        amd64        APC User Cache for PHP
rc  php-apcu-bc                            1.0.5-2build1                                amd64        APCu Backwards Compatibility Module
ii  php-bcmath                             2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          Bcmath module for PHP [default]
ii  php-bz2                                2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          bzip2 module for PHP [default]
ii  php-common                             2:94+ubuntu22.04.1+deb.sury.org+2            all          Common files for PHP packages
ii  php-curl                               2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          CURL module for PHP [default]
ii  php-dompdf                             0.6.2+dfsg-3.1ubuntu0.1                      all          HTML to PDF converter
ii  php-font-lib                           0.3.1+dfsg-3.1                               all          read, parse, export and make subsets of different fonts
ii  php-gd                                 2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          GD module for PHP [default]
ii  php-gmp                                2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          GMP module for PHP [default]
ii  php-imagick                            3.7.0-4+ubuntu22.04.1+deb.sury.org+2         amd64        Provides a wrapper to the ImageMagick library
ii  php-intl                               2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          Internationalisation module for PHP [default]
ii  php-mbstring                           2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          MBSTRING module for PHP [default]
ii  php-mysql                              2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          MySQL module for PHP [default]
ii  php-xml                                2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
ii  php-zip                                2:8.3+94+ubuntu22.04.1+deb.sury.org+2        all          Zip module for PHP [default]
ii  php8.2                                 8.2.20-2+ubuntu22.04.1+deb.sury.org+1        all          server-side, HTML-embedded scripting language (metapackage)
ii  php8.2-apcu                            5.1.23-1+ubuntu22.04.1+deb.sury.org+1        amd64        APC User Cache for PHP
ii  php8.2-bz2                             8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        bzip2 module for PHP
ii  php8.2-cli                             8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        command-line interpreter for the PHP scripting language
ii  php8.2-common                          8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        documentation, examples and common module for PHP
ii  php8.2-curl                            8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        CURL module for PHP
ii  php8.2-gd                              8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        GD module for PHP
rc  php8.2-imagick                         3.7.0-4+ubuntu22.04.1+deb.sury.org+2         amd64        Provides a wrapper to the ImageMagick library
ii  php8.2-mbstring                        8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        MBSTRING module for PHP
ii  php8.2-mysql                           8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        MySQL module for PHP
ii  php8.2-opcache                         8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        Zend OpCache module for PHP
ii  php8.2-phpdbg                          8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        server-side, HTML-embedded scripting language (PHPDBG binary)
ii  php8.2-readline                        8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        readline module for PHP
ii  php8.2-xml                             8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        DOM, SimpleXML, XML, and XSL module for PHP
ii  php8.2-zip                             8.2.20-2+ubuntu22.04.1+deb.sury.org+1        amd64        Zip module for PHP
ii  php8.3                                 8.3.8-2+ubuntu22.04.1+deb.sury.org+1         all          server-side, HTML-embedded scripting language (metapackage)
ii  php8.3-apcu                            5.1.23-1+ubuntu22.04.1+deb.sury.org+1        amd64        APC User Cache for PHP
ii  php8.3-bcmath                          8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        Bcmath module for PHP
ii  php8.3-bz2                             8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        bzip2 module for PHP
ii  php8.3-cli                             8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        command-line interpreter for the PHP scripting language
ii  php8.3-common                          8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        documentation, examples and common module for PHP
ii  php8.3-curl                            8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        CURL module for PHP
ii  php8.3-gd                              8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        GD module for PHP
ii  php8.3-gmp                             8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        GMP module for PHP
ii  php8.3-imagick                         3.7.0-4+ubuntu22.04.1+deb.sury.org+2         amd64        Provides a wrapper to the ImageMagick library
ii  php8.3-intl                            8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        Internationalisation module for PHP
ii  php8.3-mbstring                        8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        MBSTRING module for PHP
ii  php8.3-mysql                           8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        MySQL module for PHP
ii  php8.3-opcache                         8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        Zend OpCache module for PHP
ii  php8.3-phpdbg                          8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        server-side, HTML-embedded scripting language (PHPDBG binary)
ii  php8.3-readline                        8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        readline module for PHP
ii  php8.3-xml                             8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        DOM, SimpleXML, XML, and XSL module for PHP
ii  php8.3-zip                             8.3.8-2+ubuntu22.04.1+deb.sury.org+1         amd64        Zip module for PHP

Und das ist die congig.php:

<?php
$CONFIG = array (
  'instanceid' => 'oc62d8pumz1r',
  'passwordsalt' => '*',
  'secret' => '*',
  'trusted_domains' =>
  array (
    0 => 'URL',
  ),
  'datadirectory' => '/home/data/',
  'dbtype' => 'mysql',
  'version' => '29.0.2.2',
  'overwrite.cli.url' => 'URL',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextclouduser',
  'dbpassword' => '*',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'log_type' => 'file',
  'logfile' => '/var/www/nextcloud/data/nextcloud.log',
  'loglevel' => 3,
  'logdateformat' => 'F d, Y H:i:s',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_from_address' => '*',
  'mail_domain' => '*',
  'mail_smtphost' => '*',
  'mail_smtpport' => '465',
  'mail_smtpsecure' => 'ssl',
  'mail_smtpname' => '*',
  'mail_smtppassword' => '*',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'updater.release.channel' => 'stable',
  'default_phone_region' => 'DE',
  'maintenance_window_start' => '1',
);

Eine Umstellung von php8.2 auf php8.2 und umgekehrt brachte keine Verbesserung.

Ich weiß mir keinen Rat mehr. In der Nextcloud.log werden keine Fehler abgelegt und auch in der error.log des apache2 nicht.

Kann mir hier jemand weiterhelfen?

VG

die sind in deiner Auflistung

… jedoch nicht aufgelistet. Bitte einfach nachinstallieren mit

sudo apt-get install php8.2-{bcmath,gmp,intl}

du meintest wohl 8.2 auf 8.3 und zurück?


Kannst du mal das → php-updater ← Skript installieren

erst mal ohne Argumente laufen lassen:

php-updater

… und die Vorschläge zum aufräumen befolgen

und dann mit

php-updater --switch-version

die zu verwendete Version bestimmen.

Möglicherweise ist damit schon alles repariert.


Viel Glück,
ernolf

Das fällt noch auf:

Diese Pakete sind zum entfernen markiert (siehe man dpkg-query), also deine Liste stellt mitnichten die aktuell installierten Module dar.


ernolf

https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html

PHP Runtime
8.1 (deprecated)
8.2
8.3 (recommended)

Versuche es doch mal mit PHP 8.3 wie für Nextcloud 29 empfohlen.

Das ist falsch, denn PHP 8.3 wird erst ab Nextcloud 30 empfohlen.

Für Nextcloud 29 gilt noch immer diese Empfehlung:

8.0 (deprecated)
8.1
8.2 (recommended)
8.3

https://docs.nextcloud.com/server/29/admin_manual/installation/system_requirements.html

Hallo zusammen,
verstmal vielen Dank für die schnellen und hilfreichen Antworten!

Die Nextcloud ist wieder erreichbar. Ich hatte sukzessive die letzten Änderungen Änderungen, die unter “Verwaltungseinstellungen” empfohlen wurden, rückgängig gemacht. Nach Deaktivierung der OPCache Einstellungen in der config.php erschien wieder der Anmeldebildschirm und ich konnte mich anmelden.

Ich verstehe allerdings nicht, warum? Mit der Aktivierung der empfohlenen Einstellungen lief die Nextcloud vorhher einwandfrei. Nun leidet gefühlt die Performance mit der Deaktivierung, jedoch nehme ich das in erstmal in Kauf zugunsten der Erreichbarkeit.

Die Nextcloud lief vorher mit php8.3 ohne Probleme - von daher vesrtehe ich grundsätzlich nicht, warum die Deinstallation der php8.2 Module für so ein Chaos sorgte? Greift die Nextcloud trotzdem noch auf diese Pakete zu, obwohl php8.3 akiviert ist?

Ich werde mich morgen mal vorsichtig mit Euren obenstehenden Tips beschäftigen, in der Hoffnung die Performance wieder zu verbessern.

Nochmals vielen Dank für Eure Antworten!

*sorry
Da habe ich mich vertan.

Zumindest liegt die Vermutung nahe.
Als ich PHP von 7.4 auf 8.2 aktualisierte, kam es vor, dass einige PHP-Pakete von Hand nachinstalieren musste (PHP-Datenbankmodul).
Außerdem waren in config.php und in den /etc/apache2/sites-enabled einige Anpassungen erforderlich.
Dass a2dismod auf alte und a2enmod auf neue PHP-Module erforderlich waren, dürfte selbstredend sein.

Dann würde ich mal an Deiner Stelle alles, was mit OPCache zusammenhängt, genauer anschauen. Besonders die Syntax in der config.php sorgt gerne für unerwünschte Reaktionen (Anzahl und Plazierung der "", Komma am Ende der Zeile etc.).