Nextcloud kommt nicht online

Hallo zusammen,

seid gestern läuft meine Nextcloud nicht mehr nach einem Update, finde aber leider den Fehler überhaupt nicht und habe kein Idee, woran es liegen könnte.

Folgende Umgebung habe ich im Einsatz:

Kommando: lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

Kommando: php -v

PHP 8.1.2-1ubuntu2.9 (cli) (built: Oct 19 2022 14:58:09) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.9, Copyright (c), by Zend Technologies

Kommando: cat /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu jammy-security main restricted universe multiverse

Kommando: dpkg -l | grep php

ii  php-apcu                          5.1.21+4.0.11-7ubuntu1                      amd64        APC User Cache for PHP
ii  php-bcmath                        2:8.1+92ubuntu1                             all          Bcmath module for PHP [default]
ii  php-bz2                           2:8.1+92ubuntu1                             all          bzip2 module for PHP [default]
ii  php-common                        2:92ubuntu1                                 all          Common files for PHP packages
ii  php-curl                          2:8.1+92ubuntu1                             all          CURL module for PHP [default]
ii  php-fpm                           2:8.1+92ubuntu1                             all          server-side, HTML-embedded scripting language (FPM-CGI binary) (default)
ii  php-gd                            2:8.1+92ubuntu1                             all          GD module for PHP [default]
ii  php-gmp                           2:8.1+92ubuntu1                             all          GMP module for PHP [default]
ii  php-imagick                       3.6.0-4ubuntu1                              amd64        Provides a wrapper to the ImageMagick library
ii  php-intl                          2:8.1+92ubuntu1                             all          Internationalisation module for PHP [default]
ii  php-json                          2:8.1+92ubuntu1                             all          JSON module for PHP [default]
ii  php-mbstring                      2:8.1+92ubuntu1                             all          MBSTRING module for PHP [default]
ii  php-mysql                         2:8.1+92ubuntu1                             all          MySQL module for PHP [default]
ii  php-xml                           2:8.1+92ubuntu1                             all          DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
ii  php-zip                           2:8.1+92ubuntu1                             all          Zip module for PHP [default]
ii  php8.1                            8.1.2-1ubuntu2.9                            all          server-side, HTML-embedded scripting language (metapackage)
ii  php8.1-apcu                       5.1.21+4.0.11-7ubuntu1                      amd64        APC User Cache for PHP
ii  php8.1-bcmath                     8.1.2-1ubuntu2.9                            amd64        Bcmath module for PHP
ii  php8.1-bz2                        8.1.2-1ubuntu2.9                            amd64        bzip2 module for PHP
ii  php8.1-cli                        8.1.2-1ubuntu2.9                            amd64        command-line interpreter for the PHP scripting language
ii  php8.1-common                     8.1.2-1ubuntu2.9                            amd64        documentation, examples and common module for PHP
ii  php8.1-curl                       8.1.2-1ubuntu2.9                            amd64        CURL module for PHP
ii  php8.1-fpm                        8.1.2-1ubuntu2.9                            amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php8.1-gd                         8.1.2-1ubuntu2.9                            amd64        GD module for PHP
ii  php8.1-gmp                        8.1.2-1ubuntu2.9                            amd64        GMP module for PHP
ii  php8.1-imagick                    3.6.0-4ubuntu1                              amd64        Provides a wrapper to the ImageMagick library
ii  php8.1-intl                       8.1.2-1ubuntu2.9                            amd64        Internationalisation module for PHP
ii  php8.1-mbstring                   8.1.2-1ubuntu2.9                            amd64        MBSTRING module for PHP
ii  php8.1-mysql                      8.1.2-1ubuntu2.9                            amd64        MySQL module for PHP
ii  php8.1-opcache                    8.1.2-1ubuntu2.9                            amd64        Zend OpCache module for PHP
rc  php8.1-pgsql                      8.1.2-1ubuntu2.9                            amd64        PostgreSQL module for PHP
ii  php8.1-readline                   8.1.2-1ubuntu2.9                            amd64        readline module for PHP
ii  php8.1-xml                        8.1.2-1ubuntu2.9                            amd64        DOM, SimpleXML, XML, and XSL module for PHP
ii  php8.1-zip                        8.1.2-1ubuntu2.9                            amd64        Zip module for PHP

Kommando: netstat -plant | grep ‘80|443’

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1749/nginx: master
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      1749/nginx: master
tcp6       0      0 :::80                   :::*                    LISTEN      1749/nginx: master
tcp6       0      0 :::443                  :::*                    LISTEN      1749/nginx: master

Kommando: systemctl status php8.1-fpm

 php8.1-fpm.service - The PHP 8.1 FastCGI Process Manager
     Loaded: loaded (/lib/systemd/system/php8.1-fpm.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-01-21 18:29:29 CET; 2h 48min ago
       Docs: man:php-fpm8.1(8)
    Process: 1863 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/8.1/fpm/pool.d/www.conf 81 (code=exited, status=0/SUCCESS)
   Main PID: 1860 (php-fpm8.1)
     Status: "Processes active: 0, idle: 2, Requests: 88, slow: 0, Traffic: 0req/sec"
      Tasks: 3 (limit: 38268)
     Memory: 23.7M
        CPU: 865ms
     CGroup: /system.slice/php8.1-fpm.service
             |-1860 "php-fpm: master process (/etc/php/8.1/fpm/php-fpm.conf)" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
             |-1861 "php-fpm: pool www" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "">
             `-1862 "php-fpm: pool www" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "">

Jan 21 18:29:29 nextcloud systemd[1]: Starting The PHP 8.1 FastCGI Process Manager...
Jan 21 18:29:29 nextcloud systemd[1]: Started The PHP 8.1 FastCGI Process Manager.

Kommando: systemctl status nginx

* nginx.service - nginx - high performance web server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-01-21 18:12:34 CET; 3h 7min ago
       Docs: https://nginx.org/en/docs/
    Process: 1748 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
    Process: 1960 ExecReload=/bin/sh -c /bin/kill -s HUP $(/bin/cat /var/run/nginx.pid) (code=exited, status=0/SUCCESS)
   Main PID: 1749 (nginx)
      Tasks: 5 (limit: 38268)
     Memory: 6.0M
        CPU: 277ms
     CGroup: /system.slice/nginx.service
             |-1749 "nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf"
             |-1964 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
             |-1965 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
             |-1966 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
             `-1967 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""

Jan 21 18:12:34 nextcloud systemd[1]: Starting nginx - high performance web server...
Jan 21 18:12:34 nextcloud systemd[1]: Started nginx - high performance web server.

Kommando: cat /etc/php/8.1/fpm/pool.d/www.conf (hier nur Auszug:

; Note: This value is mandatory.
listen.owner = www-data
listen.group = www-data
;listen.mode = 0660

listen = /run/php/php8.1-fpm.sock

env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

  • Nextcloud ist in der Version 25.0.3 (meine ich)

  • Die error.logs von nginx, php-fpm oder nextcloud bringen keinerlei Fehler.

Was kann ich noch prüfen/ tun, damit ich die nextcloud wieder ans Laufen bekommen. Mein aktueller Verdacht: PHP Versionen oder Module. Warum?
Kommando: ls -l /run/php/

lrwxrwxrwx 1 root     root     30 Jan 21 21:28 php-fpm.sock -> /etc/alternatives/php-fpm.sock
-rw-r--r-- 1 root     root      4 Jan 21 21:28 php8.1-fpm.pid
srw-rw---- 1 www-data www-data  0 Jan 21 21:28 php8.1-fpm.sock

Hier verweist fpm.sock auf alternatives und ich weiß nicht, ob das richtig ist, denke aber es ist falsch…

Ideen sind herzlich willkomAmen.

NGINX läuft, dass kann ich über eine Test-Datei erkennen.

LG
SHe

Was genau bedeutet das? Was passiert, wenn du die Nextcloud url aufrufst?

Was wurde wie aktualisiert?

Wie sieht deine nginx Konfiguration aus?

Guten Morgen,

zugegeben, da war ich oberflächlich:

* Ubuntu auf 22.04.01 LTS (bereits am Mittwoch. Danach lief alles einwandfrei

* PHP von 7.4 auf 8.1 (ebenfalls am Mittwoch)

* Am Freitag wollte ich ein Modul nachinstallieren, aber es ging nicht. Recherchen haben ergeben, dass man eine weitere Quelle hinzufügen soll (add-apt-repository ppa:ondrej/php). Danach habe ich das Modul nachinstalliert. Seitdem habe ich dieses Fehlerbild

Hier der INhalt der nginx.conf:

user  www-data;
worker_processes  auto;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;
    # keine Versionsinformationen auf Fehlerseiten
    server_tokens off;

    include /etc/nginx/conf.d/*.conf;
}

Ich hoffe, das hilft euch und mir weiter.

Welches Fehlerbild? Wie genau äußert sich der Fehler?

nginx bindet in die Konfiguration nur Dateien aus dem Verzeichnis conf.d ein, die auf .conf enden.

Normalerweise liegen die Server-Konfigurationsdateien unter /etc/nginx/sites-available und werden per Symlink in /etc/nginx/sites-enabled aktiviert. In deiner nginx-Konfiguration ist dieses Verzeichnis jedoch gar nicht eingebunden. Kannst du mal schauen, ob dort Symlinks liegen?
Falls ja, kannst du vor der letzten schließenden Klammer von nginx.conf noch folgende Zeile hinzufügen:

include /etc/nginx/sites-enabled/*;

und nginx die konfiguration neu einlesen lassen mit:

nginx -s reload

Falls in sites-enabled keine symlinks existieren, musst du einen Symlink auf die betreffende Serverkonfiguration in sites-available erstellen. Falls in sites-available die entsprechende Server-Konfiguration gar nicht vorhanden ist, muss du sie zuerst nach der Dokumentation anlegen: https://docs.nextcloud.com/server/stable/admin_manual/installation/nginx.html

Nach einer Änderung der nginx-Konfiguration musst du mit

nginx -s reload

die geänderte Konfiguration einlesen lassen.

Hallo zusammen,

konnte leider nicht früher antworten…

Das Fehlerbild ist folgt:

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: <meine aktuelle public IP>
    Anfragekennung: mwaCjAR64zlUYxGoZelM

  • Der Nginx Server arbeitet. Das habe ich mit einer http- Konfiguration getestet.

  • Die DB arbeitet auch und ich kann mich mit meinem DB User anmelden.

Auszug aus dem php8.1-fpm.log:

[26-Jan-2023 20:39:25] NOTICE: fpm is running, pid 116
[26-Jan-2023 20:39:25] NOTICE: ready to handle connections
[26-Jan-2023 20:39:25] NOTICE: systemd monitor interval set to 10000ms

Alle anderen Logfiles sind leer bzw sagen aus, dass alles läuft.

Wie kann man das Debugging hoch setzen?

Anbei meine anonymisierte config.php

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'my public FQDN',
    2 => 'my local FQDN',
    3 => 'my local IP',
  ),
  'datadirectory' => '/var/nextcloud_data/data',
  'dbtype' => 'mysql',
  'version' => '25.0.3.2',
  'overwriteprotocol' => 'https',
  'overwrite.cli.url' => 'https://my public FQDN',
  'dbname' => 'db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'db_user',
  'dbpassword' => 'xxx',
  'installed' => true,
  'maintenance_window_start' => 1,
  'maintenance' => false,
  'default_language' => 'DE',
  'default_phone_region' => 'DE',
  'default_locale' => 'de',
  'theme' => '',
  'logtimezone' => 'Europe/Berlin',
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/error.log',
  'loglevel' => 4,
  'logdateformat' => 'F d, Y H:i:s',
  'filelocking.enabled' => 'true',
  'versions_retention_obligation' => 'auto, 365',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
    ),
  'updater.release.channel' => 'stable',
  'updater.secret' => 'xxx',
  'skeletondirectory' => '',
);

Langsam werden ich etwas nervös…

Hallo zusammen,

meine Cloud und meine Daten sind wieder online :slight_smile:

Ich habe folgende Zeile aus meiner Nextcloud Config.php auskommentiert:

  'memcache.locking' => '\\OC\\Memcache\\Redis',

Jetzt habe ich zwar aktuell im Admin Panel die Meldung, dass kein PHP Memory Cache konfiguriert ist, aber dann kann ich mich nun drum kümmern.

Wenn jemand sagen kann, warum das jetzt so ist…

  • fehlt ein Modul?
  • fehlt eine andere Konfiguration?

Danke an alle mitlesenden
SHe

Hallo,
sie läuft wieder :slight_smile:

Das habe ich in der NC Config angepasst. Warum auch immer passt das nicht mehr richtig.

  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),

Danke
SHe
PS: Wie schließe ich ein Ticket?