[Peertube] Mise à jour de 3.2.1 vers 3.3.0 impossible

Serveur

Matériel: machine virtuelle
Version de YunoHost: 4.2.6.1
Accès au serveur : En SSH et par la webadmin

Description du problème

Mise à jour de Peertube depuis la version 3.2.1~ynh4 vers la version 3.3.0~ynh2 qui se termine par un échec :

# yunohost app upgrade peertube
Info: Now upgrading peertube...
Info: [....................] > Loading installation settings...
Info: [+...................] > Checking version...
Info: [#+..................] > Backing up the app before upgrading (may take a while)...
Info: [##+.................] > Stopping a systemd service...
Info: [###+................] > Ensuring downward compatibility...
Warning: NOTICE:  extension "unaccent" already exists, skipping
Warning: NOTICE:  extension "pg_trgm" already exists, skipping
Info: '/etc/apt/sources.list.d/jessie-backports.list' wasn't deleted because it doesn't exist.
Info: '/etc/apt/sources.list.d/yarn.list' wasn't deleted because it doesn't exist.
Info: [####+...............] > Making sure dedicated system user exists...
Info: [#####+..............] > Upgrading source files...
Info: [######+.............] > Upgrading NGINX web server configuration...
Info: [#######+............] > Upgrading dependencies...
Info: '/etc/apt/trusted.gpg.d/peertube.asc' wasn't deleted because it doesn't exist.
Info: '/usr/share/yunohost/hooks/conf_regen/15-nginx_peertube' wasn't deleted because it doesn't exist.
Warning: The configuration file '/var/www/.well-known/rss.librino.net/autoconfig/mail/config-v1.1.xml' has been manually modified and will not be updated
Info: [########+...........] > Creating a data directory...
Info: [#########+..........] > Updating a config file...
Info: [##########+.........] > Building Yarn dependencies...
Warning: [Error] Upgrade failed.
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: This action broke dpkg/APT (the system package managers)... You can try to solve this issue by connecting through SSH and running `sudo apt install --fix-broken` and/or `sudo dpkg --configure -a`.
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: 1038560 (this may take some time)
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: sh: 0: getcwd() failed: No such file or directory
Warning: The app was restored to the way it was before the failed upgrade.
Error: Could not upgrade peertube: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'peertube' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20210731-090301-app_upgrade-peertube' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - 3486 + local rel_dir=/apps/peertube/backup
Info: DEBUG - 3486 + rel_dir=/apps/peertube/backup/
Info: DEBUG - 3487 + dest_path=/apps/peertube/backup/etc/systemd/system/peertube.service
Info: DEBUG - 3487 + dest_path=apps/peertube/backup/etc/systemd/system/peertube.service
Info: DEBUG - 3489 ++ sed --regexp-extended 's/"/\"\"/g'
Info: DEBUG - 3491 ++ echo /etc/systemd/system/peertube.service
Info: DEBUG - 3492 + local src=/etc/systemd/system/peertube.service
Info: DEBUG - 3493 ++ sed --regexp-extended 's/"/\"\"/g'
Info: DEBUG - 3496 ++ echo apps/peertube/backup/etc/systemd/system/peertube.service
Info: DEBUG - 3497 + local dest=apps/peertube/backup/etc/systemd/system/peertube.service
Info: DEBUG - 3498 + echo '"/etc/systemd/system/peertube.service","apps/peertube/backup/etc/systemd/system/peertube.service"'
Info: DEBUG - 3498 ++ dirname /home/yunohost.backup/tmp/peertube-pre-upgrade1/apps/peertube/backup/etc/systemd/system/peertube.service
Info: DEBUG - 3500 + mkdir --parents /home/yunohost.backup/tmp/peertube-pre-upgrade1/apps/peertube/backup/etc/systemd/system
Info: DEBUG - 3502 + ynh_print_info '--message=Backing up the PostgreSQL database...'
Info: DEBUG - 3515 + echo 'Backing up the PostgreSQL database...'
Info: DEBUG - 3515 + ynh_psql_dump_db --database=peertube_peertube
Info: DEBUG - 3516 Backing up the PostgreSQL database...
Info: DEBUG - 3534 + sudo --login --user=postgres pg_dump peertube_peertube
Info: DEBUG - 68811 + ynh_print_info '--message=Backup script completed for peertube. (YunoHost will then actually copy those files to the archive).'
Info: DEBUG - 68845 + echo 'Backup script completed for peertube. (YunoHost will then actually copy those files to the archive).'
Info: DEBUG - 68845 + ynh_exit_properly
Error: The operation 'Upgrade the 'peertube' app' could not be completed.

Les logs complets sont disponibles ici.

Restauration du backup : OK :heavy_check_mark:

Comment résoudre le problème ?

Merci par avance :slight_smile:

Salut !

Tu peux indiquer ce que dit la commande : apt install -f et df -h? Je ne pense pas que ce soit lié… mais c’est juste pour comprendre l’environnement (anonymise si tu peux les logs/résultats des commandes)

Salut,

Merci du retour, voilà les deux retours des commandes :

# apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.5G     0  1.5G   0% /dev
tmpfs           301M   32M  269M  11% /run
/dev/sda1       493G  253G  240G  52% /
tmpfs           1.5G   48K  1.5G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.5G     0  1.5G   0% /sys/fs/cgroup
tmpfs           301M     0  301M   0% /run/user/1001
tmpfs           301M     0  301M   0% /run/user/986
tmpfs           301M     0  301M   0% /run/user/1007

Je ne sais pas si ça aide.

D’après, le log, le pb serait un pb d’internet. Est-ce que tu peux faire wget https://registry.yarnpkg.com/date-fns/-/date-fns-2.22.1.tgz ? Si ça fonctionne, est-ce que tu peux retenter l’upgrade encore une fois ?

Dans le log :

2021-07-31 09:31:29,502: DEBUG - error An unexpected error occurred: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.22.1.tgz: ESOCKETTIMEDOUT".
2021-07-31 09:31:29,503: DEBUG - info If you think this is a bug, please open a bug report with the information provided in "/var/www/peertube/yarn-error.log".
2021-07-31 09:31:29,503: DEBUG - info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Il n’y a pas de souci pour télécharger le fichier. Il me semble que j’avais vu cette ligne, du coup j’avais tenté la mise à jour une seconde fois plusieurs jours après mais le résultat a été le même.
Je peux ressayer à la limite. :thinking:

Tente sinon de faire ça pour tester :

cd ~
mkdir tmp
cd tmp
yarn add date-fns@2.22.1

Si ça fonctionne pour cette dernière commande, je ne sais pas trop.

# yarn add date-fns@2.22.1
yarn add v1.22.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.22.5", while rou're on "1.22.4".
info To upgrade, run the following command:
$ sudo apt-get update && sudo apt-get install yarn
success Saved 1 new dependency.
info Direct dependencies
 date-fns@2.22.1

A priori aucun souci non plus de ce côté là, j’ai tenté de mettre à jour yarn, mais la dernière version disponible sur Debian est bien la 1.22.4.

Je vais essayer de nouveau la mise à jour pour voir.

Bon bah la mise à jour s’est bien passée cette fois, va comprendre. :sweat_smile:
Merci en tous cas pour les retours, je peux fermer le topic. :+1:

1 Like

Il est possible qu’à un certain moment il y ait eu soit un pb d’internet chez toi, ou soit l’url distante était inaccessible. ça arrive. Le mieux est de tenter à un autre moment ou, si on s’y connait un peu, vérifier manuellement le bug (comme ce que j’ai essayé de faire).

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