"Docker daemon: layer does not exist" upon machine restart

Hello, everyone.

Question:
Is there a way to automatically restart the docker service upon computer restart?

Details or scenario that I encountered:
There is a need to restart my computer. Upon restarting, I realized that my dockge and my other docker services / apps is not running (not restarted automatically) and even confirmed it in the shell using the command “sudo docker ps”. I tried to start the dockge app in the “App” section, but it throws me an error:

[EFAULT] Failed 'up' action for 'dockge' app, please check /var/log/app_lifecycle.log for more details

MORE DETAILS:
Error: 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/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 'dockge' app, please check /var/log/app_lifecycle.log for more details

Upon reading the error, I viewed the content of the “app_lifecycle.log” and this is the content:

<masked_username>@truenas[/var/log]$ sudo cat app_lifecycle.log 
[2025/01/18 07:22:14] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'dockge' app:  dockge Pulling 
 dockge Pulled 
Error response from daemon: layer does not exist

To fix this, I type the command to restart the docker:

sudo systemctl restart docker

and this solves it. My dockge and other docker services / apps has been automatically restarted.

Other details:

  • Truenas version: 24.10 - bare metal install
  • PC: AOOSTAR R1 (Intel N100 || 32GB RAM (Not ECC) || 256GB NVME || 2x 1TB 2.5" Drive.)

Thank you.

I think this is the issue:

Its fixed in Fangtooth. Until then you may neeed your CLI command or a script?

1 Like

Thanks for the reply! Though, my two 1TB are both SSD - just in 2.5" inch form factor.
But yeah, I’ll wait for the next official release. Thank you again.

I might be wrong… if they are SSDs they should not be this slow.