Nextcloud fails to start after upgrade to 24.10 from 24.04

Was upgrading to get things in order for the upgrade to 25.x as soon as the VM migration is good for production.

Every other application migrated to 24.10, except Nextcloud.

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 509, in run
await self.future
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 556, in __run_body
rv = await self.middleware.run_in_thread(self.method, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1367, in run_in_thread
return await self.run_in_executor(io_thread_pool_executor, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1364, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/service/crud_service.py”, line 268, in nf
rv = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/schema/processor.py”, line 55, in nf
res = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/schema/processor.py”, line 183, in nf
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py”, line 287, in do_update
app = self.update_internal(job, app, data, trigger_compose=app[‘state’] != ‘STOPPED’)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py”, line 325, in update_internal
compose_action(app_name, app[‘version’], ‘up’, force_recreate=True, remove_orphans=True)
File “/usr/lib/python3/dist-packages/middlewared/plugins/apps/compose_utils.py”, line 61, in compose_action
raise CallError(err_msg)
middlewared.service_exception.CallError: [EFAULT] Failed ‘up’ action for ‘nextcloud’ app. Please check /var/log/app_lifecycle.log for more details

In the log I see this:

nextcloud Pulling
nextcloud Warning pull access denied for ix-nextcloud, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied
7cf63256a31a Already exists
b55ba9745e01 Pulling fs layer
11372330074b Pulling fs layer
919676db205d Pulling fs layer
60f818b87cd6 Pulling fs layer
1ec1fbb77f7f Pulling fs layer
8079f7495e52 Pulling fs layer
a86ce62f613d Pulling fs layer
60f818b87cd6 Waiting
0c0913c89d51 Pulling fs layer
319ff97e19ea Pulling fs layer
1ec1fbb77f7f Waiting
8079f7495e52 Waiting
a86ce62f613d Waiting
0c0913c89d51 Waiting
b5fa5f106da6 Pulling fs layer
206b5b997219 Pulling fs layer
319ff97e19ea Waiting
832c745af0c4 Pulling fs layer
1689a55138b2 Pulling fs layer
b5fa5f106da6 Waiting
206b5b997219 Waiting
832c745af0c4 Waiting
1689a55138b2 Waiting
03844d1a11cc Pulling fs layer
3577b2071b8b Pulling fs layer
4f4fb700ef54 Pulling fs layer
83e0a893becc Pulling fs layer
59095223d76f Pulling fs layer
91f229187c70 Pulling fs layer
03844d1a11cc Waiting
3577b2071b8b Waiting
4f4fb700ef54 Waiting
59095223d76f Waiting
83e0a893becc Waiting
91f229187c70 Waiting
69692152171a Pulling fs layer
a31b993d5cc6 Pulling fs layer
f65921886500 Pulling fs layer
b9c1a94e4ca8 Pulling fs layer
435dd99ceb68 Pulling fs layer

Run this on truenas host first.
Then restart the app

sudo docker pull nextcloud:31.0.5
1 Like

admin@emgplex[~]$ sudo docker pull nextcloud:31.0.5
[sudo] password for admin:
31.0.5: Pulling from library/nextcloud
61320b01ae5e: Already exists
82ff4e528452: Already exists
ede17ea19b1a: Already exists
7efe273df923: Already exists
1a4d14161c76: Already exists
4f9f091f3dbb: Already exists
19ad1b79a553: Already exists
a0a05f9f2c31: Already exists
a7385e817262: Already exists
4bb0db1ed3ca: Already exists
291b5d656047: Already exists
b91f1574d2c4: Already exists
9242b0c7ae99: Already exists
4f4fb700ef54: Already exists
e34723e57b9c: Already exists
fa38a34f6851: Already exists
19f4e87b6e40: Already exists
4913ac7657c0: Already exists
c0023d99f1cb: Already exists
45e6e8cb393e: Already exists
83138f1f6e9a: Already exists
7a9b4ef55717: Already exists
Digest: sha256:3f71577339ef1db0d1900c8574853d11fa7100452bf24f0a06fae5d9ee019cb4
Status: Downloaded newer image for nextcloud:31.0.5

Install completes, but, postgres fails

Error while trying to create admin account: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at “postgres” (172.16.4.3), port 5432 failed: FATAL: database “nextcloud” does not exist

I get to the nextcloud login where you enter the admin creds to create the admin account and the postgres SQL fails.

gs

Set font size:

Reconnect

Application Name:nextcloudContainer ID:b4fe1fda4f3493f400007ac0241a104c7f14edb4ba9b8d342e5e83bd22894f55

2025-06-02 17:12:42.149362+00:002025-06-02T17:12:42.149362787Z

2025-06-02 17:12:42.149395+00:00PostgreSQL Database directory appears to contain a database; Skipping initialization

2025-06-02 17:12:42.149405+00:002025-06-02T17:12:42.149405967Z

2025-06-02 17:12:42.567479+00:002025-06-02 17:12:42.567 UTC [1] LOG: starting PostgreSQL 17.5 (Debian 17.5-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit

2025-06-02 17:12:42.567624+00:002025-06-02 17:12:42.567 UTC [1] LOG: listening on IPv4 address “0.0.0.0”, port 5432

2025-06-02 17:12:42.567646+00:002025-06-02 17:12:42.567 UTC [1] LOG: listening on IPv6 address “::”, port 5432

2025-06-02 17:12:42.782951+00:002025-06-02 17:12:42.782 UTC [1] LOG: listening on Unix socket “/var/run/postgresql/.s.PGSQL.5432”

2025-06-02 17:12:43.310155+00:002025-06-02 17:12:43.310 UTC [16] LOG: database system was shut down at 2025-06-02 16:34:57 UTC

2025-06-02 17:12:43.342285+00:002025-06-02 17:12:43.342 UTC [1] LOG: database system is ready to accept connections

2025-06-02 17:12:47.213195+00:002025-06-02 17:12:47.213 UTC [27] FATAL: database “nextcloud” does not exist

2025-06-02 17:12:53.683579+00:002025-06-02 17:12:53.683 UTC [29] FATAL: database “nextcloud” does not exist