After upgrading to Nextcloud 30: Back-off restarting failed container nextcloud in pod nextcloud-postgres

After upgrading from Nextcloud 29 to Nextcloud 30, netxcloud stop working with this error “Back-off restarting failed container nextcloud in pod nextcloud-postgres”.
I am using Dragonfish 24.04.2.2, Nextcloud Truenas Chart, in 4 folders: appdata, databases, backup, and userdata, behind NGINX.
Postgress version is 13.2

Nextcloud-Postgres pod logs:
chmod: changing permissions of ‘/var/lib/postgresql/data’: Operation not permitted
The files belonging to this database system will be owned by user “postgres”.
This user must also own the server process.

Nextcloud-Postgresbackup pod logs:
nextcloud-postgres:5432 - no response.

It looks weird that pgbackup folder and content is owned by netdata/docker while rest is owned by www-data.
image

Any idea or suggestion?

Can you post screen captures of your entire app config in the UI, so, hostpaths, settings, etc. that show up when you edit the app? Not saying I can answer as I don’t use the built in nextcloud app but a custom app instead, but, there is a permissions issue here somewhere and knowing what settings you are using might help.

1 Like

Thanks for your reply.
Probably it is important to note that my server was installed in Truenas Core originally. I have been upgrading it to every scale version since Cobia.
So, it is not a surprise for me having files owned by root/root.
When I created the datasets for nextcloud they were owned by www-data, but it has changed after the upgrades. I do not why.
I thought initially the problem might be related to the fact that I have been upgrading Nextcloud but the Postgres version has remained the same (13.2).
I was reading 13.2 is not recommended for last version of nextcloud.

Here the images UI configuration. :crossed_fingers:






Here a copy of the config.php


So, we know it’s trying to change from the pod log postgresql data, and, it can’t.

This seems the same issue as here: I’d follow the suggestions there from ix, seems like they got it resolved for the users there.

Using the app is way more complicated than it need be. It’s so simple when using a custom app. But that is much simpler when Eel comes around.

1 Like

Hi Steve, thanks a lot. You tried to include a link with a potential solution, right? But, I think you missed the link in the reply.

Sure I did,I just did it in invisible ink. :innocent:

I don’t like using ACLs, but, I am assuming you have, try and follow the suggestion there and it should work.

1 Like

Also looking forward for EeL and Docker. I am also avoiding migrating to Eel with APP issues.

Hi Steve, it is working again. Just edit owner and group (Owner is netdata and Group is docker)
Thank you very much

1 Like

I did migrate to Eel, the only problem I actually have with Nextcloud is with the Memories app, I cannot see any documents, even if they are “there”, and same with the map, jus a big empty space with my pack of pictures at some places.

Hi Savan,
What about trying simple maintenance tasks first to check?
Scan, missing index, and repair.

su -s /bin/bash www-data -c ‘php occ files:scan --all’
su -s /bin/bash www-data -c ‘php occ db:add-missing-indices’
su -s /bin/bash www-data -c ‘php occ maintenance:repair’

The syntax may be different depending on the installation.
Check for errors and warnings.

Because I have to learn all that :slight_smile:
I used Youtube or written tutorials to be able to put in place my Truenas and Nextcloud and all that sort of things.
But I did not find one explaining to me how to fix that.

So first thanks for this tip.
Second… where to?
I tried in my container Nextcloud but ti seems not to be the solution.

If someone has for some reason the same kind of problems AND my level:

  • open the shell for the Nextcloud container
  • just type “occ files:scan – all”, and the other commands, and that works.

You can also take this time to fix all the “little” tips Nextcloud gives you in the Warnings on admin page.

Hi Savan,
Same here, learning by doing
I assume the scan solve the issue, correct?

Yep, totally.
To be perfectly clear, it seems “occ db:add-missing-indices” cannot be performed at least on my Truenas installation, but I was able to correct my memories session and solved lots of other things about Nextcloud.

1 Like