Question: Is There a Way To Upgrade Nextcloud From 22.2.7~ynh1 To 25.0.2~ynh1?

My YunoHost server

Hardware: VPS bought online
YunoHost version: YunoHost 11.0.10.2 (stable)
I have access to my server Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain:

Debian version: Debian GNU/Linux 11 (bullseye)
Yunohost version: YunoHost 11.0.10.2 (stable)

Status: Have just done migration: 0021_migrate_to_bullseye

Now attempting: To upgrade nextcloud from 22.2.7~ynh1 to 25.0.2~ynh1

Description of my issue

CURRENTLY:

ended_at: 2023-01-03 13:58:03.877354
env:
BASH_XTRACEFD: ‘7’
NO_BACKUP_UPGRADE: ‘0’
YNH_APP_BASEDIR: /var/cache/yunohost/app_tmp_work_dirs/app_9axswi6o
YNH_APP_CURRENT_VERSION: 22.2.7~ynh1
YNH_APP_ID: nextcloud
YNH_APP_INSTANCE_NAME: nextcloud
YNH_APP_INSTANCE_NUMBER: ‘1’
YNH_APP_MANIFEST_VERSION: 25.0.2~ynh1
YNH_APP_UPGRADE_TYPE: UPGRADE_APP
YNH_ARCH: amd64
YNH_CWD: /var/cache/yunohost/app_tmp_work_dirs/app_9axswi6o/scripts
YNH_INTERFACE: cli
YNH_STDRETURN: /tmp/tmpdm6e08di/stdreturn
error: An error occurred inside the app upgrade script
interface: cli
operation: app_upgrade
parent: null
related_to:
app
nextcloud
started_at: 2023-01-03 13:49:12.787962
success: false
yunohost_version: 11.0.10.2

THE CLI OUTPUT SHOWS:

Last login: Tue Jan 3 12:44:49 2023
root@:~#
root@:~#
root@:~# timedatectl
Local time: Tue 2023-01-03 14:48:45 CET
Universal time: Tue 2023-01-03 13:48:45 UTC
RTC time: Tue 2023-01-03 13:48:45
Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: no
root@:~#
root@:~#
root@:~# yunohost app upgrade nextcloud
Info: Now upgrading nextcloud…
Info: […] > Loading installation settings…
Info: [+…] > Ensuring downward compatibility…
Info: [#+++++++++…] > Backing up the app before upgrading (may take a while)…
Info: [##########++…] > Upgrading dependencies…
Warning: E: Packages need to be removed but remove is disabled.
Warning: The following packages have unmet dependencies:
Warning: php8.0-fpm : Depends: php8.0-cli but it is not going to be installed
Warning: Depends: php8.0-opcache but it is not going to be installed
Warning: php8.0-igbinary : Breaks: php-igbinary (< 3.2.12+2.0.8-2+0~20221210.36+debian11~1.gbp293257~)
Warning: php8.0-redis : Breaks: php-redis (< 5.3.7+4.3.0-2+0~20221210.45+debian11~1.gbp99917f~)
Warning: Unable to install dependencies
Warning: [Error] Upgrade failed.
Warning: E: Unable to locate package nextcloud-ynh-deps
Warning: 235092 Load smb config files from /etc/samba/smb.conf
Warning: 235094 Loaded services file OK.
Warning: 235095 Weak crypto is allowed
Warning: 235096 Server role: ROLE_STANDALONE
Warning: The app was restored to the way it was before the failed upgrade.
Error: Could not upgrade nextcloud: An error occurred inside the app upgrade script
Info: The operation ‘Upgrade the ‘nextcloud’ app’ could not be completed. Please share the full log of this operation
Warning: Here’s an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - ++ grep -oP ‘(?<=-ynh-deps depends on ).*(?=; however)’
Info: DEBUG - + local 'problematic_dependencies=php8.0-fpm php8.0-bz2 php8.0-imap php8.0-gmp php8.0-gd php8.0-intl php8.0-curl php8.0-apcu php8.0-redis php8.0-ldap php8.0-imagick php8.0-zip php8.0-mbstring php8.0-xml php8.0-mysql php8.0-igbinary php8.0-bcmath php8.0 php8.0-common ’
Info: DEBUG - + [[ -n php8.0-fpm php8.0-bz2 php8.0-imap php8.0-gmp php8.0-gd php8.0-intl php8.0-curl php8.0-apcu php8.0-redis php8.0-ldap php8.0-imagick php8.0-zip php8.0-mbstring php8.0-xml php8.0-mysql php8.0-igbinary php8.0-bcmath php8.0 php8.0-common ]]
Info: DEBUG - + sed --quiet ‘/Reading state info/,$p’
Info: DEBUG - + grep -v ‘fix-broken|Reading state info’
Info: DEBUG - + ynh_package_install php8.0-fpm php8.0-bz2 php8.0-imap php8.0-gmp php8.0-gd php8.0-intl php8.0-curl php8.0-apcu php8.0-redis php8.0-ldap php8.0-imagick php8.0-zip php8.0-mbstring php8.0-xml php8.0-mysql php8.0-igbinary php8.0-bcmath php8.0 php8.0-common --dry-run
Info: DEBUG - + ynh_apt --no-remove --option Dpkg::Options::=–force-confdef --option Dpkg::Options::=–force-confold install php8.0-fpm php8.0-bz2 php8.0-imap php8.0-gmp php8.0-gd php8.0-intl php8.0-curl php8.0-apcu php8.0-redis php8.0-ldap php8.0-imagick php8.0-zip php8.0-mbstring php8.0-xml php8.0-mysql php8.0-igbinary php8.0-bcmath php8.0 php8.0-common --dry-run
Info: DEBUG - + ynh_wait_dpkg_free
Info: DEBUG - + return 0
Info: DEBUG - + LC_ALL=C
Info: DEBUG - + DEBIAN_FRONTEND=noninteractive
Info: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 --no-remove --option Dpkg::Options::=–force-confdef --option Dpkg::Options::=–force-confold install php8.0-fpm php8.0-bz2 php8.0-imap php8.0-gmp php8.0-gd php8.0-intl php8.0-curl php8.0-apcu php8.0-redis php8.0-ldap php8.0-imagick php8.0-zip php8.0-mbstring php8.0-xml php8.0-mysql php8.0-igbinary php8.0-bcmath php8.0 php8.0-common --dry-run
Info: WARNING - The following packages have unmet dependencies:
Info: WARNING - php8.0-fpm : Depends: php8.0-cli but it is not going to be installed
Info: WARNING - Depends: php8.0-opcache but it is not going to be installed
Info: WARNING - php8.0-igbinary : Breaks: php-igbinary (< 3.2.12+2.0.8-2+0~20221210.36+debian11~1.gbp293257~)
Info: WARNING - php8.0-redis : Breaks: php-redis (< 5.3.7+4.3.0-2+0~20221210.45+debian11~1.gbp99917f~)
Info: DEBUG - + ynh_die ‘–message=Unable to install dependencies’
Info: WARNING - Unable to install dependencies
Info: DEBUG - + ynh_exit_properly
root:~#

FULL LOG as yunohost log paste available upon request. Not included here because it shows (unnecessarily) all users (usernames)

Please, note that before the above activity, there was a migration: Question: how to force a yunohost version update? - #3 by JAho

The only :face_with_peeking_eye: (upgrade) problem application (that I have currently) is the: nextcloud

I’m not sure writing the entire title with caps lock is necessary …

Let’s check the output of apt remove php-igbinary php-redis

2 Likes

Oops, CAPS. Corrected.

The done deed as instructed has a CLI output as follows:

Last login: Tue Jan 3 15:02:14 2023
root@:~#
root@:~# timedatectl
Local time: Wed 2023-01-04 08:51:57 CET
Universal time: Wed 2023-01-04 07:51:57 UTC
RTC time: Wed 2023-01-04 07:51:57
Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: no
root@:~#
root@:~# apt remove php-igbinary php-redis
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
The following packages were automatically installed and are no longer required:
gsfonts hicolor-icon-theme imagemagick imagemagick-6-common imagemagick-6.q16 libarchive13 libc-client2007e libdjvulibre-text libdjvulibre21 libgpgme11
libilmbase25 libjansson4 libjxr-tools libjxr0 libldb2 liblqr-1-0 libmagickcore-6.q16-6 libmagickcore-6.q16-6-extra libmagickwand-6.q16-6 libnetpbm10
libopenexr25 libsmbclient libtalloc2 libtdb1 libtevent0 libtidy5deb1 libwbclient0 libwebpdemux2 libwmf0.2-7 libzip4 mlock netpbm php7.4-apcu
php7.4-bcmath php7.4-bz2 php7.4-gmp php7.4-imagick php7.4-imap php7.4-phpdbg php7.4-tidy php7.4-zip python3-gpg python3-ldb python3-samba python3-talloc
python3-tdb samba-common samba-common-bin samba-dsdb-modules samba-libs smbclient
Use ‘apt autoremove’ to remove them.
The following packages will be REMOVED:
nextcloud-ynh-deps php-igbinary php-redis wallabag2-ynh-deps
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 998 kB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
root@:~#

Should I actually answer: Yes, to the above?

Hmmm we should investigate first why it wants to remove nextcloud and wallabag2 dependencies …

can you share the output of apt show nextcloud-ynh-deps and apt show wallabag2-ynh-deps ?

The CLI output shows:

Last login: Wed Jan 4 08:51:34 2023
root@:~#
root@:~# timedatectl
Local time: Wed 2023-01-04 16:16:16 CET
Universal time: Wed 2023-01-04 15:16:16 UTC
RTC time: Wed 2023-01-04 15:16:16
Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: no
root@:~#
root@:~# apt show nextcloud-ynh-deps
Package: nextcloud-ynh-deps
Version: 22.2.7~ynh1
Status: install ok installed
Priority: optional
Section: misc
Maintainer: Equivs Dummy Package Generator root@mydomain.tld
Installed-Size: 10.2 kB
Depends: imagemagick, libmagickcore-6.q16-6-extra, acl, tar, smbclient, at, php7.4-bz2, php7.4-imap, php7.4-gmp, php7.4-gd, php7.4-json, php7.4-intl, php7.4-curl, php7.4-apcu, php7.4-redis, php7.4-ldap, php7.4-imagick, php7.4-zip, php7.4-mbstring, php7.4-xml, php7.4-mysql, php7.4-igbinary, php7.4-bcmath, php7.4, php7.4-fpm, php7.4-common
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: Fake package for nextcloud (YunoHost app) dependencies
This meta-package is only responsible of installing its dependencies.

root@:~#
root@:~# apt show wallabag2-ynh-deps
Package: wallabag2-ynh-deps
Version: 2.5.2~ynh1
Status: install ok installed
Priority: optional
Section: misc
Maintainer: Equivs Dummy Package Generator root@mydomain.tld
Installed-Size: 9,216 B
Depends: php7.4-cli, php7.4-mysql, php7.4-json, php7.4-gd, php7.4-tidy, php7.4-curl, php7.4-gettext, php7.4-redis, php7.4-xml, php7.4-mbstring, php7.4-ldap, php7.4-intl, php7.4, php7.4-fpm, php7.4-common
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: Fake package for wallabag2 (YunoHost app) dependencies
This meta-package is only responsible of installing its dependencies.

root@:~#

Then let’s try maybe:

apt install php-igbinary- php-redis- php7.4-igbinary

This will remove (cf the - prefix) php-redis (not needed by both apps?) and php-igbinary, but install php7.4-igbinary as a replacement

The heroic quest for how to upgrade nextcloud continues.

THE CLI OUTPUT SHOWS:

Last login: Wed Jan 4 16:15:42 2023

root:~#
root:~# timedatectl
Local time: Thu 2023-01-05 12:18:32 CET
Universal time: Thu 2023-01-05 11:18:32 UTC
RTC time: Thu 2023-01-05 11:18:32
Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: no

root:~#
root:~# apt install php-igbinary- php-redis- php7.4-igbinary
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
The following packages were automatically installed and are no longer required:
gsfonts hicolor-icon-theme imagemagick imagemagick-6-common imagemagick-6.q16 libarchive13 libc-client2007e libdjvulibre-text libdjvulibre21 libgpgme11
libilmbase25 libjansson4 libjxr-tools libjxr0 libldb2 liblqr-1-0 libmagickcore-6.q16-6 libmagickcore-6.q16-6-extra libmagickwand-6.q16-6 libnetpbm10
libopenexr25 libsmbclient libtalloc2 libtdb1 libtevent0 libtidy5deb1 libwbclient0 libwebpdemux2 libwmf0.2-7 libzip4 mlock netpbm php7.4-apcu php7.4-bcmath
php7.4-bz2 php7.4-gmp php7.4-imagick php7.4-imap php7.4-tidy php7.4-zip python3-gpg python3-ldb python3-samba python3-talloc python3-tdb samba-common
samba-common-bin samba-dsdb-modules samba-libs smbclient
Use ‘apt autoremove’ to remove them.
The following packages will be REMOVED:
nextcloud-ynh-deps php-igbinary php-redis wallabag2-ynh-deps
The following NEW packages will be installed:
php7.4-igbinary
0 upgraded, 1 newly installed, 4 to remove and 0 not upgraded.
Need to get 34.5 kB of archives.
After this operation, 878 kB disk space will be freed.
Do you want to continue? [Y/n] Y
Get:1 Index of /php/ bullseye/main amd64 php7.4-igbinary amd64 3.2.12+2.0.8-2+0~20221210.36+debian11~1.gbp293257 [34.5 kB]
Fetched 34.5 kB in 0s (196 kB/s)
(Reading database … 71252 files and directories currently installed.)
Removing nextcloud-ynh-deps (22.2.7~ynh1) …
Removing wallabag2-ynh-deps (2.5.2~ynh1) …
Removing php-redis (5.3.2+4.3.0-2+deb11u1) …
Removing php-igbinary (3.2.1+2.0.8-2) …
Selecting previously unselected package php7.4-igbinary.
(Reading database … 71230 files and directories currently installed.)
Preparing to unpack …/php7.4-igbinary_3.2.12+2.0.8-2+0~20221210.36+debian11~1.gbp293257_amd64.deb …
Unpacking php7.4-igbinary (3.2.12+2.0.8-2+0~20221210.36+debian11~1.gbp293257) …
Setting up php7.4-igbinary (3.2.12+2.0.8-2+0~20221210.36+debian11~1.gbp293257) …
Processing triggers for php7.4-cli (1:7.4.33-1+0~20221108.73+debian11~1.gbpa0035a) …
Processing triggers for php7.4-phpdbg (1:7.4.33-1+0~20221108.73+debian11~1.gbpa0035a) …
Processing triggers for php7.4-fpm (1:7.4.33-1+0~20221108.73+debian11~1.gbpa0035a) …
root:~#

COMMENT-1: Next action: Maybe overcautious here but that’s what I wanted;

  • a “gentle” reboot

root:~#
root:~# shutdown -r +3 Shutting down in 3 minutes!
Reboot scheduled for Thu 2023-01-05 12:29:42 CET, use ‘shutdown -c’ to cancel.
root:~#

{ WHAT? A pause?. Yes, indeed. I need to eat too… }

COMMENT-2: Next action: timedatectl is my way of putting “timestamps” in outputs, so that I know after 2+ weeks: when I did and what I did…

Last login: Thu Jan 5 12:17:54 2023
root:~#
root:~# timedatectl
Local time: Thu 2023-01-05 12:46:40 CET
Universal time: Thu 2023-01-05 11:46:40 UTC
RTC time: Thu 2023-01-05 11:46:40
Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: no
root:~#
root:~# yunohost app upgrade nextcloud
Info: Now upgrading nextcloud…
Info: […] > Loading installation settings…
Info: [+…] > Ensuring downward compatibility…
Info: [#+++++++++…] > Backing up the app before upgrading (may take a while)…
Info: [##########++…] > Upgrading dependencies…
Info: [############…] > Making sure dedicated system user exists…
Info: [############…] > Upgrading PHP-FPM configuration…
Info: [############+…] > Upgrading NGINX web server configuration…
Info: The service nginx has correctly executed the action reload-or-restart.
Info: [#############+…] > Upgrading Nextcloud…
Info: Upgrade to nextcloud 23.0.0
Info: ‘/tmp/tmp.4n5HkP4sql’ wasn’t deleted because it doesn’t exist.
Warning: Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Starting …
Warning: 0/0 [>---------------------------] 0% Starting …
Warning: 0/0 [->--------------------------] 0% Starting …
Warning: 0/0 [—>------------------------] 0%
Warning: Starting …
Warning: 1/0 [----->----------------------] 0% Starting …
Warning: 0/0 [------->--------------------] 0% Starting …
Warning: 0/0 [--------->------------------] 0%
Warning: Starting …
Info: Upgrade to nextcloud 24.0.0
Info: ‘/tmp/tmp.oLynsmqdtq’ wasn’t deleted because it doesn’t exist.
Warning: 3/0 [----------->----------------] 0%Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Starting …
Warning: 0/0 [>---------------------------] 0% Starting …
Warning: 0/0 [->--------------------------] 0% Starting …
Warning: 0/0 [—>------------------------] 0%
Warning: Starting …
Warning: 1/0 [----->----------------------] 0% Starting …
Warning: 0/0 [------->--------------------] 0%
Warning: Starting …
Info: Upgrade to nextcloud 25.0.0
Info: ‘/tmp/tmp.VOdW5JsFO3’ wasn’t deleted because it doesn’t exist.
Warning: 5/0 [--------->------------------] 0%Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Starting …
Warning: 0/0 [>---------------------------] 0% Starting …
Warning: 0/0 [->--------------------------] 0% Starting …
Warning: 0/0 [—>------------------------] 0% Starting …
Warning: 0/0 [----->----------------------] 0% Starting …
Warning: 0/0 [------->--------------------] 0% Starting …
Warning: 0/0 [--------->------------------] 0%
Warning: Starting …
Info: Upgrade to nextcloud 25.0.2
Info: ‘/tmp/tmp.VbX9LhWaaJ’ wasn’t deleted because it doesn’t exist.
Warning: 4/0 [----------->----------------] 0%Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Starting …
Warning: 0/0 [>---------------------------] 0% Starting …
Warning: 0/1 [>---------------------------] 0%
Warning: Starting …
Info: [##############+++…] > Reconfiguring Nextcloud…
Warning: 1/1 [============================] 100%File /var/www/nextcloud/config/config.php has been manually modified since the installation or last upgrade. So it has been duplicated in /var/cache/yunohost/appconfbackup//var/www/nextcloud/config/config.php.backup.20230105.130535
Warning: [Error] Upgrade failed.
Warning: E: Unable to locate package nextcloud-ynh-deps
Warning: 230038 Load smb config files from /etc/samba/smb.conf
Warning: 230040 Loaded services file OK.
Warning: 230042 Weak crypto is allowed
Warning: 230043 Server role: ROLE_STANDALONE
Warning: The app was restored to the way it was before the failed upgrade.
Error: Could not upgrade nextcloud: An error occurred inside the app upgrade script
Info: The operation ‘Upgrade the ‘nextcloud’ app’ could not be completed. Please share the full log of this operation
Warning: Here’s an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - + ynh_app_setting_set --app=nextcloud --key=checksum__var_www_nextcloud_config.json --value=7372dcc4d0ca69ea5c9e3db4644c7c29
Info: DEBUG - + local globalapp=nextcloud
Info: DEBUG - + app=nextcloud
Info: DEBUG - + [[ checksum__var_www_nextcloud_config.json =~ (unprotected|protected|skipped)
]]
Info: DEBUG - + ynh_app_setting set nextcloud checksum__var_www_nextcloud_config.json 7372dcc4d0ca69ea5c9e3db4644c7c29
Info: DEBUG - + ‘[’ -n ‘’ ‘]’
Info: DEBUG - + unset backup_file_checksum
Info: DEBUG - + exec_occ app:enable mail
Info: DEBUG - + ‘[’ 25 = last ‘]’
Info: DEBUG - + ‘[’ 25 -ge 15 ‘]’
Info: DEBUG - + NEXTCLOUD_PHP_VERSION=8.0
Info: DEBUG - + cd /var/www/nextcloud
Info: DEBUG - + ynh_exec_as nextcloud php8.0 --define apc.enable_cli=1 occ --no-interaction --no-ansi app:enable mail
Info: DEBUG - + local user=nextcloud
Info: DEBUG - + shift 1
Info: DEBUG - ++ whoami
Info: DEBUG - + [[ nextcloud = root ]]
Info: DEBUG - + sudo -u nextcloud php8.0 --define apc.enable_cli=1 occ --no-interaction --no-ansi app:enable mail
Info: DEBUG - App “Mail” cannot be installed because it is not compatible with this version of the server.
Info: DEBUG - + ynh_exit_properly
Error: The operation ‘Upgrade the ‘nextcloud’ app’ could not be completed. Please share the full log of this operation
root:~#
root:~# yunohost app info nextcloud
description: Online storage, file sharing platform and various other applications
domain_path: mydomain.tld/nextcloud
name: Nextcloud
version: 22.2.7~ynh1
root:~#

COMMENT-3: You need to reboot here your server again [see my recommended method above (the comment number 1)], because going now (after all the above) to your nextcloud (as a user through/by the yunohost nextcloud tile) will produce: internal server error…

NEXT TO DO: fix all the nextcloud applications [within the nextcloud applications handling interface itself] and after that (and reboot) trying the above shenanigans again.

Stay tuned for seeing the result.

SPOILER ALERT(S) FOR COMING SEQUEL:

nextcloud / settings / apps

There are updates available

==> Update all

If you get stuck (with automatic update) then do it by hand one by one from bottom up. Then you will find which one is the problem.

As to mail application: according the log (above) it is not compatible. Remove it from use (in the the nextcloud applications handling interface itself) and also do the actual remove. (in the the nextcloud applications handling interface itself)

If you mess up (I did…) doing something else, then remember: you have the backup of nextcloud in yunohost. You can restore it if nextcloud becomes unresponsive. (You have to remove nextcloud app first to be able to restore it…)

Why all this trouble? Why not just remove old nextcloud and then install the new version from scratch? Well, if you have many users, they might already have data in nextcloud…

Hi JAho,

I got somewhat the same symptoms, also without a resolution so far:

  • Migrate from YNH 4.x to YNH 11
  • Perform pending app upgrades
  • Nextcloud does not want to run, and rolls back to 22.x

There’s a little trick to get more info about the upgrade: Yunohost keeps a detailed, anonymized log of all actions. Each section has a button that posts the whole log to Yunohost, where you can link to it.

Edit: here’s a screenshot of the location and the button:

The log of my failed upgrade is at https://paste.yunohost.org/raw/oqawolaqid

Around timestamp 18.07 there is the cause of my rollback, ‘RedisException’:

2023-01-05 18:07:18,038: DEBUG - An unhandled exception has been thrown:
2023-01-05 18:07:18,039: DEBUG - RedisException: Connection refused in /var/www/nextcloud/lib/private/RedisFactory.php:132
2023-01-05 18:07:18,039: DEBUG - Stack trace:
2023-01-05 18:07:18,039: DEBUG - #0 /var/www/nextcloud/lib/private/RedisFactory.php(132): Redis->pconnect()
2023-01-05 18:07:18,039: DEBUG - #1 /var/www/nextcloud/lib/private/RedisFactory.php(172): OC\RedisFactory->create()
2023-01-05 18:07:18,039: DEBUG - #2 /var/www/nextcloud/lib/private/Memcache/Redis.php(43): OC\RedisFactory->getInstance()
2023-01-05 18:07:18,039: DEBUG - #3 /var/www/nextcloud/lib/private/Memcache/Factory.php(115): OC\Memcache\Redis->__construct()
2023-01-05 18:07:18,039: DEBUG - #4 /var/www/nextcloud/lib/private/Server.php(1074): OC\Memcache\Factory->createLocking()
2023-01-05 18:07:18,040: DEBUG - #5 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}()
2023-01-05 18:07:18,040: DEBUG - #6 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
2023-01-05 18:07:18,040: DEBUG - #7 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet()
2023-01-05 18:07:18,040: DEBUG - #8 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
2023-01-05 18:07:18,040: DEBUG - #9 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
2023-01-05 18:07:18,040: DEBUG - #10 /var/www/nextcloud/lib/private/Server.php(2033): OC\AppFramework\Utility\SimpleContainer->get()
2023-01-05 18:07:18,041: DEBUG - #11 /var/www/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider()
2023-01-05 18:07:18,041: DEBUG - #12 /var/www/nextcloud/lib/private/Server.php(435): OC\Files\View->__construct()
2023-01-05 18:07:18,041: DEBUG - #13 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\Server->OC\{closure}()
2023-01-05 18:07:18,041: DEBUG - #14 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
2023-01-05 18:07:18,041: DEBUG - #15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimple\Container->offsetGet()
2023-01-05 18:07:18,041: DEBUG - #16 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query()
2023-01-05 18:07:18,042: DEBUG - #17 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
2023-01-05 18:07:18,042: DEBUG - #18 /var/www/nextcloud/lib/private/Server.php(1396): OC\AppFramework\Utility\SimpleContainer->get()
2023-01-05 18:07:18,042: DEBUG - #19 /var/www/nextcloud/lib/base.php(594): OC\Server->boot()
2023-01-05 18:07:18,042: DEBUG - #20 /var/www/nextcloud/lib/base.php(1091): OC::init()
2023-01-05 18:07:18,042: DEBUG - #21 /var/www/nextcloud/console.php(48): require_once('...')
2023-01-05 18:07:18,042: DEBUG - #22 /var/www/nextcloud/occ(11): require_once('...')
2023-01-05 18:07:18,051: DEBUG - #23 {main}+ ynh_exit_properly
2023-01-05 18:07:18,555: DEBUG - + ynh_clean_setup
2023-01-05 18:07:18,555: DEBUG - + ynh_restore_upgradebackup
2023-01-05 18:07:18,556: DEBUG - + ynh_print_err '--message=Upgrade failed.'
2023-01-05 18:07:18,569: DEBUG - + ynh_print_log '[Error] Upgrade failed.'
2023-01-05 18:07:18,570: DEBUG - + echo -e '[Error] Upgrade failed.'
2023-01-05 18:07:18,570: DEBUG - + local app_bck=nextcloud
2023-01-05 18:07:18,570: DEBUG - + NO_BACKUP_UPGRADE=0
2023-01-05 18:07:18,571: DEBUG - + ynh_backup_archive_exists nextcloud-pre-upgrade1
2023-01-05 18:07:18,572: WARNING - [Error] Upgrade failed.
2023-01-05 18:07:18,573: DEBUG - + yunohost backup list --output-as json --quiet
2023-01-05 18:07:18,573: DEBUG - + jq -e --arg archive nextcloud-pre-upgrade1 '.archives | index($archive)'
2023-01-05 18:07:18,872: DEBUG - + yunohost app remove nextcloud
2023-01-05 18:07:19,167: DEBUG - Removing nextcloud...

Is the same error to be seen in your log?

Edit: my upgrade was completed successfully after setting read-only config to false; this is how it now looks like:

# cat  /var/www/nextcloud/config/config.php |grep only
  'config_is_read_only' => false,

ACTIVITIES NEEDED BEFORE THE NEXTCLOUD UPGRADE

Check that when in: https://yourdomain.tld/nextcloud/settings/apps there are no update(s) (available) blue buttons. [Note: you must be logged in to yunohost as the nextcloud admin user, after which you can then enter nextcloud through/by the yunohost nextcloud tile.]

Make the updates so that everything is “white”

As to mail application: according the log (above) it is not compatible. Stop it from use [a button to press](in the the nextcloud applications handling interface itself) and then also do the actual remove. [a second button to press] (in the the nextcloud applications handling interface itself)

Then logout (number-1) of yunohost [close your browser too] and do (gentle) reboot to your server. Wait for (at least) 5 minutes so that your server has completely rebooted.

[ssh-command/CLI => root:~# shutdown -r +3 Shutting down in 3 minutes! ]

After that check that you can log in to yunohost and that there: you can enter in to nextcloud through/by nextcloud tile. Why? The settings you have now will become the nextcloud backup when you do the CLI stuff (upgrade nextcloud) below.

Log out (number-2) of yunohost and close the browser. {Yes, this is a logout again, hence the number-2)

And now you will do the following CLI stuff.

THE CLI OUTPUT SHOWS:

Last login: Fri Jan 6 11:00:49 2023
root:~#
root:~# timedatectl
Local time: Fri 2023-01-06 11:10:20 CET
Universal time: Fri 2023-01-06 10:10:20 UTC
RTC time: Fri 2023-01-06 10:10:20
Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: no
root:~#
root:~# yunohost app upgrade nextcloud
Info: Now upgrading nextcloud…
Info: […] > Loading installation settings…
Info: [+…] > Ensuring downward compatibility…
Info: [#+++++++++…] > Backing up the app before upgrading (may take a while)…
Info: [##########++…] > Upgrading dependencies…
Info: [############…] > Making sure dedicated system user exists…
Info: [############…] > Upgrading PHP-FPM configuration…
Info: [############+…] > Upgrading NGINX web server configuration…
Info: The service nginx has correctly executed the action reload-or-restart.
Info: [#############+…] > Upgrading Nextcloud…
Info: Upgrade to nextcloud 23.0.0
Info: ‘/tmp/tmp.cmosFJPfLl’ wasn’t deleted because it doesn’t exist.
Warning: Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Starting …
Warning: 0/0 [>---------------------------] 0% Starting …
Warning: 0/0 [->--------------------------] 0% Starting …
Warning: 0/0 [—>------------------------] 0%
Warning: Starting …
Warning: 1/0 [----->----------------------] 0% Starting …
Warning: 0/0 [------->--------------------] 0%
Warning: Starting …
Info: Upgrade to nextcloud 24.0.0
Info: ‘/tmp/tmp.tlPTd47utQ’ wasn’t deleted because it doesn’t exist.
Warning: 4/0 [--------->------------------] 0%Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Starting …
Warning: 0/0 [>---------------------------] 0% Starting …
Warning: 0/0 [->--------------------------] 0% Starting …
Warning: 0/0 [—>------------------------] 0%
Warning: Starting …
Warning: 1/0 [----->----------------------] 0% Starting …
Warning: 0/0 [------->--------------------] 0%
Warning: Starting …
Info: Upgrade to nextcloud 25.0.0
Info: ‘/tmp/tmp.WAoBG7nsN5’ wasn’t deleted because it doesn’t exist.
Warning: 4/0 [--------->------------------] 0%Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Starting …
Warning: 0/0 [>---------------------------] 0% Starting …
Warning: 0/0 [->--------------------------] 0% Starting …
Warning: 0/0 [—>------------------------] 0%
Warning: Starting …
Warning: 5/0 [----->----------------------] 0% Starting …
Warning: 0/0 [------->--------------------] 0% Starting …
Warning: 0/0 [--------->------------------] 0% Starting …
Warning: 0/0 [----------->----------------] 0%
Warning: Starting …
Info: Upgrade to nextcloud 25.0.2
Info: ‘/tmp/tmp.o2DwCDnJkr’ wasn’t deleted because it doesn’t exist.
Warning: 6/0 [------------->--------------] 0%Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Nextcloud or one of the apps require upgrade - only a limited number of commands are available
Warning: You may use your browser or the occ upgrade command to do the upgrade
Warning: Starting …
Warning: 0/0 [>---------------------------] 0% Starting …
Warning: 0/1 [>---------------------------] 0%
Warning: Starting …
Info: [##############+++…] > Reconfiguring Nextcloud…
Warning: 1/1 [============================] 100%File /var/www/nextcloud/config/config.php has been manually modified since the installation or last upgrade. So it has been duplicated in /var/cache/yunohost/appconfbackup//var/www/nextcloud/config/config.php.backup.20230106.112447
Warning: Note that if you’ve installed some third-parties Nextcloud applications, they are probably disabled and you’ll have to manually enable them again.
Info: [#################…] > Upgrading logrotate configuration…
Info: [#################++.] > Reconfiguring Fail2Ban…
Info: The service fail2ban has correctly executed the action reload-or-restart.
Info: [###################.] > Reloading NGINX web server and PHP-FPM…
Info: [####################] > Upgrade of nextcloud completed
Success! nextcloud upgraded
Success! Upgrade complete
root:~#
root:~# timedatectl
Local time: Fri 2023-01-06 11:26:32 CET
Universal time: Fri 2023-01-06 10:26:32 UTC
RTC time: Fri 2023-01-06 10:26:32
Time zone: Europe/Paris (CET, +0100)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: no
root:~#
root:~# shutdown -r +3 Shutting down in 3 minutes!
Reboot scheduled for Fri 2023-01-06 11:29:49 CET, use ‘shutdown -c’ to cancel.
root@:~#

IN SUMMARY:

  • The whole shebang of upgrading nextcloud from 22.2.7~ynh1 TO 25.0.2~ynh1 takes appr 22+ minutes (a 5-minutes reboot included) in a relatively modest dedicated bare-metal server.
  • In general: all applications should be updated (within nextcloud) before doing actual nextcloud update.
  • The old mail-application in 22.2.7~ynh1 must be removed (or maybe disabled is enough?) before nextcloud update
  • A new compatible mail-application (in my case seemed to be: version 2.2.2) in 25.0.2~ynh1 needs to be loaded and taken into use after the nextcloud update.

A SPECIAL NOTE:

While the above summary applies to anybody making nextcloud update from 22.2.7~ynh1 TO 25.0.2~ynh1 there might be also specific circumstances. In my special case the full solution needs also the previous activities (with Aleks) in this topic. See above items/conversations.

[And thus the quest was completed and the hero(es) reap the great reward…]

I had no need to look that. The CLI info and warnings were enough.

But yes, that log-facility is great. Especially if more accurate error hunting/sniffing is needed.

So the logs of all my attempts are available in the way you described, but in this situation I decided not show my users usernames unnecessarily for all to see.

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