Creating custom APP - Failed UP action

Hi,
I have been able to make a couple of custom APPs with a Linux repository but it has stopped working now with an error. I looked at other threads on the UP action error but they were for preconfigured APPs.

I did use Arcane to delete some ‘unused’ images so I am wondering if this has ‘pruned’ something that is important?

any help appreciated.

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 562, in __run_body
    rv = await self.middleware.run_in_thread(self.method, *args)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 627, 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 624, 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/service/crud_service.py", line 294, in nf
    rv = func(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py", line 101, in wrapped
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py", line 148, in do_create
    return self.create_internal(job, app_name, version, data['values'], complete_app_details)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py", line 193, in create_internal
    raise e from None
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py", line 186, in create_internal
    compose_action(app_name, version, 'up', force_recreate=True, remove_orphans=True)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/compose_utils.py", line 61, in compose_action
    raise CallError(err_msg)
middlewared.service_exception.CallError: [EFAULT] Failed 'up' action for 'paul-test' app. Please check /var/log/app_lifecycle.log for more details

I have just tried to delete an existing custom APP and I get a failed ‘DOWN’ action as well.

The error you post Is the “wrapper” for the the exception logged into /var/log/app_lifecycle.log, and basically not say anything rilevant.
You should start digging into It to understand what’s happening, and share the result

1 Like

I swear at this point ixsystems needs to just hardcode those messages for users to CLI directly to the cat/nano of app_lifecycle.log XD

I don’t think I’ve ever seen anyone read those main errors in the community and tell users what a solution is. Should just have those main messages live in debug.log instead?

Imo, the problem is that the important part (hint to the error) is the very last line and no one really reads the gibberish to the last line

1 Like

Once ya read the last line you never forget, it’s just interesting how even right there you default to calling it “gibberish” and I completely agree with you. Wish it could scrape the last night of the app_lifecycle.log and just slap it in for ya on the last line.

instead of the “gibberish”, a messageg like “Hey we encountered an error, please check /var/log/app_lifecycle.log for more details”, would be a better option.

1 Like

Given the ongoing work mentioned in the T3 vlog to make the UI more user-friendly I hope the way error messages are handled will see some love.

Given that many error scenarios ought to be fairly well understood by now, there’s no need to spew the whole python exception at the user. A better solution could be to start identifying the common errors and only present the relevant bits ideally reworded as to be easier to understand, possibly with the full error message available in a fold-out section.

The lifecycle one would be a good start. Errors related to connectivity is another one that causes a lot of community support requests, albeit it may be a bit more complex to investigate since the cause can be multifaceted - is it a problem with the DNS, the GW, the BIOS time, and so on. Diagnostic tools in the GUI would be welcome, especially since features other than Apps rely on that network connectivity, like OS Updates and presumably things like TrueNAS Connect.

The users are frequently reminded to not go into the shell to tinker and with the next breath they are told to dip into the shell to run a command to lookup data in a way that the GUI couldn’t. Pasting images from the GUI isn’t idea, but how about offering a user-friendly copy button right next to the Pool status GUI for example, that copies the zpool status -v output in a Discourse friendly manner, just an idea…

This ended up very offtopic, apologies.

Linking for visibility:

For @PaulMcG1970, as others have said, post the output of sudo cat /var/log/app_lifecycle.log from the shell and hopefully that should have some indication of what’s happening here.

1 Like

Ok gents! How about this :slight_smile:

For the moment I just want to delete the custom one that is broken.

[2025/10/13 22:45:55] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'karaoke-web' app:  karaoke-web Pulling \n karaoke-web Error pull access denied for linux, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\nError response from daemon: pull access denied for linux, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\n
[2025/10/13 22:47:42] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'karaoke-eternal' app: invalid hostPort: <host_port>\n
[2025/10/13 22:48:12] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'karaoke-eternal' app: invalid hostPort: <host_port>\n
[2025/10/13 22:48:47] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'karaoke-web' app:  karaoke-web Pulling \n karaoke-web Error pull access denied for linux, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\nError response from daemon: pull access denied for linux, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\n
[2025/10/13 22:55:25] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'karaoke-eternal' app: invalid hostPort: <host_port>\n
[2025/10/13 22:57:47] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'karaoke-web' app: unable to get image 'radrootllc/karaoke-eternal:latest:latest': Error response from daemon: invalid reference format\n
[2025/10/14 08:44:20] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'karaoke-eternal' app: invalid hostPort: <host_port>\n
[2025/10/14 08:47:23] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'karaoke-eternal' app: invalid hostPort: <host_port>\n
[2025/10/14 08:47:26] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'karaoke-eternal' app: invalid hostPort: <host_port>\n
[2025/10/14 08:51:52] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'paul-test' app:  paul-test Pulling \n paul-test Error pull access denied for linux, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\nError response from daemon: pull access denied for linux, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\n
[2025/10/14 19:11:05] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'karaoke-eternal' app: invalid hostPort: <host_port>\n


It looks like it wants me to still connect to the respository when I try to delete it. There is a denied to this repository? I am guessing here

The other error indicates a port conflict. Which ports are you trying to pass through? If it’s 80 or 443 on the host they’re already in use by the truenas gui

That suggests funky logic in the DOWN-handling code.

The default was 8080 so I tried 38080 but got the same problem

services:
  karaoke-eternal:
    container_name: karaoke-eternal
    image: radrootllc/karaoke-eternal
    ports:
      - <host_port>:38080
    restart: unless-stopped
    volumes:
      - <path_to_database>:/config
      - <path_to_media>:/mnt/karaoke

I just want to delete it now but get an error

[2025/10/15 17:59:09] (ERROR) app_lifecycle.compose_action():56 - Failed 'down' action for 'karaoke-eternal' app: invalid hostPort: <host_port>\n

When I try to create a new app using ‘linux’ as the image I get an error

[2025/10/15 18:02:09] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'paul-test2' app:  paul-test2 Pulling \n paul-test2 Error pull access denied for linux, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\nError response from daemon: pull access denied for linux, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\n

Due to a massive lack of help in the documentation I have done a trial and error and finally I put ‘docker’ in my new ‘test’ app as the image and it has downloaded and now running.

Still doesn’t fix my rogue broken custom app I cannot delete

EDIT** The new app has ‘Crashed’ without anything configure. I haven’t converted it yet to a ‘custom app’

EDIT"**
After converting to a ‘custom app’ and adding in the ‘custom config’ I got the previous error about “DOWN” when clicking save.

well, i just gave it a try with the yaml from their homepage and it’s up and running

services:
  karaoke-eternal:
    container_name: karaoke-eternal
    image: radrootllc/karaoke-eternal
    ports:
      - '9080:8080' #9080 is the port on the host and 8080 in the container. 8080 should not be changed
    restart: unless-stopped
    volumes:
      - /mnt/Plugins/test:/config
x-portals:
  - host: 0.0.0.0
    name: "Web UI"
    path: /
    port: 8080
    scheme: http

Edit: Added the code for a webui button

1 Like

Can you post in more detail what exactly you’re doing? I’m having a hard time visualizing what’s going on in this post

Edit: the documentation on installing custom apps is here, if you haven’t come across it:

1 Like

Based on this tidbit in your log:

nError response from daemon: pull access denied for linux, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\n

It sounds like you need login access for the repository your trying to access “radrootllc”.

do you replaced the placeholder between < and >, right?

This is normal for Python-based software, and it all looks like gibberish to anyone who isn’t a Python programmer. The real problem here is that too many Python programs don’t catch errors like this so they can spit out a useful error message, and instead expect users to understand a stack trace, which they don’t.

In proper user-focused software, users would never see a stack trace like this. At worst, the stack trace would be caught, and only the last message printed out, which is easy to do with something like this:

try:
    [code]
except Exception as e:
    print(f"ERROR: {e}")