Passing commands to custom app for Qbittools

I’ve been trying for a few hours to get this container to run as a custom app: Alex / qbittools · GitLab

To do so I have to pass 2 commands/arguments, the first is the action, in my case “reannounce”, and the second the URL for my server with the -s command.

I’ve tried every variation of this:

  • add to command: reannounce -s 192.168.1.77:10000 → container does not start
  • add to argument: reannounce -s 192.168.1.77:10000 → argument command: invalid choice: ‘reannounce -s 192.168.1.77:10000’. It tells me to pass only “reannounce”.
  • add -s 192.168.1.77:10000’ to a second argument line
  • run -s 192.168.1.77:10000’ in command and reannounce in argument and vice versa

I’ve tried many other variations with no success. TTY and STDIN are enabled as instructed. What is the correct way to run this?

OS is dragonfish btw.

Thanks for your help

ok so for I fixed this:

Argument 1: reannounce
Argument 2: --server
Argument 3: 192.168.1.77:10000

each entry needs to be its own seperate argument.

Hey,

I’m not well versed at all at getting Custom Apps going but i’d love to get this qBittools reannounce thing going. Are you saying you’ve gotten this to work on TrueNAS Scale as a custom app reannouncing a qbittorrent client you have on the same TrueNAS host?

I got the pod in Running state by doing:

image repository: registry.gitlab.com/alexkm/qbittools

arg1: reannounce
arg2: --server
arg3: :

But since the pod is showing 0B RAM and 0b/s network in/out I’m just questioning if it’s working at all.

Just check the container logs in the truenas GUI, it should show activity.

I assume your argument 3 is not empty but your server address and port?

Yes I dont know why that dissapeared from my post, but indeed its my IP:PORT …no http

I’ve conifgured running as same user:group as the qBittorrent client and I have checked TTY & STDIN.

Did find the log:

2024-08-20 18:34:29.235280+02:00Traceback (most recent call last):
2024-08-20 18:34:29.235347+02:00File "/app/./qbittools.py", line 133, in <module>
2024-08-20 18:34:29.235458+02:00main()
2024-08-20 18:34:29.235486+02:00File "/app/./qbittools.py", line 130, in main
2024-08-20 18:34:29.235574+02:00cmd = getattr(mod, '__init__')(args, logger)
2024-08-20 18:34:29.235605+02:00^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-20 18:34:29.235630+02:00File "/app/commands/reannounce.py", line 7, in __init__
2024-08-20 18:34:29.235661+02:00client = qbittools.qbit_client(args)
2024-08-20 18:34:29.235679+02:00^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-20 18:34:29.235686+02:00File "/app/qbittools.py", line 70, in qbit_client
2024-08-20 18:34:29.235747+02:00client.auth_log_in()
2024-08-20 18:34:29.235766+02:00File "/usr/local/lib/python3.11/site-packages/qbittorrentapi/auth.py", line 99, in auth_log_in
2024-08-20 18:34:29.235842+02:00auth_response = self._post(
2024-08-20 18:34:29.235853+02:00^^^^^^^^^^^
2024-08-20 18:34:29.235860+02:00File "/usr/local/lib/python3.11/site-packages/qbittorrentapi/request.py", line 390, in _post
2024-08-20 18:34:29.236099+02:00return self._request_manager(
2024-08-20 18:34:29.236129+02:00^^^^^^^^^^^^^^^^^^^^^^
2024-08-20 18:34:29.236151+02:00File "/usr/local/lib/python3.11/site-packages/qbittorrentapi/request.py", line 465, in _request_manager
2024-08-20 18:34:29.236234+02:00return self._request(
2024-08-20 18:34:29.236250+02:00^^^^^^^^^^^^^^
2024-08-20 18:34:29.236256+02:00File "/usr/local/lib/python3.11/site-packages/qbittorrentapi/request.py", line 542, in _request
2024-08-20 18:34:29.236398+02:00self._handle_error_responses(data, params, response)
2024-08-20 18:34:29.236425+02:00File "/usr/local/lib/python3.11/site-packages/qbittorrentapi/request.py", line 762, in _handle_error_responses
2024-08-20 18:34:29.236685+02:00raise Forbidden403Error(response.text)
2024-08-20 18:34:29.236714+02:00qbittorrentapi.exceptions.Forbidden403Error: Your IP address has been banned after too many failed authentication attempts.

I’m guessing qBittorrent client is banning me. Does make sense since there’s no password supplied.

I tried with two additional arg’s

-U myqbittorrentuser
-P myqbittorrentpw

without any luck. I’ve also tried same user:group ID as the qBittorrent client wihtout any luck either.

I’ve set my qbit to ignore authentication for adresses on the local network, that way no need to handle that

1 Like

well that was dumb of me not to think of, thank you :slight_smile:

1 Like