Filebot Docker install crashing

Support for Ubuntu and other Desktop Linux distributions
Post Reply
randyf1965
Posts: 10
Joined: 29 Sep 2022, 22:34

Filebot Docker install crashing

Post by randyf1965 »

I have a docker container running Filebot that has been working great for weeks that started crashing on restart, other containers run fine. I have tried spinning up other containers but have the same issue with it crashing.


https://pastebin.com/ZBgGqiPR
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Docker install crashing

Post by rednoah »

:?: Which 3rd party docker container are you using?


:?: Can you reproduce the issue with official docker container?
https://www.filebot.net/linux/docker.html
:idea: Please read the FAQ and How to Request Help.
randyf1965
Posts: 10
Joined: 29 Sep 2022, 22:34

Re: Filebot Docker install crashing

Post by randyf1965 »

Guess I need to learn more about the docker-compose.yml file usage if I create a new container in Portainer using the rednoah/filebot:watcher it exits instantly. I used to be able to watch a folder for new files then have the AMC script run on it
randyf1965
Posts: 10
Joined: 29 Sep 2022, 22:34

Re: Filebot Docker install crashing

Post by randyf1965 »

So if I run from a command line
docker run --rm -it -v input:/input -v Videos:/output rednoah/filebot:watcher /input/ --output /output/0TV shows
I get watches established but it isn't watching what I think it would watch which would be the /input folder

Just frustrating that it worked then one day it crashes anytime the filebot script is ran
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Docker install crashing

Post by rednoah »

:?: What does the console output say?


:?: What does -v input:/input do? It will create a named volume (an internally managed file system, that is not mapped to any specific folder on your host). You likely mean -v "$PWD/input:/input" which does something entirely different, i.e. the thing you mean to do. ;)


:arrow: We use -v $PWD:/volume1 in the examples because we must use -v /absolute/source/path:/absolute/target/path syntax to map a host folder into the container:

Code: Select all

docker run --rm -it -v $PWD:/volume1 -v data:/data rednoah/filebot:watcher /volume1/input --output /volume1/output
:idea: Please read the FAQ and How to Request Help.
randyf1965
Posts: 10
Joined: 29 Sep 2022, 22:34

Re: Filebot Docker install crashing

Post by randyf1965 »

In my example if I look at the output of mount I see the volume I use for new videos (on my SAN) mounted as /input but with the example you listed it mount /input to a local directory on my docker server.

It appears that if I copy a file into the /input folder the AMC script kicks off (Have to wait 5 minutes to verify) but HOW can I change that watch folder to a volume I have created in Docker that points to a CIFS share?

Also HOW can I launch this container in Portainer so I can have it start automatically if the server is rebooted instead of launching from a command prompt on the docker server?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Docker install crashing

Post by rednoah »

$PWD is the current working directory, the folder you cd into most recently:
https://www.shellscript.sh/

e.g. these two commands are functionally equivalent, except one will pass a relative path to input, to be resolved by ls against its current working directory, and one will pass an absolute path to input directly:

Code: Select all

ls input
ls "$PWD/input"

$PWD is one of the most fundamental concepts of shell scripting, and if you're using the docker command-line tool, then basic shell scripting skills are definitely a prerequisite...


I would generally not recommend Docker unless you have a specific reason to use Docker where Docker solves some kind of otherwise hard-to-solve problem. Docker is made by developers for developers and is - in my experience - extremely unfriendly towards normal end users. I would recommend installing and calling filebot normally.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Docker install crashing

Post by rednoah »

randyf1965 wrote: 01 Oct 2022, 03:31 Also HOW can I launch this container in Portainer so I can have it start automatically if the server is rebooted instead of launching from a command prompt on the docker server?
I'm not familiar with Portainer. You'll probably need to understand the docker command, so that you can then translate that information into a format that is suitable for Portainer. Presumably, the same concepts apply, so it should be fairly straight-forward.

  • Select docker container rednoah/filebot:watcher
  • Map your persistent application data folder into your container -v data:/data
  • Map your input folder into your container -v /host/path/to/volume1:/volume1
  • Launch with command-line arguments /volume1/input --output /volume1/output


:idea: Notably, input and output folder must be on the same bind mount. Please read Notes on --action MOVE and --action HARDLINK in the documentation linked above for details.
:idea: Please read the FAQ and How to Request Help.
randyf1965
Posts: 10
Joined: 29 Sep 2022, 22:34

Re: Filebot Docker install crashing

Post by randyf1965 »

I have the filebot-watcher finally running using:

Code: Select all

docker run -it -v Videos:/volume1 -v data:/data rednoah/filebot:watcher /volume1/input --output /volume1/0TV shows
I see the volume1 mounted correctly and I see the input folder but it is not doing anything to files I put in the input folder.

I see the following in the /dat/.filebot/log/error.log

Code: Select all

Oct 27, 2022 10:29:15 PM net.filebot.DiskStore acquireDiskStore
WARNING: Initialize new disk cache: /data/.filebot/cache/0
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Docker install crashing

Post by rednoah »

Initialize new disk cache indicates that filebot is running for the first time. If you get this warning when filebot is in fact running for the first time, then it's all good. If you see this message many times, then your persistent storage is lost between runs, likely due to incorrect volume mounts.

:!: This warning is unrelated to the "it is not doing anything to files I put in the input folder" issue at hand.



:?: What does the console output say? If you are using the filebot-watcher bash script then the complete console output is going to be most interesting to you. The filebot log file is only relevant once filebot is actually called.


:idea: inotifywait is the thing that is watching for file system changes. The console output will say Waiting 300 seconds for changes to settle down... indicating that files are not processed instantly, but only after a few minutes, if files are not continuously modified or added.
:idea: Please read the FAQ and How to Request Help.
randyf1965
Posts: 10
Joined: 29 Sep 2022, 22:34

Re: Filebot Docker install crashing

Post by randyf1965 »

So the console shows :

Code: Select all

--------------------------------------------------------------------------------


Hello! Do you need help Getting Started?


# FAQ

https://www.filebot.net/linux/docker.html


# Read License Key from Console

docker run --rm -it -v data:/data rednoah/filebot --license


--------------------------------------------------------------------------------


Setting up watches.

Watches established.
Here is inotifywait info

Code: Select all

root@7ac83a863cc7:/# ps -aux|grep inotifywait
filebot       13  0.0  0.0   2644   308 pts/0    S+   Oct27   0:00 inotifywait -m /volume1/input -e create -e moved_to -e modify --exclude /[.@] --format %w%f
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Docker install crashing

Post by rednoah »

If you get Watches established. and then nothing, that means that no files are being added to the input folder, or that inotifywait can't see any changes for some reason.


:?: What happens if you manually create a sample file in the input folder? Does the file show up from inside the container? Does inotifywait detect the new files? Does ls show the new files?
viewtopic.php?t=13038
:idea: Please read the FAQ and How to Request Help.
randyf1965
Posts: 10
Joined: 29 Sep 2022, 22:34

Re: Filebot Docker install crashing

Post by randyf1965 »

I manually copied a file into the input folder from outside the container and I see it in the container input folder but no action is ever started.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Docker install crashing

Post by rednoah »

randyf1965 wrote: 29 Oct 2022, 13:22 I manually copied a file into the input folder from outside the container and I see it in the container input folder but no action is ever started.
Copied into /volume1/input or some pre-existing folder inside the input folder? Because inotifywait does not watch folders recursively.


EDIT:

I've made a video tutorial so that you can compare what works to what you're doing:
https://www.youtube.com/watch?v=AjP-ci9Cx5Q
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Docker install crashing

Post by rednoah »

randyf1965 wrote: 29 Oct 2022, 19:56 It watches my input folder and sees the files in the subfolders created by Deluge and runs the AMC script against them

The filebot-watcher generally requires you to configure Deluge with a "move completed downloads to this folder" option (separating active downloads and completed downloads is always a good idea) so that completed files / folders appear instantly in the watched folder:
rednoah wrote: 05 Feb 2022, 01:18 :!: Do make sure that files are moved into the watch folder instantly with atomic move (i.e. instant move within the same file system) and not slowly over time with copy+delete move. If you use copy+delete move then filebot may end up processing partially moved / copied files, and so filebot-watcher will try to ignore files that are currently being written and process them at a later point in time with the next set of files.
:idea: Please read the FAQ and How to Request Help.
turtlejay
Posts: 20
Joined: 13 Mar 2020, 00:20

Re: Filebot Docker install crashing

Post by turtlejay »

in portainer i go to stacks. create new stack and input this text:

Code: Select all

services:
  filebot:
    container_name: filebot-watcher
    image: rednoah/filebot:watcher
    restart: unless-stopped
    volumes:
      - /share/Download/FileBot:/data
      - /share/Download:/volume1
    command: /volume1/complete --output /volume1/media --action duplicate --conflict auto
then deploy stack. this creates the container with a restart unless you stop it. it runs automatically at boot for me and doesnt crash.
the folder structure is based on my system so you need to edit for your scenario.

edit- i put all downloads in that complete folder. no subfolder structure, i allow amc to create the structure in my output folder

cheers,

Jay
Post Reply