Mon serveur YunoHost
Matériel: Brique Internet (lime2) avec VPN
Version de YunoHost: 4.3.6.3
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non
Description du problème
Suite à une mise à jour (système, quelques paquets et applications uniquement Nextcloud), le Nextcloud « à disparus ». En fait il n’a pas su finir la mise à jour et il n’a pas su restaurer le backup.
Mise à jour
Début de la mise à jour
Le log de la mise à jour depuis Nextcloud 22.2.3 vers 22.2.7 : https://paste.yunohost.org/raw/ikezejufew
Et on y voit qu’il n’a pas su désactiver le mode maintenance et quand il a essyé de désinstaller, il n’a pas pu se connecter au mysql non plus.
…
2022-05-04 15:36:27,964: DEBUG - + sudo -u nextcloud php7.3 --define apc.enable_cli=1 occ --no-interaction --no-ansi maintenance:mode --off
2022-05-04 15:36:30,946: DEBUG - An unhandled exception has been thrown:
2022-05-04 15:36:30,952: DEBUG - Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused in /var/www/nextcloud/lib/private/DB/Connection.php:87
…
2022-05-04 15:36:37,124: DEBUG - Removing nextcloud...
2022-05-04 15:36:42,229: DEBUG - [....................] > Loading installation settings...
2022-05-04 15:36:45,910: DEBUG - [+++++++++...........] > Removing dependencies...
2022-05-04 15:37:24,995: DEBUG - [#########+++........] > Removing the MySQL database...
2022-05-04 15:37:29,063: WARNING - mysqlshow: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
2022-05-04 15:37:29,162: WARNING - Database nextcloud not found
2022-05-04 15:37:29,504: WARNING - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
2022-05-04 15:37:30,068: DEBUG - [############+.......] > Removing app main directory...
2022-05-04 15:37:35,840: DEBUG - [#############.......] > Removing NGINX web server configuration...
2022-05-04 15:37:38,529: DEBUG - [#############+......] > Removing PHP-FPM configuration...
2022-05-04 15:37:44,169: DEBUG - [##############+.....] > Removing logrotate configuration...
2022-05-04 15:37:44,825: DEBUG - [###############+++..] > Removing Fail2Ban configuration...
2022-05-04 15:37:48,522: DEBUG - [##################+.] > Removing the dedicated system user...
2022-05-04 15:37:51,507: DEBUG - [####################] > Removal of nextcloud completed
2022-05-04 15:37:52,534: DEBUG - nextcloud uninstalled
2022-05-04 15:38:05,690: DEBUG - The operation 'Remove the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20220504-153637-app_remove-nextcloud' to get help
…
Pourtant il l’a fait jusqu’au bout bien qu’il semble (ça se voit au début du log) avoir désinstallé la version 22.2.3 de Nextcloud
Suppression de Nextcloud
Le log de la de suppression de Nextcloud 22.2.7 https://paste.yunohost.org/raw/jiwevezugu
args:
app: nextcloud
purge: false
ended_at: 2022-05-04 15:38:05.685610
env:
BASH_XTRACEFD: '7'
YNH_APP_BASEDIR: /var/cache/yunohost/app_tmp_work_dirs/app_ohw0u6of
YNH_APP_ID: nextcloud
YNH_APP_INSTANCE_NAME: nextcloud
YNH_APP_INSTANCE_NUMBER: '1'
YNH_APP_MANIFEST_VERSION: 22.2.3~ynh1
YNH_APP_PURGE: '0'
YNH_ARCH: armhf
YNH_CWD: /var/cache/yunohost/app_tmp_work_dirs/app_ohw0u6of/scripts
YNH_INTERFACE: cli
YNH_STDRETURN: /tmp/tmptwo2imyj/stdreturn
error: 'This action seems to have broken these important services: mysql (failed)'
interface: cli
operation: app_remove
parent: 20220504-151912-app_upgrade-nextcloud
related_to:
- - app
- nextcloud
started_at: 2022-05-04 15:36:37.046261
success: false
yunohost_version: 4.3.6.3
…
2022-05-04 15:37:51,505: INFO - [####################] > Removal of nextcloud complete
…
Tentative de restauration automatique
Le log de la restauration qui ne s’est pas faite : https://paste.yunohost.org/raw/ipereruyaf
…
2022-05-04 15:40:47,027: WARNING - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
…
Tentative de restauration manuelle
Après tout ça, on a redémarré la brique et tenté un yunohost backup restore nextcloud-pre-upgrade2 --apps nextcloud --debug
qui ne s’est pas fait non plus.
Le log de la tentative de restauration « manuelle » : https://paste.yunohost.org/raw/nawohiyige
…
2022-05-07 11:47:14,823: WARNING - ERROR 1007 (HY000) at line 1: Can't create database 'nextcloud'; database exists
2022-05-07 11:47:14,828: DEBUG - + ynh_exit_properly
2022-05-07 11:47:16,356: ERROR - Impossible de restaurer nextcloud : Une erreur s'est produite dans le script de restauration de l'application