Nextcloud inaccessible, problème de "hook"

Mon serveur YunoHost

Matériel: serveur dédié chez OVH
Version de YunoHost: 11.2.20.2 (stable)
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modifications particulières sur votre instance ? : non

Description du problème

Bonjour Yunohost, merci pour tout le travail accompli, je trouve ça incroyable.

après une vague de mises à jour, je suis dans l’incapacité d’accéder à Nextcloud, à chaque fois que je m’y connecte (soit directement par l’url ou via le SSO, je reviens au SSO).
Et du coup j’aurais besoin d’un coup de main car je ne vois pas où chercher. Merci de votre aide.

Voici les messages d’erreurs que j’ai remarqué :

Dans la page d’admin, j’ai le message suivant (j’ai un peu mis en page pour plus de visibilité) :

An error prevents the configuration panel from being displayed:

Could not read return from hook /etc/yunohost/apps/nextcloud__2/scripts/config. 
Error: Corrupted YAML read from /tmp/tmpcj1nj73y/stdreturn (reason: mapping values are not allowed here<br> in "<unicode string>", line 9, column 66:<br> ... thrown: Doctrine\DBAL\Exception: Failed to connect to the datab ... <br> ^). 
Raw content: fpm_footprint:<br> high<br>fpm_free_footprint:<br> 0<br>fpm_usage: 'medium'<br>maintenance_mode:<br> <br>system_addressbook_exposed:<br> 
An unhandled exception has been thrown: Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/nextcloud__2/lib/private/DB/Connection.php:163 
Stack trace: 
#0 /var/www/nextcloud__2/3rdparty/doctrine/dbal/src/Connection.php(453): OC\DB\Connection->connect() 
#1 /var/www/nextcloud__2/3rdparty/doctrine/dbal/src/Connection.php(411): Doctrine\DBAL\Connection->getDatabasePlatformVersion() 
#2 /var/www/nextcloud__2/3rdparty/doctrine/dbal/src/Connection.php(318): Doctrine\DBAL\Connection->detectDatabasePlatform() 
#3 /var/www/nextcloud__2/lib/private/DB/ConnectionAdapter.php(200): Doctrine\DBAL\Connection->getDatabasePlatform() 
#4 /var/www/nextcloud__2/lib/private/DB/QueryBuilder/QueryBuilder.php(121): OC\DB\ConnectionAdapter->getDatabasePlatform() 
#5 /var/www/nextcloud__2/lib/private/AppConfig.php(1237): OC\DB\QueryBuilder\QueryBuilder->expr() 
#6 /var/www/nextcloud__2/lib/private/AppConfig.php(262): OC\AppConfig->loadConfig() 
#7 /var/www/nextcloud__2/lib/private/AppConfig.php(1378): OC\AppConfig->searchValues() 
#8 /var/www/nextcloud__2/lib/private/App/AppManager.php(131): OC\AppConfig->getValues() 
#9 /var/www/nextcloud__2/lib/private/App/AppManager.php(152): OC\App\AppManager->getInstalledAppsValues() 
#10 /var/www/nextcloud__2/lib/private/legacy/OC_App.php(234): OC\App\AppManager->getInstalledApps() 
#11 /var/www/nextcloud__2/lib/private/AppFramework/Bootstrap/Coordinator.php(90): OC_App::getEnabledApps() 
#12 /var/www/nextcloud__2/lib/base.php(706): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration() 
#13 /var/www/nextcloud__2/lib/base.php(1181): OC::init() 
#14 /var/www/nextcloud__2/console.php(48): require_once('...') 
#15 /var/www/nextcloud__2/occ(11): require_once('...') 
#16 {main}<br>

Please report this error to the YunoHost team to get it fixed!

Lors des mises à jour, j’avais eu un problème avec Nextcloud,

args:
  apps:
  - nextcloud__2
  name: nextcloud__2-pre-upgrade1
  system: null
ended_at: 2024-07-02 10:51:15.858162
error: Nothing to save
interface: cli
operation: backup_create
parent: null
related_to:
- - app
  - nextcloud__2
started_at: 2024-07-02 10:51:11.024529
success: false
yunohost_version: 11.2.20.1

============

2024-07-02 10:51:11,191: INFO - Collecting files to be backed up for nextcloud__2…
...
2024-07-02 10:51:14,325: WARNING - Source path '/etc/php/8.2/fpm/pool.d/nextcloud__2.conf' does not exist
...
2024-07-02 10:51:15,849: ERROR - Could not back up nextcloud__2

je m’en suis sorti en recréant le fichier manquant et j’ai pu faire la mise à jour. De mémoire, Nexcloud fonctionnait.
Puis j’ai supprimé une de mes applications PrettyNoemieCMS, sans problème.
Puis j’ai mis à jour Yunohost, sans problème. Je signale quand même cette erreur :

Fetching available upgrades for system packages…
W: Failed to fetch https://last-public-ovh-rtm.snap.mirrors.ovh.net/debian/dists/stretch/InRelease 500 Internal Server Error [IP: 213.32.5.7 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.
Something went wrong while updating the cache of APT (Debian's package manager). Here is a dump of the sources.list lines, which might help identify problematic lines:
sources.list:deb http://debian.mirrors.ovh.net/debian bullseye main
sources.list:deb-src http://debian.mirrors.ovh.net/debian bullseye main
sources.list:deb http://security.debian.org/debian-security bullseye-security main
sources.list:deb-src http://security.debian.org/debian-security bullseye-security main
sources.list:deb http://debian.mirrors.ovh.net/debian bullseye-updates main
sources.list:deb-src http://debian.mirrors.ovh.net/debian bullseye-updates main
sources.list.d/ovh-metrics.list:deb https://last-public-ovh-metrics.snap.mirrors.ovh.net/debian/ stretch main
sources.list.d/ovhkernel.list:deb https://last-public-ovh-kernel.snap.mirrors.ovh.net/debian/ ovhkernel main
sources.list.d/ovh-rtm.list:deb https://last-public-ovh-rtm.snap.mirrors.ovh.net/debian/ stretch main
sources.list.d/yunohost.list:deb http://forge.yunohost.org/debian/ bullseye stable
sources.list.d/extra_php_version.list:deb https://packages.sury.org/php/ bullseye main

Bon, j’ai un peu avancé dans mon problème, je crois :
En fait la mise à jour de Nextcloud ne s’est peut-être pas si bien faite que cela, malgrès ce que dit le log.
Le message d’erreur au niveau de l’admin Yunohost dit bien que nextcloud ne peut se connecter à la BD.
La BD semble fonctionner :

sudo systemctl status mysql.service
● mariadb.service - MariaDB 10.5.23 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2024-02-12 06:41:06 UTC; 4 months 24 days ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 1365612 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 8 (limit: 4635)
     Memory: 412.7M
        CPU: 1d 5h 6min 59.294s
     CGroup: /system.slice/mariadb.service
             └─1365612 /usr/sbin/mariadbd

donc le driver semble manquer; comme suggéré dans un post du forum je veux vérifier, mais pour quelle version php ? il y en a 4 installées et seules 7.4 et 8.0 semblent actives (?). C’est aussi ce que je vois dans l’interface d’admin de yunohost, parmis les services actifs.

ps -ef | grep php
root     3581382       1  0 Jul05 ?        00:00:19 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
grav     3581390 3581382  0 Jul05 ?        00:00:03 php-fpm: pool grav
grav     3581391 3581382  0 Jul05 ?        00:00:02 php-fpm: pool grav
grav     3581392 3581382  0 Jul05 ?        00:00:02 php-fpm: pool grav
grav     3581393 3581382  0 Jul05 ?        00:00:01 php-fpm: pool grav
grav     3581394 3581382  0 Jul05 ?        00:00:01 php-fpm: pool grav
www-data 3581395 3581382  0 Jul05 ?        00:00:00 php-fpm: pool www
www-data 3581397 3581382  0 Jul05 ?        00:00:00 php-fpm: pool www
root     3581417       1  0 Jul05 ?        00:00:21 php-fpm: master process (/etc/php/8.0/fpm/php-fpm.conf)
www-data 3581422 3581417  0 Jul05 ?        00:00:00 php-fpm: pool www
www-data 3581423 3581417  0 Jul05 ?        00:00:00 php-fpm: pool www
root     3662262 3657184  0 13:51 pts/0    00:00:00 grep php

Cependant quand j’interroge nextcloud, il me dut qu’il utilise la version 8.3 de php.

sudo yunohost app setting nextcloud__2 phpversion
8.3

suis-je sur la bonne voie ? faut-il simplement démarrer le service php 8.3, et comment ?
merci de votre avis éclairé

Pour démarrer un service, tu peux le faire par l’interface web d’administration à partir du menu Outils/Services ou en ligne de commande avec yunohost service start php8.3-fpm

Par contre je ne sais pas si tu es sur la bonne voie.
Une autre chose que je trouve étonnant, nextcloud tourne sur la version 8.2 de php pour moi, or ici ça te retourne 8.3, serais-tu sur la version testing?

bonsoir, merci de cette réponse

  • j’ai essayé de démarrer un service php8.3, mais ce n’est pas si simple
sudo yunohost service start php8.3-fpm
Error: Unknown service 'php8.3-fpm'
  • non, je ne suis pas sur la version testing (pour autant que je sache), j’ai simplement fait la mise à jour normale

Que te donne cette commande?
lsof | grep /var/run/php | awk '{print $9}' | sort -u | cut -d'/' -f5 | awk -F'-' '{print $1,$3}' | cut -d'.' -f1,2 | grep nextcloud

Et concernant ton erreur, as-tu les modules php nécessaires d’installés?

dpkg -l | grep php.*sql

voici le résultat, je comprends qu’il n’y a pas de driver BD dans la bonne version :

root@laborderie:/home/fred# lsof | grep /var/run/php | awk '{print $9}' | sort -u | cut -d'/' -f5 | awk -F'-' '{print $1,$3}' | cut -d'.' -f1,2 | grep nextcloud
root@laborderie:/home/fred# dpkg -l | grep php.*sql
ii  php7.4-mysql                          1:7.4.33-13+0~20240606.93+debian11~1.gbp3bbf86     amd64        MySQL module for PHP
ii  php8.0-mysql                          1:8.0.30-7+0~20240606.65+debian11~1.gbpe57fd4      amd64        MySQL module for PHP
root@laborderie:/home/fred#

faudrait-il juste installer ces librairies ?

Il y a un soucis avec les dépendances des paquets on dirait…

Bizarre d’avoir 2 dépôt de debian stretch ?? À mon avis il faut commencer par régler ce soucis… Tu peux commenter ces 3 dépôts, ils doivent causer des problèmes

/etc/apt/sources.list.d/ovh-metrics.list
/etc/apt/sources.list.d/ovhkernel.list
/etc/apt/sources.list.d/ovh-rtm.list

et tenter un

yunohost tools update && yunohost tools upgrade system

pour voir déjà si il y a une erreur de apt ?

Bonsoir,
j’ai fait la manip demandée, et une mise à jour a été faite

root@laborderie:/etc/apt/sources.list.d# yunohost tools update && yunohost tools upgrade system
Info: Fetching available upgrades for system packages…
Info: Updating application catalog…
Success! The application catalog has been updated!
apps: 
  current_version: 0.6.2~ynh2
  description: Fast and modern VPN server, including a configuration webapp
  domain_path: vpn.laborderie.site/
  id: wireguard
  logo: 5ca86c97ae3711e29496733dc69e795f4d0fbe4b9b343ff740926a5cbaff1909
  name: WireGuard_VPN
  new_version: 0.6.2~ynh3
  notifications: 
  upgradable: yes
  version: 0.6.2~ynh2
important_yunohost_upgrade: False
pending_migrations: 
system: 
  0: 
    current_version: 8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc
    name: php8.3-cli
    new_version: 8.3.9-1+0~20240708.36+debian11~1.gbp429c36
  1: 
    current_version: 8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc
    name: php8.3-common
    new_version: 8.3.9-1+0~20240708.36+debian11~1.gbp429c36
  2: 
    current_version: 8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc
    name: php8.3-gd
    new_version: 8.3.9-1+0~20240708.36+debian11~1.gbp429c36
  3: 
    current_version: 8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc
    name: php8.3-mbstring
    new_version: 8.3.9-1+0~20240708.36+debian11~1.gbp429c36
  4: 
    current_version: 8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc
    name: php8.3-opcache
    new_version: 8.3.9-1+0~20240708.36+debian11~1.gbp429c36
  5: 
    current_version: 8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc
    name: php8.3-readline
    new_version: 8.3.9-1+0~20240708.36+debian11~1.gbp429c36
  6: 
    current_version: 8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc
    name: php8.3-xml
    new_version: 8.3.9-1+0~20240708.36+debian11~1.gbp429c36
Info: Upgrading packages…
Info: Upgrading system packages
Info: + Reading package lists...
Info: + Building dependency tree...
Info: + Reading state information...
Info: + Calculating upgrade...
Info: + The following packages will be upgraded:
Info: +   php8.3-cli php8.3-common php8.3-gd php8.3-mbstring php8.3-opcache
Info: +   php8.3-readline php8.3-xml
Warning: N: Ignoring file 'ovhkernel.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-rtm.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-metrics.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Info: + 7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Info: + Need to get 0 B/3,397 kB of archives.
Info: + After this operation, 1,024 B of additional disk space will be used.
Info: + Unpacking php8.3-xml (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) over (8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc) ...
Info: + Unpacking php8.3-readline (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) over (8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc) ...
Info: + Unpacking php8.3-opcache (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) over (8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc) ...
Info: + Unpacking php8.3-mbstring (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) over (8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc) ...
Info: + Unpacking php8.3-gd (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) over (8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc) ...
Info: + Unpacking php8.3-cli (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) over (8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc) ...
Info: + Unpacking php8.3-common (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) over (8.3.8-2+0~20240608.35+debian11~1.gbp4d7dbc) ...
Info: + Setting up php8.3-common (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) ...
Info: + Setting up php8.3-mbstring (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) ...
Info: + Setting up php8.3-readline (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) ...
Info: + Setting up php8.3-xml (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) ...
Info: + Setting up php8.3-opcache (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) ...
Info: + Setting up php8.3-gd (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) ...
Info: + Setting up php8.3-cli (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) ...
Info: + Processing triggers for man-db (2.9.4-2) ...
Info: + Processing triggers for php8.3-cli (8.3.9-1+0~20240708.36+debian11~1.gbp429c36) ...
Success! System upgraded

mais par contre, nextcloud ne marche toujours pas. Je n’ai pas l’impression que les modules php nécessaires soient installés ?

Essai avec
sudo yunohost app shell nextcloud
Puis
php version

Commence par vérifier avec la commande donnée ci-dessus par @jarod5001
Pour y voir plus clair, si tu pouvais aussi donner les résultats des commandes :

ls /etc/php/*/fpm/pool.d
cat /etc/php/*/fpm/pool.d/nextcloud.conf

Voici pour info les paquets php pour les versions 8.2 et 8.3 d’installés sur mon serveur. Cependant la version 8.3 n’est pas utilisée par nextcloud mais par une autre application. Je pense qu’il y a un problème à ce niveau, d’autant plus que la commande lsof ne te retourne rien.

tr -d "\n" <<<$(dpkg -l | grep ii | grep php- | awk '{print $2 " " }')

php-common php-mbstring php-pear php-php-gettext php-xml

tr -d "\n" <<<$(dpkg -l | grep ii | grep php8.2 | awk '{print $2 " " }')

php8.2 php8.2-apcu php8.2-bcmath php8.2-bz2 php8.2-cli php8.2-common php8.2-curl php8.2-fpm php8.2-gd php8.2-gmp php8.2-igbinary php8.2-imagick php8.2-imap php8.2-intl php8.2-ldap php8.2-mbstring php8.2-mysql php8.2-opcache php8.2-readline php8.2-redis php8.2-xml php8.2-zip

tr -d "\n" <<<$(dpkg -l | grep ii | grep php8.3 | awk '{print $2 " " }')

php8.3 php8.3-cli php8.3-common php8.3-curl php8.3-fpm php8.3-gd php8.3-intl php8.3-ldap php8.3-mbstring php8.3-mysql php8.3-opcache php8.3-readline php8.3-sqlite3 php8.3-tidy php8.3-xml

merci de votre aide, tout seul je n’y serais jamais arrivé.
Voici le résultat des commandes suggérées :

root@laborderie:/home/fred# sudo yunohost app shell nextcloud__2
+ echo '! Helper used in legacy mode !'
+ set +x
+ [[ ! /bin/bash =~ /?bash$ ]]
++ yunohost app list --output-as json --quiet
++ jq -r '.apps[].id'
+ installed_apps_list=('grav' 'my_webapp' 'nextcloud__2' 'piwigo' 'prettynoemiecms' 'prettynoemiecms__2' 'redirect' 'redirect__2' 'redirect__3' 'redirect__4' 'wireguard')
+ local installed_apps_list
+ [[  grav my_webapp nextcloud__2 piwigo prettynoemiecms prettynoemiecms__2 redirect redirect__2 redirect__3 redirect__4 wireguard  != *\ \n\e\x\t\c\l\o\u\d\_\_\2\ * ]]
+ id -u nextcloud__2
++ ynh_app_setting_get --app=nextcloud__2 --key=install_dir
++ local _globalapp=nextcloud__2
++ local legacy_args=ak
++ args_array=(['a']='app=' ['k']='key=')
++ local -A args_array
++ local app
++ local key
++ ynh_handle_getopts_args --app=nextcloud__2 --key=install_dir
++ set +o xtrace
++ app=nextcloud__2
++ [[ install_dir =~ (unprotected|protected|skipped)_ ]]
++ ynh_app_setting get nextcloud__2 install_dir
++ set +o xtrace
+ local install_dir=/var/www/nextcloud__2
+ '[' -z /var/www/nextcloud__2 ']'
++ ynh_app_setting_get --app=nextcloud__2 --key=service
++ local _globalapp=nextcloud__2
++ local legacy_args=ak
++ args_array=(['a']='app=' ['k']='key=')
++ local -A args_array
++ local app
++ local key
++ ynh_handle_getopts_args --app=nextcloud__2 --key=service
++ set +o xtrace
++ app=nextcloud__2
++ [[ service =~ (unprotected|protected|skipped)_ ]]
++ ynh_app_setting get nextcloud__2 service
++ set +o xtrace
+ local service=
+ '[' -z '' ']'
+ service=nextcloud__2
+ export HOME=/var/www/nextcloud__2
+ HOME=/var/www/nextcloud__2
++ systemctl show nextcloud__2.service -p Environment --value
+ local env_var=
+ '[' -n '' ']'
++ ynh_app_setting_get --app=nextcloud__2 --key=phpversion
++ local _globalapp=nextcloud__2
++ local legacy_args=ak
++ args_array=(['a']='app=' ['k']='key=')
++ local -A args_array
++ local app
++ local key
++ ynh_handle_getopts_args --app=nextcloud__2 --key=phpversion
++ set +o xtrace
++ app=nextcloud__2
++ [[ phpversion =~ (unprotected|protected|skipped)_ ]]
++ ynh_app_setting get nextcloud__2 phpversion
++ set +o xtrace
+ local phpversion=8.3
++ ynh_app_setting_get --app=nextcloud__2 --key=phpflags
++ local _globalapp=nextcloud__2
++ local legacy_args=ak
++ args_array=(['a']='app=' ['k']='key=')
++ local -A args_array
++ local app
++ local key
++ ynh_handle_getopts_args --app=nextcloud__2 --key=phpflags
++ set +o xtrace
++ app=nextcloud__2
++ [[ phpflags =~ (unprotected|protected|skipped)_ ]]
++ ynh_app_setting get nextcloud__2 phpflags
++ set +o xtrace
+ local 'phpflags=--define apc.enable_cli=1'
+ '[' -n 8.3 ']'
+ eval 'php() { php8.3 --define apc.enable_cli=1 "$@"; }'
+ export -f php
++ systemctl show nextcloud__2.service -p EnvironmentFiles --value
+ env_files=()
+ local env_files
+ '[' 0 -gt 0 ']'
+ '[' -f /var/www/nextcloud__2/venv/bin/activate ']'
++ systemctl show nextcloud__2.service -p WorkingDirectory --value
+ local env_dir=
+ '[' -z ']'
+ env_dir=/var/www/nextcloud__2
+ cd /var/www/nextcloud__2
+ su -s /bin/bash nextcloud__2

php version ne marche pas mais :

root@laborderie:/home/fred# php -v
PHP 7.4.33 (cli) (built: Jun  6 2024 16:44:50) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

voici les autres commandes

root@laborderie:/home/fred# ls /etc/php/*/fpm/pool.d
/etc/php/7.3/fpm/pool.d:
grav.conf	nextcloud__2.conf  prettynoemiecms__2.conf
my_webapp.conf	piwigo.conf	   prettynoemiecms.conf

/etc/php/7.4/fpm/pool.d:
grav.conf  prettynoemiecms__2.conf  prettynoemiecms.conf  www.conf

/etc/php/8.0/fpm/pool.d:
my_webapp.conf	piwigo.conf  www.conf

/etc/php/8.3/fpm/pool.d:
nextcloud__2.conf

root@laborderie:/home/fred# cat /etc/php/*/fpm/pool.d/nextcloud__2.conf

[nextcloud__2]

user = nextcloud__2
group = nextcloud__2

chdir = /var/www/nextcloud__2

listen = /var/run/php/php7.3-fpm-nextcloud__2.sock
listen.owner = www-data
listen.group = www-data

pm = dynamic
pm.max_children = 16
pm.max_requests = 500
request_terminate_timeout = 1d


pm.start_servers = 6
pm.min_spare_servers = 5
pm.max_spare_servers = 8


; Additional php.ini defines, specific to this pool of workers.
env[PATH] = $PATH
php_admin_value[memory_limit] = 512M
php_value[upload_max_filesize] = 10G
php_value[post_max_size] = 10G
php_value[default_charset] = UTF-8
; OPcache is already activated by default
; php_value[opcache.enable]=1
; The following parameters are nevertheless recommended for Nextcloud
; see here: https://docs.nextcloud.com/server/15/admin_manual/installation/server_tuning.html#enable-php-opcache
php_value[opcache.enable_cli]=1
php_value[opcache.interned_strings_buffer]=8
php_value[opcache.max_accelerated_files]=10000
php_value[opcache.memory_consumption]=128
php_value[opcache.save_comments]=1
php_value[opcache.revalidate_freq]=1
; https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html#id1
php_value[apc.enabled]=1
php_value[apc.enable_cli]=1

[nextcloud__2]

user = nextcloud__2
group = nextcloud__2

chdir = /var/www/nextcloud__2

listen = /var/run/php/php8.3-fpm-nextcloud__2.sock
listen.owner = www-data
listen.group = www-data

pm = dynamic
pm.max_children = 16
pm.max_requests = 500
request_terminate_timeout = 1d


pm.start_servers = 6
pm.min_spare_servers = 5
pm.max_spare_servers = 8


; Additional php.ini defines, specific to this pool of workers.
env[PATH] = $PATH
php_admin_value[memory_limit] = 512M
php_value[upload_max_filesize] = 10G
php_value[post_max_size] = 10G
php_value[default_charset] = UTF-8
; OPcache is already activated by default
; php_value[opcache.enable]=1
; The following parameters are nevertheless recommended for Nextcloud
; see here: https://docs.nextcloud.com/server/20/admin_manual/installation/server_tuning.html#enable-php-opcache
php_value[opcache.enable_cli]=1
php_value[opcache.interned_strings_buffer]=32
php_value[opcache.max_accelerated_files]=10000
php_value[opcache.memory_consumption]=128
php_value[opcache.save_comments]=1
php_value[opcache.revalidate_freq]=60
; https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html#id1
php_value[apc.enabled]=1
php_value[apc.enable_cli]=1

et pour finir

root@laborderie:/home/fred# tr -d "\n" <<<$(dpkg -l | grep ii | grep php- | awk '{print $2 " " }')
php-common php-mbstring php-pear php-php-gettext php-xml root@laborderie:/home/fred# tr -d "\n" <<<$(dpkg -l | grep ii | grep php8.2 | tr -d "\n" <<<$(dpkg -l | grep ii | grep php8.2 | awk '{print $2 " " }')
php8.2-cli php8.2-common php8.2-gd php8.2-mbstring php8.2-opcache php8.2-readline php8.2-xml 
root@laborderie:/home/fred# tr -d "\n" <<<$(dpkg -l | grep ii | grep php8.3 | awk '{print $2 " " }')
php8.3-cli php8.3-common php8.3-gd php8.3-mbstring php8.3-opcache php8.3-readline php8.3-xml

clairement on a pas la même chose.

Pas facile…
De mon côté j’avais 2 serveurs qui ont fait la mise à jour en restant avec php 8.2. Sur l’un de ses 2 serveurs j’ai essayé la version testing 29.0.3 qui a résolu le soucis, pas contre je ne conseille pas, il y a un peu de bugs sur cette version…

Merci pour ta réponse, ce doit être lié à la manière dont Yunohost met à jour l’application, je n’ai pas regardé comment ça se fait mais le site de Nextcloud indique bien que php8.2 et php8.3 sont supportés. En tout cas ça répond à mon interrogation.

Désolé pour le typo. En je voulais ce que donne php -v dans le shell de nextcloud, donc juste après sudo yunohost app shell nextcloud

Effectivement, c’est bien incomplet pour que ça fonctionne.
Commence par mettre à jour avec :

yunohost tools update
yunohost tools upgrade system
yunohost app upgrade -F nextcloud

puis vérifier si nextcloud fonctionne. Vérifier que les paquets manquants php8.3 sont désormais installés avec la commande donnée précédemment (tr -d “\n”…php8.3…)
Si il y a toujours des paquets manquants, les installer manuellement. Voici la liste selon la page github:

mariadb-server, imagemagick, libmagickcore-6.q16-6-extra, acl, tar, smbclient, at, php8.3-fpm, php8.3-bz2, php8.3-imap, php8.3-gmp, php8.3-gd, php8.3-intl, php8.3-curl, php8.3-apcu, php8.3-redis, php8.3-ldap, php8.3-imagick, php8.3-zip, php8.3-mbstring, php8.3-xml, php8.3-mysql, php8.3-igbinary, php8.3-bcmath

pas de problème, j’ai réussi à m’en sortir

Et donc? Ça fonctionne maintenant, c’est ça? Quelle solution a fonctionné, le fait de forcer l’upgrade de l’app ou tu as été obligé d’installer manuellement les paquets manquants?
Pour la version de php, j’ai regardé le script “upgrade” , il fait bien référence à la version php8.2. La version testing fait référence a php8.3.

bon alors j’ai fait les manips suggérées, la mise à jour a eu un problème mais ça marche. Voici ce que dit la console :

root@laborderie:/home/fred# yunohost tools update
Info: Fetching available upgrades for system packages…
Info: Updating application catalog…
Success! The application catalog has been updated!
apps: 
  current_version: 0.6.2~ynh2
  description: Fast and modern VPN server, including a configuration webapp
  domain_path: vpn.laborderie.site/
  id: wireguard
  logo: 5ca86c97ae3711e29496733dc69e795f4d0fbe4b9b343ff740926a5cbaff1909
  name: WireGuard_VPN
  new_version: 0.6.2~ynh3
  notifications: 
  upgradable: yes
  version: 0.6.2~ynh2
important_yunohost_upgrade: False
pending_migrations: 
system: 
  current_version: 2.3.3-9+0~20230207.13+debian11~1.gbp649015
  name: libgd3
  new_version: 2.3.3-12+0~20240711.16+debian11~1.gbpd0ea70
root@laborderie:/home/fred# yunohost tools upgrade system
Info: Upgrading packages…
Info: Upgrading system packages
Info: + Reading package lists...
Info: + Building dependency tree...
Info: + Reading state information...
Info: + Calculating upgrade...
Info: + The following NEW packages will be installed:
Info: +   libimagequant0 libraqm0
Info: + The following packages will be upgraded:
Info: +   libgd3
Info: + 1 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Info: + Need to get 141 kB/184 kB of archives.
Info: + After this operation, 118 kB of additional disk space will be used.
Info: + Get:1 https://packages.sury.org/php bullseye/main amd64 libgd3 amd64 2.3.3-12+0~20240711.16+debian11~1.gbpd0ea70 [141 kB]
Warning: N: Ignoring file 'ovhkernel.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-rtm.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-metrics.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Info: + Fetched 141 kB in 0s (646 kB/s)
Info: + Unpacking libimagequant0:amd64 (2.12.2-1.1) ...
Info: + Setting up libimagequant0:amd64 (2.12.2-1.1) ...
Info: + Unpacking libraqm0:amd64 (0.7.0-4) ...
Info: + Setting up libraqm0:amd64 (0.7.0-4) ...
Info: + Unpacking libgd3:amd64 (2.3.3-12+0~20240711.16+debian11~1.gbpd0ea70) over (2.3.3-9+0~20230207.13+debian11~1.gbp649015) ...
Info: + Setting up libgd3:amd64 (2.3.3-12+0~20240711.16+debian11~1.gbpd0ea70) ...
Info: + Processing triggers for libc-bin (2.31-13+deb11u10) ...
Success! System upgraded
root@laborderie:/home/fred# yunohost app upgrade -F nextcloud
Error: Could not find nextcloud in the list of installed apps: 
 * grav
 * my_webapp
 * nextcloud__2
 * piwigo
 * prettynoemiecms
 * prettynoemiecms__2
 * redirect
 * redirect__2
 * redirect__3
 * redirect__4
 * wireguard
root@laborderie:/home/fred# yunohost app upgrade -F nextcloud__2
Info: Now upgrading nextcloud__2…
Info: Creating a safety backup prior to the upgrade
Info: Collecting files to be backed up for nextcloud__2…
Info: Declaring files to be backed up...
Info: /home/yunohost.app/nextcloud__2 will not be saved, because 'BACKUP_CORE_ONLY' is set.
Info: Backing up the MySQL database...
Info: Backup script completed for nextcloud__2. (YunoHost will then actually copy those files to the archive).
Info: Creating a backup archive from the collected files…
Info: The archive will contain about 1.1GB of data.
Success! Backup created: nextcloud__2-pre-upgrade2
Success! Backup deleted: nextcloud__2-pre-upgrade1
Info: Updating sources...
Info: Updating system_user...
Info: Updating install_dir...
Info: Updating data_dir...
Info: Updating permissions...
Warning: This permission is currently granted to all users in addition to other groups. You probably want to either remove the 'all_users' permission or remove the other groups it is currently granted to.
Info: Updating apt...
Warning: N: Ignoring file 'ovhkernel.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-rtm.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-metrics.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovhkernel.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-rtm.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-metrics.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Info: Updating database...
Info: [+...................] > Ensuring downward compatibility...
Info: [#+++................] > Upgrading nextcloud__2...
Warning: dpkg-query: no packages found matching nextcloud__2-ynh-deps
Error: Could not upgrade nextcloud__2: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'nextcloud__2' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20240711-185314-app_upgrade-nextcloud__2' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - An unhandled exception has been thrown:
Info: DEBUG - Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/www/nextcloud__2/lib/private/DB/Connection.php:163
Info: DEBUG - Stack trace:
Info: DEBUG - #0 /var/www/nextcloud__2/3rdparty/doctrine/dbal/src/Connection.php(453): OC\DB\Connection->connect()
Info: DEBUG - #1 /var/www/nextcloud__2/3rdparty/doctrine/dbal/src/Connection.php(411): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
Info: DEBUG - #2 /var/www/nextcloud__2/3rdparty/doctrine/dbal/src/Connection.php(318): Doctrine\DBAL\Connection->detectDatabasePlatform()
Info: DEBUG - #3 /var/www/nextcloud__2/lib/private/DB/ConnectionAdapter.php(200): Doctrine\DBAL\Connection->getDatabasePlatform()
Info: DEBUG - #4 /var/www/nextcloud__2/lib/private/DB/QueryBuilder/QueryBuilder.php(121): OC\DB\ConnectionAdapter->getDatabasePlatform()
Info: DEBUG - #5 /var/www/nextcloud__2/lib/private/AppConfig.php(1237): OC\DB\QueryBuilder\QueryBuilder->expr()
Info: DEBUG - #6 /var/www/nextcloud__2/lib/private/AppConfig.php(262): OC\AppConfig->loadConfig()
Info: DEBUG - #7 /var/www/nextcloud__2/lib/private/AppConfig.php(1378): OC\AppConfig->searchValues()
Info: DEBUG - #8 /var/www/nextcloud__2/lib/private/App/AppManager.php(131): OC\AppConfig->getValues()
Info: DEBUG - #9 /var/www/nextcloud__2/lib/private/App/AppManager.php(152): OC\App\AppManager->getInstalledAppsValues()
Info: DEBUG - #10 /var/www/nextcloud__2/lib/private/legacy/OC_App.php(234): OC\App\AppManager->getInstalledApps()
Info: DEBUG - #11 /var/www/nextcloud__2/lib/private/AppFramework/Bootstrap/Coordinator.php(90): OC_App::getEnabledApps()
Info: DEBUG - #12 /var/www/nextcloud__2/lib/base.php(706): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
Info: DEBUG - #13 /var/www/nextcloud__2/lib/base.php(1181): OC::init()
Info: DEBUG - #14 /var/www/nextcloud__2/console.php(48): require_once('...')
Info: DEBUG - #15 /var/www/nextcloud__2/occ(11): require_once('...')
Info: DEBUG - #16 {main}+ ynh_exit_properly
Warning: Upgrade failed ... attempting to restore the safety backup (Yunohost first need to remove the app for this) ...
Info: Removing nextcloud__2…
Info: [++++++++++++++++....] > Removing system configurations related to nextcloud__2...
Info: [####################] > Removal of nextcloud__2 completed
Info: Deprovisioning database...
Info: Deprovisioning apt...
Info: Deprovisioning permissions...
Info: Deprovisioning data_dir...
Info: Deprovisioning install_dir...
Info: Deprovisioning system_user...
Info: Deprovisioning sources...
Success! nextcloud__2 uninstalled
Warning: YunoHost is already installed
Info: Preparing archive for restoration…
Info: Restoring nextcloud__2…
Info: Provisioning sources...
Info: Provisioning system_user...
Info: Provisioning install_dir...
Info: Provisioning data_dir...
Info: Provisioning permissions...
Warning: This permission is currently granted to all users in addition to other groups. You probably want to either remove the 'all_users' permission or remove the other groups it is currently granted to.
Info: Provisioning apt...
Warning: N: Ignoring file 'ovhkernel.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-rtm.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-metrics.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovhkernel.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-rtm.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Warning: N: Ignoring file 'ovh-metrics.list.DEL' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Info: Provisioning database...
Info: [....................] > Restoring the app main directory...
Info: [++..................] > Restoring the MySQL database...
Info: [##+++++++++++++.....] > Reconfiguring PHP-FPM...
Info: [###############.....] > Restoring cron job...
Info: [###############.....] > Restoring the logrotate configuration...
Info: [###############+....] > Restoring data directory...
Info: [################+...] > Adding multimedia directories...
Info: [#################+..] > Restoring the Fail2Ban configuration...
Info: [##################+.] > Reloading NGINX web server...
Info: [####################] > Restoration completed for nextcloud__2
Success! Restoration completed
Error: The operation 'Upgrade the 'nextcloud__2' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20240711-185314-app_upgrade-nextcloud__2' to get help

Le problème vient encore de la base de donnée qui est inaccessible.

Finalement Nexcloud marche de nouveau, j’ai l’impression qu’il a ‘oublié’ les appareils connectés, il faut refaire l’association, mais c’est un moindre mal.

Si ça peut aider, voici les commandes passées :

root@laborderie:/home/fred# ls /etc/php/*/fpm/pool.d
/etc/php/7.3/fpm/pool.d:
grav.conf  my_webapp.conf  nextcloud__2.conf  piwigo.conf  prettynoemiecms__2.conf  prettynoemiecms.conf

/etc/php/7.4/fpm/pool.d:
grav.conf  prettynoemiecms__2.conf  prettynoemiecms.conf  www.conf

/etc/php/8.0/fpm/pool.d:
my_webapp.conf	piwigo.conf  www.conf

/etc/php/8.3/fpm/pool.d:
nextcloud__2.conf  www.conf
root@laborderie:/home/fred# tr -d "\n" <<<$(dpkg -l | grep ii | grep php8.3 | awk '{print $2 " " }')
php8.3 php8.3-apcu php8.3-bcmath php8.3-bz2 php8.3-cli php8.3-common php8.3-curl php8.3-fpm php8.3-gd php8.3-gmp php8.3-igbinary php8.3-imagick php8.3-imap php8.3-intl php8.3-ldap php8.3-mbstring php8.3-mysql php8.3-opcache php8.3-readline php8.3-redis php8.3-xml php8.3-zip 

Je comprends que maintenant Nextcloud utilise php8.3, je suis en version 29.0.2

J’ai vérifié la présence des paquets php, et tout est là.

J’ai l’impression que ça marche, mes appareils se synchronisent frénétiquement, je crois que c’est bon.

Un grand merci à tout le monde, je vais pouvoir continuer à éviter les Gafams. C’est parfois un peu plus compliqué, mais je crois que c’est important.
Merci.

oui ça fonctionne, en 8.3. Je ne sais pas pourquoi j’ai la version testing. Je n’ai pas eu à installer de paquet. Tout était là. Mais il y a toujours une erreur dans le script de mise à jour. Merci pour le support.

Conserve bien ce log au cas où les prochains upgrade se passent mal, sait-on jamais.

Un conseil, tu devrais faire un peu de ménage dans /etc/apt/sources.list.d/ , les fichiers ne doivent pas être renommés en .DEL. Si tu souhaites les conserver mais les désactiver pour que les dépôts concernés ne soient pas pris en compte, il faut commenter les lignes qui se trouvent dans ces fichiers avec un # au début de chaque ligne et non les renommer en .DEL.

Donc tu es en version stable, la testing est la 29.0.3. Pour nos versions différentes de php, je vois ce commit.

@Aleks pourra peut-être nous apporter ses lumières s’il passe par là.