Existing Docker instances crippled if catalog can't be reached?

I’m running 25.04-RC.1.

Yesterday I noticed that the Catalogs for Applications and Instances aren’t reachable:

EFAULT] Failed to clone 'https://github.com/truenas/apps' repository at '/mnt/.ix-apps/truenas_catalog' destination:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/plugins/catalog/git_utils.py”, line 34, in pull_clone_repository
clone_repository(repository_uri, destination, branch, depth)
File “/usr/lib/python3/dist-packages/middlewared/utils/git.py”, line 25, in clone_repository
raise CallError(
middlewared.service_exception.CallError: [EFAULT] Failed to clone ‘GitHub - truenas/apps’ repository at ‘/mnt/.ix-apps/truenas_catalog’ destination: Cloning into ‘/mnt/.ix-apps/truenas_catalog’…

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 515, in run
await self.future
File “/usr/lib/python3/dist-packages/middlewared/job.py”, line 560, in __run_body
rv = await self.method(*args)
^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py”, line 88, in wrapped
result = await func(*args)
^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/catalog/sync.py”, line 27, in sync
await self.middleware.call(
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 977, in call
return await self._call(
^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 703, in _call
return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 596, 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/plugins/catalog/sync.py”, line 55, in update_git_repository
return pull_clone_repository(repository, location, branch)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/catalog/git_utils.py”, line 36, in pull_clone_repository
raise CallError(f’Failed to clone {repository_uri!r} repository at {destination!r} destination: {e}')
middlewared.service_exception.CallError: [EFAULT] Failed to clone ‘GitHub - truenas/apps’ repository at ‘/mnt/.ix-apps/truenas_catalog’ destination: [EFAULT] Failed to clone ‘GitHub - truenas/apps’ repository at ‘/mnt/.ix-apps/truenas_catalog’ destination: Cloning into ‘/mnt/.ix-apps/truenas_catalog’…

Then today I noticed that I couldn’t access my Plex server so I tried to restart it and it just hung in the deploying stage.

Are Docker Apps really so fragile that they don’t keep all the bits locally that they need to run? Or is it the case that checking for the latest bits keeps an app from starting if the check fails?

It’s disappointing if it’s accurate that the Apps subsystem fails catastrophically if it’s unable to connect to the internet.

In these volatile times, I would very much prefer to Apps to fall back on “oh well, no Internet, I guess we’ll just use containers are already downloaded and check again later”.

I personally use TrueNAS with the goal to self-host. If that self-hosting fails (even after it’s been fully set up and running) because it can’t connect to the cloud after a reboot…

Don’t think so, mine doesn’t do that. However, you are on the Beta so I might expect bad things to happen at times.

Well I’m giving up on Docker on TrueNAS for now. Browsing the catalogs magically started working again, but the mapping between the Docker network and my server’s IP address is somehow broken such that I can’t even access Plex on my local network, let alone remotely. It was nice for the two days that it work, but it’s clearly not ready for regular use.

The issue with Plex not starting is just the fault of the “official” Plex docker image downloading the Plex app as a dpkg file and installing it at runtime, it’s stupid but it allows app updates without a container update… not really TrueNAS’s fault unless they want to go down the Unraid Community Apps method of including 5 different variations of every app just to confuse the new user.

but you can workaround this by deploying a “custom app” using a different docker image, linuxserver or binhex both actually package Plex into the Plex container.

the “failed to clone” error is saying that it couldn’t get an updated catalog, which is really just a warning… it doesn’t stop your apps from starting/etc.

as for plex not connecting… this is an issue of Plex trying to be smart by using a combination of local only ports, dns rebinding, mdns/avahi, and published URLs if you have them enabled… and if something goes wrong it will just timeout for long periods of time.

honestly if you aren’t planning on having multiple instances of Plex, you can safely just enable the “host” binding which will map it to the host with minimal configuration.