Docker - filebot:watcher is stopping

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
socram
Posts: 6
Joined: 24 Jan 2021, 20:59

Docker - filebot:watcher is stopping

Post by socram »

Hi,

I am using docker for a while now and switched filebot to docker.
The docker:watcher works fine so far, but it is killing itself after one run. Most likely, I just misconfigured something:

My .env:

Code: Select all

LOG=/data/amc.log
UNSORTIERT=/volume1/Multimedia/Downloads/unsorted/{file.structurePathTail}
SERIEN=/volume1/Multimedia/Series/{n.space('.')}/{n.replaceAll('ä', 'ae').replaceAll('ö', 'oe').replaceAll('ü', 'ue').space('.')}.{s00e00}.{t.replaceAll('ä', 'ae').replaceAll('ö', 'oe').replaceAll('ü', 'ue').space('.')}.{audio.size() > 2 ? 'Multi.' : audio.size() > 1 ? 'DL.' : audio.language[0].replace('en', 'English.').replace('de', 'German.')}{channels}.{ac}.{vf}
FILME=/volume1/Multimedia/Movies/{n.space('.')}.{y}.{source}.{audio.size() > 2 ? 'Multi.' : audio.size() > 1 ? 'DL.' : audio.language[0].replace('en', 'English.').replace('de', 'German.')}{channels}.{ac}.{vf}@{vc}.[{rating}]/{n.replaceAll('ä', 'ae').replaceAll('ö', 'oe').replaceAll('ü', 'ue').space('.')}.{y}.{source}.{audio.size() > 2 ? 'Multi.' : audio.size() > 1 ? 'DL.' : audio.language[0].replace('en', 'English.').replace('de', 'German.')}{channels}.{ac}.{vf}@{vc}.[{rating}]
My docker-compose.yml:

Code: Select all

# docker-compose.yml
version: '3.3'
services:
  filebot:
    container_name: filebot-watcher
    image: rednoah/filebot:watcher
    restart: unless-stopped
    volumes:
      - /volume3/Docker.nvme/filebot:/data
      - /volume1:/volume1
    command: /volume1/Multimedia/Downloads/extracted --output /volume1/Multimedia/Movies -script fn:amc -get-subtitles --lang de --log-file $LOG --action move --def seriesFormat="$SERIEN" movieFormat="$FILME" animeFormat="$ANIME" unsortedFormat="$UNSORTIERT"
    user: root
I am using docker-compose up to compose.

Kind regards
socram
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Docker - filebot:watcher is stopping

Post by rednoah »

1.
What does the console output say when it kills itself?


2.
filebot-watcher cannot kill itself, unless inotifywait somehow terminates and read somehow returns with a negative exit code. It'd start debugging there.
:idea: Please read the FAQ and How to Request Help.
socram
Posts: 6
Joined: 24 Jan 2021, 20:59

Re: Docker - filebot:watcher is stopping

Post by socram »

Thanks for your reply!

It does not really kill itself, it runs through perfectly fine and ends with "Done ヾ(@⌒ー⌒@)ノ"
Then, the container stops.

For now, I am using watchmedo to trigger on new items which then starts the container, however, that's not a perfectly nice sulotion since I have to work with "sleep" to make sure everything is completely extracted.

Anything else I can debug here?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Docker - filebot:watcher is stopping

Post by rednoah »

socram wrote: 08 Aug 2021, 07:58 It does not really kill itself, it runs through perfectly fine and ends with "Done ヾ(@⌒ー⌒@)ノ"
filebot will print that line every time filebot is called, which happens in an infinite loop:
https://github.com/filebot/filebot-dock ... atcher#L18


You'll want to find out why inotifywait exits when it should run indefinitely:
https://github.com/filebot/filebot-dock ... watcher#L3

Code: Select all

-m, --monitor
Instead of exiting after receiving a single event, execute indefinitely.
:idea: Please read the FAQ and How to Request Help.
socram
Posts: 6
Joined: 24 Jan 2021, 20:59

Re: Docker - filebot:watcher is stopping

Post by socram »

Hi,

to help others which might have the same issue. For some reason the entrypoint was not correct. It was "filebot" instead of "/opt/bin/filebot-watcher"

I hope this helps someone else.

Kind regards
socram
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Docker - filebot:watcher is stopping

Post by rednoah »

:idea: The filebot entry point is the filebot command-line tool, which doesn't watch files.


:idea: /opt/bin/filebot-watcher is the entry point for the shell script that uses inotifywait to watch for changes, and then call filebot in response to those changes.


:arrow: Dockerfile.watcher looks good:

Code: Select all

ENTRYPOINT ["/opt/bin/filebot-watcher"]

:arrow: Purge all docker images and then re-download from scratch I guess, just to make sure we're all on the same page.
:idea: Please read the FAQ and How to Request Help.
Post Reply