Nextcloud doesn't run after unsuccessful upgrade

What app is this about, and its version: Nextcloud 32.0.6~ynh2
What YunoHost version are you running: 12.1.39
What type of hardware are you using: VPS bought online

Describe your issue

I tried to upgrade Nextcloud from version 32.0.6~ynh2 to 33.0.2~ynh1. This was broken with an internal server error message. See below 1. the log file.

Now, Nextcloud is not running with the message 2., see below. Under Tools/Services, there isn’t a Nextcloud service, though.

My main goal atm is to run Nextcloud again at whatever version.

Thank your for any help!

Share relevant logs or error messages

  1. https://paste.yunohost.org/raw/runopufate
  2. 502 Bad Gateway

If you see this page, your connection with the server is working but the internal service providing this path is not responding.
Administrator, make sure that the service is running, and check its logs if it is not. The Services page is in your webadmin, under Tools > Services.

Hello @matalb
Follow the first step (update signing keys)

I tried that proposal. But the proposed command to check

sudo apt update

ran with errors:

Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease                          
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease                  
Hit:4 https://packages.sury.org/php bookworm InRelease                         
Hit:6 https://dl.yarnpkg.com/debian stable InRelease                           
Get:7 http://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_12  InRelease [1,574 B]
Hit:5 https://forge.yunohost.org/debian bookworm InRelease  
Err:7 http://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_12  InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E456AE72856D1476
Fetched 1,574 B in 1s (2,378 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
70 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_12  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E456AE72856D1476
W: Failed to fetch http://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_12/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E456AE72856D1476
W: Some index files failed to download. They have been ignored, or old ones used instead

Yes :

As I wrote, I followed that linked page Yarn and Sury APT keys issues, without success.

To be clear, I did

sudo rm /etc/apt/trusted.gpg.d/{yarn,extra_php_version}.gpg
sudo yunohost tools regen-conf apt

Both commands completed without error messages.

Then,

To check that the fix is working, re-run the search of updates:

sudo apt update

produced this output, similar to that I mentioned above:

Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease                          
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease                  
Hit:4 https://packages.sury.org/php bookworm InRelease                         
Get:5 http://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_12  InRelease [1,574 B]
Hit:6 https://dl.yarnpkg.com/debian stable InRelease                           
Err:5 http://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_12  InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E456AE72856D1476
Hit:7 https://forge.yunohost.org/debian bookworm InRelease  
Fetched 1,574 B in 5s (292 B/s)                             
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
70 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_12  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E456AE72856D1476
W: Failed to fetch http://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_12/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E456AE72856D1476
W: Some index files failed to download. They have been ignored, or old ones used instead.

That doesn’t seem to be errorfree.

This is an other extra repo : could you share the output of ls -la /etc/apt/sources.list.d/ ?

total 24
drwxr-xr-x 2 root root 4096 Apr  4  2025 .
drwxr-xr-x 9 root root 4096 Mar  7  2025 ..
-rw-rw-rw- 1 root root   85 Apr  4  2025 crystal.list
-rw-r--r-- 1 root root  106 Mar  7  2025 extra_php_version.list
-rw-r--r-- 1 root root   91 Mar  7  2025 yarn.list
-rw-r--r-- 1 root root  108 Mar  7  2025 yunohost.list

then: cat /etc/apt/sources.list.d/crystal.list.
Do you remember why this extra repo has been added ?

deb http://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_12/ /

I cannot remember to have added any repo. I usually use just the web admin gui.

Did you install invidious ?
You can temporary comment this line and retry the upgrade.

#deb http://download.opensuse.org/repositories/devel:/languages:/crystal/Debian_12/ /

OK, now the error when upgrading Nextcloud is different:

 ERROR - Failed to collect files to backed up for nextcloud.

See

https://paste.yunohost.org/raw/omunolotec

Check if there is no incompatible app with nextcloud 33 (step 2) and then you can follow step 3.

Do you mean Nextcloud apps? How could I check that via SSH?

cf step 2

I couldn’t check any Nextcloud apps since they are too many.

Instead, I upgraded Nextcloud without backup as step 3:

yunohost app upgrade nextcloud -b

This showed a single incompatible Nextcloud app: ```workflow_kitinerary``` (airc). Now I did:

yunohost app shell nextcloud
php occ app:disable workflow_kitinerary

Then I managed to upgrade successfully:

yunohost app upgrade nextcloud -b

Now Nextcloud 33 is running.

I consider this as the solution only after the next time Nextcloud is updated normally with backup.

You can run a force upgrade with backup from the webadmin

Glad to help you…

Thank you very much for your quick and good help!

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