Docker apps auto star

so suddenly my apps stop working after trunas-scale restart every time i restart i have to run sytemctl restart docker for them to work

more info :

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 488, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 535, in __run_body
    rv = await self.middleware.run_in_thread(self.method, *args)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1364, 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 1361, 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/schema/processor.py", line 183, in nf
    return 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/plugins/apps/app_scale.py", line 51, in start
    compose_action(app_name, app_config['version'], 'up', force_recreate=True, remove_orphans=True)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/compose_utils.py", line 57, in compose_action
    raise CallError(
middlewared.service_exception.CallError: [EFAULT] Failed 'up' action for 'nextcloud' app, please check /var/log/app_lifecycle.log for more details

/var/log/app_lifecycle.log

[2024/12/06 11:12:29] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'nextcloud' app:  nextcloud Pulling
 postgres Pulling
 redis Pulling
 cron Pulling
 permissions Pulling
 nginx 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 Warning pull access denied for ix-nextcloud, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
 redis Pulled
Error response from daemon: layer does not exist

[2024/12/06 11:17:01] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'nextcloud' app: unable to get image 'bitnami/redis:7.4.1': Error response from daemon: layer does not exist

[2024/12/06 11:34:21] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'collabora' app:  nginx Pulling

 collabora Pulling
 collabora Pulled
Error response from daemon: layer does not exist

[2024/12/06 11:38:36] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'nextcloud' app: unable to get image 'nginx:1.27.3': Error response from daemon: layer does not exist

The most likely explanation here would be some kind of corruption in the Docker data preventing the image from. You can try running docker system prune --all to hopefully clean up the docker data. If that doesn’t work you can try a “deeper clean” with docker system prune -a --volumes to also remove anonymous volumes.

1 Like

still the same thing thing

 sudo docker system prune --all

WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all images without at least one container associated to them
  - all build cache

Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B

sudo docker system prune -a --volumes
WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all anonymous volumes not used by at least one container
  - all images without at least one container associated to them
  - all build cache

Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B