Upgrade to Nextcloud 31.0.4 failed - Nextcloud removed

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 12.0.14
What app is this about: Nextcloud

Describe your issue

Upgrade of Nextcloud from 30.0.8~ynh1 to 31.0.4~ynh2 failed.
It seems because Maps Nextcloud application is not compatible with Nextcloud 31. - See Log

Restore from backup is failing as well (due to Systemctl error with PHPFM 8.3). See 2nd log.
Nextcloud was completely removed from the server, so I tried to install it from the pre-upgrade backup, however it fails as well (due to the PHP error), and now I have half installed Nextcloud. I can see it in the list of apps, but access rights to it has not been set…

What can I do to restore at least the old version ?
I’m trying to see how to fix the PHP error to have a correct backup back:

ā€˜ā€™ā€™ Job for php8.3-fpm.service failed because the control process exited with error code.
2025-04-19 17:18:47,753: WARNING - See ā€œsystemctl status php8.3-fpm.serviceā€ and ā€œjournalctl -xeu php8.3-fpm.serviceā€ for details.
2025-04-19 17:18:47,755: WARNING - invoke-rc.d: initscript php8.3-fpm, action ā€œrestartā€ failed.
2025-04-19 17:18:47,771: DEBUG - * php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager
2025-04-19 17:18:47,771: DEBUG - Loaded: loaded (/lib/systemd/system/php8.3-fpm.service; enabled; preset: enabled)
2025-04-19 17:18:47,771: DEBUG - Active: activating (auto-restart) (Result: exit-code) since Sat 2025-04-19 17:18:47 CEST; 8ms ago
2025-04-19 17:18:47,771: DEBUG - Docs: man:php-fpm8.3(8)
2025-04-19 17:18:47,771: DEBUG - Process: 9571 ExecStart=/usr/sbin/php-fpm8.3 --nodaemonize --fpm-config /etc/php/8.3/fpm/php-fpm.conf (code=exited, status=78)
2025-04-19 17:18:47,771: DEBUG - Process: 9572 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/8.3/fpm/pool.d/www.conf 83 (code=exited, status=0/SUCCESS)
2025-04-19 17:18:47,771: DEBUG - Main PID: 9571 (code=exited, status=78)
2025-04-19 17:18:47,771: DEBUG - CPU: 76ms
2025-04-19 17:18:47,772: WARNING - dpkg: error processing package php8.3-fpm (–configure):ā€˜ā€™ā€™

Share relevant logs or error messages

Log for failed upgrade: https://paste.yunohost.org/raw/anemonomet
Log for failed restore: https://paste.yunohost.org/raw/pemewukuji

Some updates, running
journalctl -xeu php8.3-fpm.service

shows the nextcloud user is not there anymore
ā€œApr 19 17:46:07 collinfr.net php-fpm8.3[11650]: [19-Apr-2025 17:46:07] ALERT: [pool nextcloud] user has not been definedā€

I guess that’s because nextcloud have been completely removed after the failed upgrade

It seems a error about the version of php8.3-fpm

It seems the service still try to restart… Does a service nextcloud is running ? Try

Perhaps you can remane temporaly the service file /etc/php/8.3/pool.d/nextcloud.conf

mv /etc/php/8.3/pool.d/nextcloud.conf /etc/php/8.3/pool.d/nextcloud.conf_ORI

or move it in another place, and try again a restore ?? In the log the dpkg of php8.3-fpm could not configure the module…

Hello,
Take a look in the following folders:

/var/www/
/home/yunohost.app
/etc/yunohost/apps

and start by making a backup of your data folder

/home/yunohost.app/nextcloud/data  

if it is still present.

Found that Monitorix, a small monitoring application, was creating it’s php-fpm config referencing other php-fpm configs:

root@collinfr:/etc/php/8.3/fpm/pool.d# cat monitorix_status.conf


; Auto generated config for Monitorix monitoring
[matomo]
pm.status_listen = /var/run/php/php8.3-fpm-matomo-monitorix-status.sock
pm.status_path = /php-pool-status/php8.3-fpm-matomo

; Auto generated config for Monitorix monitoring
[nextcloud]
pm.status_listen = /var/run/php/php8.3-fpm-nextcloud-monitorix-status.sock
pm.status_path = /php-pool-status/php8.3-fpm-nextcloud

; Auto generated config for Monitorix monitoring
[www]
pm.status_listen = /var/run/php/php8.3-fpm-www-monitorix-status.sock
pm.status_path = /php-pool-status/php8.3-fpm-www

Hence, when Nextcloud was removed because of the failed upgrade, it just kept this reference to nextcloud config, and prevented php-fpm from starting, thus preventing the restore from happening.

Now trying again… Crossing fingers !

Hi, same problem happened to me. Nextcloud update to 31.0.4 failed.

The update log:
https://paste.yunohost.org/raw/upiruduzem

The following lines from the log are the main reason of failure I think.

2025-04-19 22:23:17,776: 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 --fix-broken
2025-04-19 22:23:24,997: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-common_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,004: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-opcache_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,011: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-readline_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,019: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-cli_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,024: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-phpdbg_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,031: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-fpm_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,038: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php-apcu/php8.2-apcu_5.1.24-1%2b0%7e20250407.42%2bdebian12%7e1.gbp5f79ec_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,044: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php-igbinary/php8.2-igbinary_3.2.16-4%2b0%7e20250408.53%2bdebian12%7e1.gbpef518d_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,051: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php-imagick/php8.2-imagick_3.8.0-1%2b0%7e20250418.51%2bdebian12%7e1.gbpab6fa0_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,057: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php-redis/php8.2-redis_6.2.0-1%2b0%7e20250408.63%2bdebian12%7e1.gbp272b23_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,063: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_all.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,070: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-bcmath_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,075: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-bz2_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,080: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-curl_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,086: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-gd_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,093: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-gmp_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,099: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-imap_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,106: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-intl_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,112: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-ldap_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,118: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-mbstring_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,124: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-mysql_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,131: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-sqlite3_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,138: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-xml_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,145: WARNING - E: Failed to fetch https://packages.sury.org/php/pool/main/p/php8.2/php8.2-zip_8.2.28-1%2b0%7e20250313.73%2bdebian12%7e1.gbp0da9cd_amd64.deb  418  I'm a teapot [IP: 146.75.123.52 443]
2025-04-19 22:23:25,150: WARNING - E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

yes you seem have a problem with php dependencies…

Can you try this ?

yunohost tools regen-conf apt --dry-run --with-diff
1 Like

Thank you @rodinux, that did the trick. It successfuly updated after issuing that command.

do you have do this after ? I mean my command show only if there is changes to apply…

yunohost tools regen-conf apt --force

Oops! No, I haven’t executed yunohost tools regen-conf apt --force this one after the first command. Also the first command did not output anything. But even so, after the first command it did updated the Nextcloud successfuly.

If the command did not return nothing is not necessary. Cool If you update successfuly.

I got Nextcloud back.
Just removed monitorix, then php8.3-fpm worked again, then restored nextcloud.

First time it blocked at restoring database, the second time (in command line through screened console) worked well.

Thanks, just hope that will help someone: Monitorix can screw up your php installation in some cases !

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