Nextcloud update 1.7.1 failed

NethServer Version: Rocky 9.8
Module: nextcloud

Fired off the update from 1.6.1 to 1.7.1.

Waited the typical amount of time, waited some more. After about 30 minutes I started poking around.

Nextcloud webpage, always “bad gateway” as expected. Normally after 10 or 15 minutes I’ll get the maintenance on msg on the webpage, not this time.

This error line in the nethserver log ui seems like an issue.


2026-06-12T11:14:09-07:00 [1:nextcloud1:podman] Error: looking up container "nextcloud-app" for volumes-from: no container with name or ID "nextcloud-app" found: no such container

Yet the nethserver admin page under applications clearly shows the Nextcloud app has finished its update showing itself at 1.7.1.

Anyone have any ideas? I’ve already rolled back the snapshot so I can offer nothing more than seen below.

More logs;

2026-06-12T11:14:06-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (56)
2026-06-12T11:14:07-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (57)
2026-06-12T11:14:08-07:00 [1:nextcloud1:systemd] nextcloud-app.service: start-post operation timed out. Terminating.
2026-06-12T11:14:08-07:00 [1:nextcloud1:systemd] nextcloud-app.service: Control process exited, code=killed, status=15/TERM
2026-06-12T11:14:08-07:00 [1:nextcloud1:nextcloud-app] [12-Jun-2026 18:14:08] NOTICE: Terminating ...
2026-06-12T11:14:08-07:00 [1:nextcloud1:nextcloud-app] [12-Jun-2026 18:14:08] NOTICE: exiting, bye-bye!
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] libpod-5ffdff832646f5cdd9a893707b6b8edea26283af3566f28ac6ea369c9c2100e9.scope: Consumed 15.315s CPU time.
2026-06-12T11:14:09-07:00 [1:nextcloud1:podman] 5ffdff832646f5cdd9a893707b6b8edea26283af3566f28ac6ea369c9c2100e9
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] nextcloud-app.service: Failed with result 'timeout'.
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] Failed to start Podman nextcloud-app.service.
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] nextcloud-app.service: Consumed 7.338s CPU time.
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] Starting Podman nextcloud-nginx.service...
2026-06-12T11:14:09-07:00 [1:nextcloud1:podman] Error: looking up container "nextcloud-app" for volumes-from: no container with name or ID "nextcloud-app" found: no such container
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] nextcloud-nginx.service: Control process exited, code=exited, status=125/n/a
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] nextcloud-nginx.service: Failed with result 'exit-code'.
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] Failed to start Podman nextcloud-nginx.service.
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] nextcloud-app.service: Scheduled restart job, restart counter is at 11.
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] Stopped Podman nextcloud-app.service.
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] nextcloud-app.service: Consumed 7.338s CPU time.
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] Starting Podman nextcloud-app.service...
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] nextcloud-nginx.service: Scheduled restart job, restart counter is at 13.
2026-06-12T11:14:09-07:00 [1:nextcloud1:systemd] Stopped Podman nextcloud-nginx.service.
2026-06-12T11:14:10-07:00 [1:nextcloud1:systemd] Started libcrun container.
2026-06-12T11:14:10-07:00 [1::kernel] xfs filesystem being remounted at /home/nextcloud1/.local/share/containers/storage/overlay/76bd311e89cc2f2f68f083feff0fc6402275a7211ac298fc7ae558eaf0e718de/merged/var/www/html supports timestamps until 2038 (0x7fffffff)
2026-06-12T11:14:10-07:00 [1::kernel] xfs filesystem being remounted at /home/nextcloud1/.local/share/containers/storage/overlay/76bd311e89cc2f2f68f083feff0fc6402275a7211ac298fc7ae558eaf0e718de/merged/usr/local/etc/php-fpm.d/zzz_nethserver.conf supports timestamps until 2038 (0x7fffffff)
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] => Configuring PHP session handler...
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] ==> Using Redis as PHP session handler...
2026-06-12T11:14:10-07:00 [1:nextcloud1:podman] 75e12f8d7bf271843e6dccff53d39c117a9e658e4d69b9ed7b787040d7278c50
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] Warning: /var/www/html/config/apcu.config.php differs from the latest version of this image at /usr/src/nextcloud/config/apcu.config.php
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] Warning: /var/www/html/config/apps.config.php differs from the latest version of this image at /usr/src/nextcloud/config/apps.config.php
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] Warning: /var/www/html/config/ns.config.php differs from the latest version of this image at /usr/src/nextcloud/config/ns.config.php
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] Warning: /var/www/html/config/redis.config.php differs from the latest version of this image at /usr/src/nextcloud/config/redis.config.php
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] Warning: /var/www/html/config/reverse-proxy.config.php differs from the latest version of this image at /usr/src/nextcloud/config/reverse-proxy.config.php
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] Warning: /var/www/html/config/s3.config.php differs from the latest version of this image at /usr/src/nextcloud/config/s3.config.php
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] Warning: /var/www/html/config/smtp.config.php differs from the latest version of this image at /usr/src/nextcloud/config/smtp.config.php
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] Warning: /var/www/html/config/swift.config.php differs from the latest version of this image at /usr/src/nextcloud/config/swift.config.php
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] Warning: /var/www/html/config/upgrade-disable-web.config.php differs from the latest version of this image at /usr/src/nextcloud/config/upgrade-disable-web.config.php
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] => Searching for hook scripts (*.sh) to run, located in the folder "/docker-entrypoint-hooks.d/before-starting"
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] ==> Skipped: the "before-starting" folder is empty (or does not exist)
2026-06-12T11:14:10-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (1)
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] 2026-06-12 18:14:10,814 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2026-06-12T11:14:10-07:00 [1:nextcloud1:nextcloud-app] 2026-06-12 18:14:10,814 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2026-06-12T11:14:11-07:00 [1::systemd] Created slice User Background Tasks Slice.
2026-06-12T11:14:11-07:00 [1::systemd] Starting Cleanup of User's Temporary Files and Directories...
2026-06-12T11:14:11-07:00 [1::systemd] Finished Cleanup of User's Temporary Files and Directories.
2026-06-12T11:14:11-07:00 [1:nextcloud1:nextcloud-app] crond: crond (busybox 1.37.0) started, log level 8
2026-06-12T11:14:11-07:00 [1:nextcloud1:nextcloud-app] [12-Jun-2026 18:14:11] NOTICE: fpm is running, pid 51
2026-06-12T11:14:11-07:00 [1:nextcloud1:nextcloud-app] [12-Jun-2026 18:14:11] NOTICE: ready to handle connections
2026-06-12T11:14:12-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (2)
2026-06-12T11:14:13-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (3)
2026-06-12T11:14:15-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (4)
2026-06-12T11:14:16-07:00 [1:traefik1:traefik] 192.168.23.122 - - [12/Jun/2026:18:14:16 +0000] "GET /nextcloud/index.php/204 HTTP/2.0" 499 21 "-" "-" 1061 "my-nextcloud-https@file" "http://127.0.0.1:20000" 0ms
2026-06-12T11:14:16-07:00 [1:traefik1:traefik] 192.168.23.122 - - [12/Jun/2026:18:14:16 +0000] "GET /nextcloud/index.php/204 HTTP/2.0" 502 11 "-" "-" 1062 "my-nextcloud-https@file" "http://127.0.0.1:20000" 186ms
2026-06-12T11:14:16-07:00 [1:traefik1:traefik] 192.168.23.122 - - [12/Jun/2026:18:14:16 +0000] "GET /nextcloud/status.php HTTP/2.0" 502 11 "-" "-" 1063 "my-nextcloud-https@file" "http://127.0.0.1:20000" 186ms
2026-06-12T11:14:16-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (5)
2026-06-12T11:14:18-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (6)
2026-06-12T11:14:19-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (7)
2026-06-12T11:14:21-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (8)
2026-06-12T11:14:22-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (9)
2026-06-12T11:14:24-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (10)
2026-06-12T11:14:25-07:00 [1:traefik1:traefik] 192.168.23.122 - - [12/Jun/2026:18:14:25 +0000] "GET /settings/admin/overview HTTP/2.0" 502 11 "-" "-" 1064 "nextcloud1-https@file" "http://127.0.0.1:20000" 185ms
2026-06-12T11:14:26-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (11)
2026-06-12T11:14:26-07:00 [1:traefik1:traefik] 192.168.23.122 - - [12/Jun/2026:18:14:26 +0000] "GET /index.php/apps/files/preview-service-worker.js HTTP/2.0" 502 11 "-" "-" 1065 "nextcloud1-https@file" "http://127.0.0.1:20000" 185ms
2026-06-12T11:14:27-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (12)
2026-06-12T11:14:29-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (13)
2026-06-12T11:14:31-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (14)
2026-06-12T11:14:32-07:00 [1:traefik1:traefik] 192.168.23.122 - - [12/Jun/2026:18:14:32 +0000] "GET /index.php/204 HTTP/2.0" 502 11 "-" "-" 1066 "nextcloud1-https@file" "http://127.0.0.1:20000" 190ms
2026-06-12T11:14:32-07:00 [1:traefik1:traefik] 192.168.23.122 - - [12/Jun/2026:18:14:32 +0000] "GET /index.php/204 HTTP/2.0" 502 11 "-" "-" 1067 "nextcloud1-https@file" "http://127.0.0.1:20000" 190ms
2026-06-12T11:14:32-07:00 [1:traefik1:traefik] 192.168.23.122 - - [12/Jun/2026:18:14:32 +0000] "GET /status.php HTTP/2.0" 502 11 "-" "-" 1068 "nextcloud1-https@file" "http://127.0.0.1:20000" 186ms
2026-06-12T11:14:32-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (15)
2026-06-12T11:14:34-07:00 [1:nextcloud1:runagent] wait-startup: waiting for nextcloud-app (16)

2 Likes

Same here. Same Rocky version, same behavior after updating nc from 1.6.1 to 1.7.1.

From the log:

2026-06-13T12:33:33+02:00 [7:nextcloud1:podman] Error: looking up container "nextcloud-app" for volumes-from: no container with name or ID "nextcloud-app" found: no such container

What i did, with help of AI (Please note: i made a backup and Snapshot before):

1. Force Nextcloud Maintenance Repair

runagent -m nextcloud1 podman exec --user www-data nextcloud-app php occ maintenance:repair

2. Complete Pending Nextcloud Upgrades

runagent -m nextcloud1 podman exec --user www-data nextcloud-app php occ upgrade

3. Disable Maintenance Mode

runagent -m nextcloud1 podman exec --user www-data nextcloud-app php occ maintenance:mode --off

4. Restart the Nextcloud Stack

runagent -m nextcloud1 systemctl --user restart nextcloud.service

It is running again. All data are available.

I’m not sure if all commands are needed, in the end it is running again.

4 Likes

That error surfaces every now and then while upgrading nextcloud, the modules have to be updated too. Shouldn’t this be automated and be part of the upgrade process ?

2 Likes

First of all, thank you everyone for the reports, the logs, and the time spent investigating this issue. It is very helpful.

From a technical point of view, this kind of upgrade problem is often caused by an additional app/plugin installed from the Nextcloud marketplace, so the first step would be to identify whether a third-party app is involved.

Of course, we are not against making the upgrade process more robust and improving error handling where possible. However, with a standard installation — for example Nextcloud + Collabora only — we have not been able to reproduce or identify a specific issue so far.

If we can identify a common plugin or customization involved in these failures, that would probably help us understand the root cause much faster.

3 Likes

I only use some additional modules from the regular app store, “Featured” or not :

Just tried to update to 1.7.1 (without updating the modules) : unsurprisingly I had to do an occ upgrade.

For the record, I stumbled upon a nasty problem involving foreign keys while upgrading mail :

Exception: Foreign key name "FK_61A7E87F7587D725" for table "oc_mail_accounts" collides with the constraint on table "oc_mail_accounts"
Update failed

I had to drop all the foreign keys to get rid of this error, they were recreated by the upgrade

ALTER TABLE oc_mail_accounts 
  DROP FOREIGN KEY FK_61A7E87F1FA4CF4D,
  DROP FOREIGN KEY FK_61A7E87F59A77CDC,
  DROP FOREIGN KEY FK_61A7E87F7587D725,
  DROP FOREIGN KEY FK_61A7E87F75F54A4B,
  DROP FOREIGN KEY FK_61A7E87FA47FE329;

That shows that nextcloud upgrades are never easy. However automating occ upgrade should not harm since the user will need to do it anyway.

Just updated another instance with those modules waiting for an upgrade :

Again occ update needed, this time it ran without an hiccup. After occ maintenance:mode --off everything is up and running.

1 Like

after the upgrade, your service was up or down, or only you saw that the maintenance mode is enabled ?

service down (Traefik message : bad gateway)

1 Like

what was the way you did it, from what you saw to the end, can you help us to understand, write here all the command, how you restart the service and how you did the full occ upgrade, check history of cli

I simply started the upgrade from the admin console.
Then

runagent -m nextcloud2
occ upgrade 
occ maintenance:mode --off

Nothing more. It has become quite a routine task for me.

so it was not a service down, the service was up

mmh ok, I meant that the module was entirely down.

Thanks for the clarification. From your description, it sounds like the service was up when the upgrade was started from the admin interface, and then Nextcloud entered maintenance mode as part of the upgrade process, which is normally expected.

In cases like this, one possible cause is often an additional app/plugin from the marketplace or a specific customization, so identifying that part could help explain the failure.

From my perspective I see that the upgrade is simply not completed. For me occ upgrade is part of the upgrade process even with few apps. Mail looks the usual suspect, which is a “featured app”.

If you do no want to automate it maybe documenting the issue by displaying a dlg during the upgrade process or adding a manual app upgrade button available might help.

That “nextcloud stuck in maintenance mode” issue is so common…

1 Like

Thanks for your feedback.
I have in mind a couple of improvements around this kind of situation.

One point is better handling of migration and multi-step upgrade issues, especially in cases where an upgrade is not fully completed and the administrator clicks the Update button again.

Another idea would be to provide a dedicated button or recovery action to run occ upgrade safely when the service is already in maintenance mode.

I think these changes could make the upgrade process more robust and help recover more easily from incomplete upgrade states.

1 Like
1 Like

that was fast :slight_smile:

1 Like