[résolu] Plantage pendant l'upgrade de Nextcloud

Mon serveur YunoHost

Matériel: V Raspberry Pi à la maison
Version de YunoHost: 4.2.6.1
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 ? : oui
Si oui, expliquer: Mise à jour Nextcloud

Description du problème

Bonjour,
Mon réseau a planté pendant la dernière mise à jour de Nextcloud (de 20,0,8 vers 21,0,2) déclanchée depuis la webadmin.
Au retour de la connexion avec la webadmin impossible de continuer ou relancer la maj. Voici le message :

ended_at: 2021-06-26 14:46:08.759650
env:
  BASH_XTRACEFD: '7'
  YNH_APP_CURRENT_VERSION: 20.0.8~ynh1
  YNH_APP_ID: nextcloud
  YNH_APP_INSTANCE_NAME: nextcloud
  YNH_APP_INSTANCE_NUMBER: '1'
  YNH_APP_MANIFEST_VERSION: 21.0.2~ynh1
  YNH_APP_UPGRADE_TYPE: UPGRADE_APP
  YNH_CWD: /var/cache/yunohost/app_tmp_work_dirs/app_ldpvgnr5/scripts
  YNH_INTERFACE: api
  YNH_STDRETURN: /tmp/tmpa8c9bjm0/stdreturn
error: "Une erreur s\u2019est produite durant l\u2019ex\xE9cution du script de mise\
  \ \xE0 niveau de l\u2019application"
interface: api
operation: app_upgrade
parent: null
related_to:
- - app
  - nextcloud
started_at: 2021-06-26 14:44:50.527274
success: false
yunohost_version: 4.2.6.1

Après une nouvelle tentative toute l’instance YNH plante … reboot à l’arrache, tout fonctionne y compris le nextcloud.

Merci pour votre aide.
Ym

1 Like

On a besoin du log complet. Tu peux l’obtenir en utilisant le bouton de partage ou l’option --share, là c’est juste partiel.

Merci pour ta réponse, voici les logs du plantage original quand il y a eu rupture de réseau :

2021-06-23 06:53:28,676: DEBUG - Executing command '/bin/bash -x "./upgrade"  7>&1'
2021-06-23 06:53:28,701: DEBUG - + source _common.sh
2021-06-23 06:53:28,703: DEBUG - ++ pkg_dependencies='imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at'
2021-06-23 06:53:28,704: DEBUG - ++ YNH_PHP_VERSION=7.3
2021-06-23 06:53:28,706: DEBUG - ++ extra_php_dependencies='php7.3-bz2 php7.3-imap php7.3-smbclient php7.3-gmp php7.3-gd php7.3-json php7.3-intl php7.3-curl php7.3-apcu php7.3-redis php7.3-ldap php7.3-imagick php7.3-zip php7.3-mbstring php7.3-xml php7.3-mysql php7.3-igbinary php7.3-bcmath'
2021-06-23 06:53:28,710: DEBUG - + source /usr/share/yunohost/helpers
2021-06-23 06:53:28,714: DEBUG - +++ set +o
2021-06-23 06:53:28,715: DEBUG - +++ grep xtrace
2021-06-23 06:53:28,721: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace'
2021-06-23 06:53:28,722: DEBUG - ++ XTRACE_ENABLE='set -o xtrace'
2021-06-23 06:53:29,124: INFO - [....................] > Loading installation settings...
2021-06-23 06:53:29,126: DEBUG - + echo '[....................] > Loading installation settings...'
2021-06-23 06:53:29,129: DEBUG - + app=nextcloud
2021-06-23 06:53:29,129: DEBUG - ++ ynh_app_setting_get --app=nextcloud --key=domain
2021-06-23 06:53:29,252: DEBUG - ++ [[ domain =~ (unprotected|protected|skipped)_ ]]
2021-06-23 06:53:29,270: DEBUG - ++ ynh_app_setting get nextcloud domain
2021-06-23 06:53:29,559: DEBUG - + domain=nsi.ynh.fr
2021-06-23 06:53:29,561: DEBUG - ++ ynh_app_setting_get --app=nextcloud --key=path
2021-06-23 06:53:29,654: DEBUG - ++ [[ path =~ (unprotected|protected|skipped)_ ]]
2021-06-23 06:53:29,655: DEBUG - ++ ynh_app_setting get nextcloud path
2021-06-23 06:53:29,909: DEBUG - + path_url=/nextcloud
2021-06-23 06:53:29,911: DEBUG - ++ ynh_app_setting_get --app=nextcloud --key=admin
2021-06-23 06:53:30,004: DEBUG - ++ [[ admin =~ (unprotected|protected|skipped)_ ]]
2021-06-23 06:53:30,005: DEBUG - ++ ynh_app_setting get nextcloud admin
2021-06-23 06:53:30,266: DEBUG - + admin=yvesmarie
2021-06-23 06:53:30,268: DEBUG - ++ ynh_app_setting_get --app=nextcloud --key=final_path
2021-06-23 06:53:30,386: DEBUG - ++ [[ final_path =~ (unprotected|protected|skipped)_ ]]
2021-06-23 06:53:30,387: DEBUG - ++ ynh_app_setting get nextcloud final_path
2021-06-23 06:53:30,649: DEBUG - + final_path=/var/www/nextcloud
2021-06-23 06:53:30,651: DEBUG - ++ ynh_app_setting_get --app=nextcloud --key=db_name
2021-06-23 06:53:30,744: DEBUG - ++ [[ db_name =~ (unprotected|protected|skipped)_ ]]
2021-06-23 06:53:30,746: DEBUG - ++ ynh_app_setting get nextcloud db_name
2021-06-23 06:53:31,000: DEBUG - + db_name=nextcloud
2021-06-23 06:53:31,001: DEBUG - ++ ynh_app_setting_get --app=nextcloud --key=user_home
2021-06-23 06:53:31,095: DEBUG - ++ [[ user_home =~ (unprotected|protected|skipped)_ ]]
2021-06-23 06:53:31,096: DEBUG - ++ ynh_app_setting get nextcloud user_home
2021-06-23 06:53:31,350: DEBUG - + user_home=1
2021-06-23 06:53:31,352: DEBUG - ++ ynh_app_setting_get --app=nextcloud --key=phpversion
2021-06-23 06:53:31,446: DEBUG - ++ [[ phpversion =~ (unprotected|protected|skipped)_ ]]
2021-06-23 06:53:31,447: DEBUG - ++ ynh_app_setting get nextcloud phpversion
2021-06-23 06:53:31,700: DEBUG - + phpversion=7.3
2021-06-23 06:53:31,701: DEBUG - ++ ynh_app_setting_get --app=nextcloud --key=fpm_footprint
2021-06-23 06:53:31,807: DEBUG - ++ [[ fpm_footprint =~ (unprotected|protected|skipped)_ ]]
2021-06-23 06:53:31,808: DEBUG - ++ ynh_app_setting get nextcloud fpm_footprint
2021-06-23 06:53:32,092: DEBUG - + fpm_footprint=high
2021-06-23 06:53:32,094: DEBUG - ++ ynh_app_setting_get --app=nextcloud --key=fpm_usage
2021-06-23 06:53:32,189: DEBUG - ++ [[ fpm_usage =~ (unprotected|protected|skipped)_ ]]
2021-06-23 06:53:32,190: DEBUG - ++ ynh_app_setting get nextcloud fpm_usage
2021-06-23 06:53:32,452: DEBUG - + fpm_usage=medium
2021-06-23 06:53:32,454: DEBUG - ++ ynh_check_app_version_changed
2021-06-23 06:53:32,457: DEBUG - ++ local return_value=UPGRADE_APP
2021-06-23 06:53:32,458: DEBUG - ++ '[' UPGRADE_APP == UPGRADE_FULL ']'
2021-06-23 06:53:32,459: DEBUG - ++ '[' UPGRADE_APP == UPGRADE_FORCED ']'
2021-06-23 06:53:32,460: DEBUG - ++ '[' UPGRADE_APP == DOWNGRADE_FORCED ']'
2021-06-23 06:53:32,460: DEBUG - ++ echo UPGRADE_APP
2021-06-23 06:53:32,463: DEBUG - + upgrade_type=UPGRADE_APP
2021-06-23 06:53:32,603: DEBUG - + echo '[+...................] > Ensuring downward compatibility...'
2021-06-23 06:53:32,606: DEBUG - + '[' -z nextcloud ']'
2021-06-23 06:53:32,607: DEBUG - + '[' -z /var/www/nextcloud ']'
2021-06-23 06:53:32,608: INFO - [+...................] > Ensuring downward compatibility...
2021-06-23 06:53:32,610: DEBUG - + ynh_app_setting_delete --app=nextcloud --key=backup_core_only
2021-06-23 06:53:32,736: DEBUG - + [[ backup_core_only =~ (unprotected|skipped|protected)_ ]]
2021-06-23 06:53:32,737: DEBUG - + ynh_app_setting delete nextcloud backup_core_only
2021-06-23 06:53:33,007: DEBUG - + '[' -z high ']'
2021-06-23 06:53:33,008: DEBUG - + '[' -z medium ']'
2021-06-23 06:53:33,009: DEBUG - + '[' -z 7.3 ']'
2021-06-23 06:53:33,218: DEBUG - + echo '[#+++++++++..........] > Backing up the app before upgrading (may take a while)...'
2021-06-23 06:53:33,220: INFO - [#+++++++++..........] > Backing up the app before upgrading (may take a while)...
2021-06-23 06:53:33,225: DEBUG - ++ grep OC_VersionString /var/www/nextcloud/version.php
2021-06-23 06:53:33,225: DEBUG - ++ cut '-d'\''' -f2
2021-06-23 06:53:33,230: DEBUG - + current_version=20.0.8
2021-06-23 06:53:33,231: DEBUG - + current_major_version=20
2021-06-23 06:53:33,232: DEBUG - + '[' 20 -gt 11 ']'
2021-06-23 06:53:33,233: DEBUG - + ynh_app_setting_set --app=nextcloud --key=backup_core_only --value=1
2021-06-23 06:53:33,437: DEBUG - + [[ backup_core_only =~ (unprotected|protected|skipped)_ ]]
2021-06-23 06:53:33,438: DEBUG - + ynh_app_setting set nextcloud backup_core_only 1
2021-06-23 06:53:33,711: DEBUG - + ynh_backup_before_upgrade
2021-06-23 06:53:33,713: DEBUG - + '[' '!' -e /etc/yunohost/apps/nextcloud/scripts/backup ']'
2021-06-23 06:53:33,714: DEBUG - + backup_number=1
2021-06-23 06:53:33,715: DEBUG - + local old_backup_number=2
2021-06-23 06:53:33,716: DEBUG - + local app_bck=nextcloud
2021-06-23 06:53:33,717: DEBUG - + NO_BACKUP_UPGRADE=0
2021-06-23 06:53:33,718: DEBUG - + '[' 0 -eq 0 ']'
2021-06-23 06:53:33,719: DEBUG - + ynh_backup_archive_exists nextcloud-pre-upgrade1
2021-06-23 06:53:33,720: DEBUG - + yunohost backup list --output-as json --quiet
2021-06-23 06:53:33,720: DEBUG - + jq -e --arg archive nextcloud-pre-upgrade1 '.archives | index($archive)'
2021-06-23 06:53:34,689: DEBUG - + backup_number=2
2021-06-23 06:53:34,690: DEBUG - + old_backup_number=1
2021-06-23 06:53:34,691: DEBUG - + BACKUP_CORE_ONLY=1
2021-06-23 06:53:34,692: DEBUG - + yunohost backup create --apps nextcloud --name nextcloud-pre-upgrade2 --debug
2021-06-23 06:53:35,330: DEBUG - 490  initializing base actions map parser for cli
2021-06-23 06:53:35,336: DEBUG - 496  loading actions map namespace 'yunohost'
2021-06-23 06:53:35,344: DEBUG - 504  building parser...
2021-06-23 06:53:35,361: DEBUG - 521  building parser took 0.016s
2021-06-23 06:53:35,366: DEBUG - 526  acquiring lock...
2021-06-23 06:53:35,541: DEBUG - 701  loading python module yunohost.backup took 0.130s
2021-06-23 06:53:35,542: DEBUG - 702  processing action [16789.1]: yunohost.backup.create with args={'name': 'nextcloud-pre-upgrade2', 'description': None, 'output_directory': None, 'methods': None, 'system': None, 'apps': ['nextcloud'], 'dry_run': False}
2021-06-23 06:53:35,623: DEBUG - 783  Collecting files to be backed up for nextcloud...
2021-06-23 08:39:50,275: WARNING - cp: error reading '/etc/yunohost/apps//nextcloud/scripts/app.tar.bz2': Input/output error
2021-06-23 08:40:52,730: WARNING - 6437889 Could not back up nextcloud
2021-06-23 08:40:52,765: DEBUG - 6437925 The operation 'Create a backup archive' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20210623-055335-backup_create' to get help
2021-06-23 08:40:55,529: DEBUG - 6440688 action [16789.1] executed in 6439.985s
2021-06-23 08:40:55,531: WARNING - 6440691 Nothing to save
2021-06-23 08:40:55,702: DEBUG - + '[' 1 -eq 0 ']'
2021-06-23 08:40:55,703: DEBUG - + ynh_die '--message=Backup failed, the upgrade process was aborted.'
2021-06-23 08:40:55,753: DEBUG - + ret_code=1
2021-06-23 08:40:55,755: DEBUG - + echo 'Backup failed, the upgrade process was aborted.'
2021-06-23 08:40:55,755: DEBUG - + exit 1
2021-06-23 08:40:55,756: WARNING - Backup failed, the upgrade process was aborted.
2021-06-23 08:41:27,357: ERROR - Impossible de mettre à jour nextcloud : Une erreur s’est produite durant l’exécution du script de mise à niveau de l’application

Historique

Pour le plantage (systématique) lors de redemande de mise à jour de Nextcloud, je n’ai rien d’autre; Le fichier que me donne le chemin /var/log/yunohost/categories/operation/dantedufixhier … est vide !

encore merci, … à suivre …

L’upgrade échoue car le backup échoue je pense. Ça va pas plus loin pour éviter une cata.

Que donne:

ls -la /etc/yunohost/apps/nextcloud/scripts/

Merc d’avoir considéré mon message, voila :

admin@nsi:~ $ sudo ls -la /etc/yunohost/apps/nextcloud/scripts/                                                                                                                               
total 102224                                                                                                                                                                                  
drwxr-xr-x 4 admin 1007      4096 May  8 07:43 .                                                                                                                                              
dr-------- 4 root  root      4096 May  8 07:43 ..                                                                                                                                             
drwxr-xr-x 2 admin 1007      4096 May  8 07:35 actions                                                                                                                                        
-rw-r--r-- 1 root  root 104577806 Feb 24 19:13 app.tar.bz2                                                                                                                                    
-rwxr-xr-x 1 admin 1007      3087 May  8 07:35 backup                                                                                                                                         
-rw-r--r-- 1 admin 1007      4211 May  8 07:35 change_url                                                                                                                                     
-rw-r--r-- 1 admin 1007      5219 May  8 07:35 _common.sh                                                                                                                                     
-rw-r--r-- 1 admin 1007      3336 May  8 07:35 config                                                                                                                                         
-rwxr-xr-x 1 admin 1007     13616 May  8 07:35 install                                                                                                                                        
-rw-r--r-- 1 root  root       580 May  8 07:43 nextcloud-logrotate                                                                                                                            
-rwxr-xr-x 1 admin 1007      3869 May  8 07:35 remove                                                                                                                                         
-rwxr-xr-x 1 admin 1007      7110 May  8 07:35 restore                                                                                                                                        
-rwxr-xr-x 1 admin 1007     18520 May  8 07:35 upgrade                                                                                                                                        
drwxr-xr-x 2 admin 1007      4096 May  8 07:35 upgrade.d                                                                                                                                      

Bonnes nouvelles, je m’en suis sorti !
Le message dans l’interface mise à jour disait :
cp error reading
‘etc/yunohost/apps//nextcloud/scripts/app.tar.bz2’ input/output error
Je suis donc allé supprimer ce fichier dans le répertoire, rebboter et relancer la mise à jour qui est passée > 21.0.0 > 21.0.2
Youpi.
Je pense que l’interruption de l’interface d’admin lors de l’upgrade a mis ce fichier en défaut de lecture donc planté les realnces d’upgrade de nextcloud. Ai-je raison ?
Merci et bon mois d’août.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.