TrueNAS Scale/Nextcloud Install Failure

Been struggling to get Nextcloud installed from the app interface. From the research I’ve done - it’s boiling down to an old install that has some lingering files/configs somewhere…but it’s gone beyond me…

I’ve gone through the thread linked below which seems to be the same problem, but can’t determine how I can actually clear the error. I’ve tried installing to the default ixVolume datasets and it worked fine. I’ve deleted all my appdata/userdata/pgdata datasets to try and start fresh but no bueno. For the record this is on Scale 24.10.
Unable to create new Nextcloud deployement: Failed 'up' action for 'nextcloud' · Issue #345 · truenas/apps · GitHub

Any help would be greatly appreciated!

Failure log from the install:
raise CallError(
middlewared.service_exception.CallError: [EFAULT] Failed ‘up’ action for ‘next-cloud’ app, please check /var/log/app_lifecycle.log for more details

Following is the app_lifecycle.log

[2024/10/04 20:13:50] (ERROR) app_lifecycle.compose_action():56 - Failed ‘up’ action for ‘next-cloud’ app: cron Pulling
permissions Pulling
postgres Pulling
nextcloud Pulling
redis 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
cron Error pull access denied for ix-nextcloud, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied
302e3ee49805 Already exists
…goes through an assortment of download/extract and container creation before ending in…:
postgres Pulled
Network ix-next-cloud_default Creating
Network ix-next-cloud_default Created
Volume “ix-next-cloud_tmp” Creating
Volume “ix-next-cloud_tmp” Created
Volume “ix-next-cloud_bitnami_redis_data” Creating
Volume “ix-next-cloud_bitnami_redis_data” Created
Container ix-next-cloud-permissions-1 Creating
Container ix-next-cloud-permissions-1 Created
Container ix-next-cloud-redis-1 Creating
Container ix-next-cloud-postgres-1 Creating
Container ix-next-cloud-redis-1 Created
Container ix-next-cloud-postgres-1 Created
Container ix-next-cloud-nextcloud-1 Creating
time=“2024-10-04T20:13:43-06:00” level=warning msg=“config uid, gid and mode are not supported, they will be ignored”
time=“2024-10-04T20:13:43-06:00” level=warning msg=“config uid, gid and mode are not supported, they will be ignored”
Container ix-next-cloud-nextcloud-1 Created
Container ix-next-cloud-cron-1 Creating
time=“2024-10-04T20:13:43-06:00” level=warning msg=“config uid, gid and mode are not supported, they will be ignored”
Container ix-next-cloud-cron-1 Created
Container ix-next-cloud-permissions-1 Starting
Container ix-next-cloud-permissions-1 Started
Container ix-next-cloud-permissions-1 Waiting
Container ix-next-cloud-permissions-1 Waiting
Container ix-next-cloud-permissions-1 Exited
Container ix-next-cloud-postgres-1 Starting
Container ix-next-cloud-permissions-1 Exited
Container ix-next-cloud-redis-1 Starting
Container ix-next-cloud-redis-1 Started
Container ix-next-cloud-postgres-1 Started
Container ix-next-cloud-permissions-1 Waiting
Container ix-next-cloud-postgres-1 Waiting
Container ix-next-cloud-redis-1 Waiting
Container ix-next-cloud-permissions-1 Exited
Container ix-next-cloud-postgres-1 Error
Container ix-next-cloud-redis-1 Healthy
dependency failed to start: container ix-next-cloud-postgres-1 is unhealthy

1 Like

Edit: Never mind the below. You have a problem with postgres, I have a problem with the Nextcloud app container. Different problems.

Not relevant:
I have the same problem, but the install works if User Data is on an ix-volume, not a host path. I think having the user data on an ix-volume is a bad idea for production, it’s harder to backup etc.

I have tried everything for User Data; old file structure, on a ZFS dataset, on a normal folder, 777 permissions. Nothing works. Also I don’t know where to report bugs, because the link on Nextcloud app is to github.com/truenas/charts/tree/master/charts/nextcloud, which I think is the old k3s system, but I don’t know.

It seems to work for me if I do two suggested things from the bug:

  • change the app name to nextcloud3 (or whatever)
  • chown 999:999 DB_PATH
    (postgres database mount path)
    This is for a new install with empty binds, now I need to work on importing my data

Seems there are a few people having similar problems, whether it be with postgres or otherwise, as there’s another recent post with the same.

Call it OCD but I’d like to avoid having to rename things to nextcloudx (for example) to get around the issue. I did try a fresh install with a new name (next-cloud) using host volumes but it failed as well.

Is there any way to force the old data to be cleared? I’m lost as to where I would even look to find the postgres data since the host volumes have been deleted.

I could make it work just changing permissions, the problem is the postgres that it fails when the directory exists under:
/mnt/.ix-apps/app_mounts/nextcloud

Since there is no way to delete the directory you need to change the appname otherwise it fails over and over if you select the same name to make the installation, so the workaround is to set the following permissions:

www-data (user and group) to:
AppData and UserData

netdata (user) docker (group) to:
postgresData

drwxrwx— 4 www-data www-data 8 Oct 5 11:13 data
drwxr-xr-x 16 www-data www-data 35 Oct 5 10:56 html
drwx------ 19 netdata docker 26 Oct 5 10:59 postgres_data

I hope it helps.

Eureka! Much thanks @Moxy

I did go as far as unmounting and removing /mnt/.ix-apps/app_mounts/nextcloud via the CLI. Not sure if that had any impact, but the permissions you noted did the trick.

Hi Everyone,

I am having a similar issue with nextcloud and could use some help.
I am using RC2 of electric eel.

I had next cloud running at one point, but it failed and would not redeploy. I deleted the container and tried to recreate it. Now it wong create at all. I checked the /var/log/applifecycle file and found the following.

[2024/10/11 11:55:48] (ERROR) app_lifecycle.compose_action():56 - Failed ‘up’ action for ‘cloud’ app: Network ix-cloud_default Creating
Network ix-cloud_default Created
Volume “ix-cloud_tmp” Creating
Volume “ix-cloud_tmp” Created
Volume “ix-cloud_bitnami_redis_data” Creating
Volume “ix-cloud_bitnami_redis_data” Created
Container ix-cloud-permissions-1 Creating
Container ix-cloud-permissions-1 Created
Container ix-cloud-redis-1 Creating
Container ix-cloud-postgres-1 Creating
Container ix-cloud-postgres-1 Created
Container ix-cloud-redis-1 Created
Container ix-cloud-nextcloud-1 Creating
time=“2024-10-11T11:55:41-06:00” level=warning msg=“config uid, gid and mode are not supported, they will be ignored”
time=“2024-10-11T11:55:41-06:00” level=warning msg=“config uid, gid and mode are not supported, they will be ignored”
Container ix-cloud-nextcloud-1 Created
Container ix-cloud-nginx-1 Creating
Container ix-cloud-cron-1 Creating
time=“2024-10-11T11:55:41-06:00” level=warning msg=“config uid, gid and mode are not supported, they will be ignored”
time=“2024-10-11T11:55:41-06:00” level=warning msg=“config uid, gid and mode are not supported, they will be ignored”
Container ix-cloud-nginx-1 Created
Container ix-cloud-cron-1 Created
Container ix-cloud-permissions-1 Starting
Container ix-cloud-permissions-1 Started
Container ix-cloud-permissions-1 Waiting
Container ix-cloud-permissions-1 Waiting
Container ix-cloud-permissions-1 Exited
Container ix-cloud-redis-1 Starting
Container ix-cloud-permissions-1 Exited
Container ix-cloud-postgres-1 Starting
Container ix-cloud-postgres-1 Started
Container ix-cloud-redis-1 Started
Container ix-cloud-postgres-1 Waiting
Container ix-cloud-redis-1 Waiting
Container ix-cloud-permissions-1 Waiting
Container ix-cloud-permissions-1 Exited
Container ix-cloud-postgres-1 Error
Container ix-cloud-redis-1 Healthy
dependency failed to start: container ix-cloud-postgres-1 is unhealthy

How do I fix this? I have already created 3 new data sets for app data, user data, and database. app data and user data have www-data owner and group permissions.

Fixing permissions as Moxy said in the post abhove worked for me. I also force removed the nextcloud directory in the hidden ix-apps folder using CLI - not sure it helped or not but I did it anyways before retrying the install.

/mnt/.ix-apps/app_mounts/nextcloud

Hey so did you have to unmount your whole raid/root dataset? How do I do that? I am pretty new to truenas. When I try to remove those files I am getting permission denied. If I use sudo, they are in use.

You should be able to navigate in the TrueNAS shell to /mnt/.ix-apps/app_mounts and then sudo umount nextcloud

Again I’m not sure if it’s necessary but I did it anyways

So I tried this, but I guess the target is busy.

truenas_admin@truenas[/mnt/.ix-apps/app_mounts]$ sudo unmount nextcloud
[sudo] password for truenas_admin:
sudo: unmount: command not found
truenas_admin@truenas[/mnt/.ix-apps/app_mounts]$ sudo umount nextcloud
umount: /mnt/.ix-apps/app_mounts/nextcloud: target is busy.
truenas_admin@truenas[/mnt/.ix-apps/app_mounts]$

Do I need to reboot and try again? I am removing this becuase I did follow the tutorial/ moxys comments but it did not work for me. I am on electric eel rc2 so maybe that is a factor.

Try
sudo umount -f nextcloud
to force the command

truenas_admin@truenas[/mnt/.ix-apps/app_mounts]$ sudo unmount nextcloud
[sudo] password for truenas_admin:
sudo: unmount: command not found
truenas_admin@truenas[/mnt/.ix-apps/app_mounts]$ sudo umount nextcloud
umount: /mnt/.ix-apps/app_mounts/nextcloud: target is busy.
truenas_admin@truenas[/mnt/.ix-apps/app_mounts]$

Looks like it’s still busy. I will try restarting and then the command.

Looks like it is busy right off the reboot

For anyone in the future…

I found the answer with help on discord.

sudo zfs destroy -r poolname/ix-apps/app_mount/appyouwanttodelete

Be careful as this could mess up your system if the app is still in use.

This will remove the left over data in .ix-apps.

Hey, I stumbled across the same problem.
I deleted the pool as @vick-vinegar mentioned with
sudo zfs destroy -r poolname/ix-apps/app_mount/appyouwanttodelete
but the problem still exists.
When I try to install nextcloud, I get the same error message.
[EFAULT] Failed 'up' action for 'nextcloud' app, please check /var/log/app_lifecycle.log for more details
And the permissions of /mnt/.ix-apps/app_mounts/nextcloudare exactly like above:
drwxrwx— 4 www-data www-data 8 Oct 5 11:13 data drwxr-xr-x 16 www-data www-data 35 Oct 5 10:56 html drwx------ 19 netdata docker 26 Oct 5 10:59 postgres_data
Do you have any ideas on how to fix this?

Got exactly same problem. I’m also waiting for someone to figure it out.

I haved seem problem with Nextcloud and Odoo.
If i choose “ixVolume (Dataset created automatically by the system)”, it’s ok but not with HostPath.
So it’s a problem with Postgres.

OS Version:TrueNAS-SCALE-24.10-RC.2

I hope you all can find a solution.

What I’ve found is that it’s really very very difficult to nail down “the” solution to a specific problem by means of the forums. Everyone’s installation is different and without sharing your specific use case, setup, and contributing setups (i.e. All the other apps/configs that may impact the given issue) it’s usually better to spend the time and understand the problem for yourself then to try random forum suggestions…

I’m sorry I can’t help more

Try setting ACL permissions for the postgres volumes so the user:group 999:999 has read and write access

1 Like