Page 1 of 1
Problem with activating license in Docker
Posted: 16 Jun 2024, 17:09
by retikulum
Hi there
somehow filebot-watcher in Docker lost the license. After re-composing and entering the container and trying to add the license the following error occurs:
Code: Select all
filebot --license -e PUID=1000 -e PGID=100
WARNING: java.io.tmpdir directory does not exist
Did you read the manual?
└ https://www.filebot.net/manpage.html
Did you quote and escape your arguments correctly?
└ https://www.filebot.net/help/args.html
args[1] = --license
args[2] = -e
args[3] = PUID=1000
args[4] = -e
args[5] = PGID=100
File does not exist: /-e
Jun 16, 2024 5:06:31 PM java.util.prefs.FileSystemPreferences$1 run
WARNING: Couldn't create user preferences directory. User preferences are unusable.
Jun 16, 2024 5:06:31 PM java.util.prefs.FileSystemPreferences$1 run
WARNING: java.io.IOException: No such file or directory
Jun 16, 2024 5:06:33 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
WARNING: Could not lock User prefs. Unix error code 2.
Couldn't get file lock.
java.util.prefs.BackingStoreException: Couldn't get file lock.
at net.filebot.UserData.flush(Unknown Source)
at net.filebot.Main.shutdown(Unknown Source)
at net.filebot.Main.main(Unknown Source)
Re: Problem with activating license in Docker
Posted: 16 Jun 2024, 17:23
by retikulum
After some trial and error
Code: Select all
docker run --rm -it -v data:/data -e PUID=1000 -e PGID=100 rednoah/filebot --license
and entering the license gave this result:
Code: Select all
Initialize Cache folder: /data/filebot/cache
Initialize Logs folder: /data/filebot/logs
Initialize TemporaryFiles folder: /data/filebot/tmp
Initialize new disk cache: /data/filebot/cache/0
Activate License [X] on [Sun Jun 16 17:21:38 UTC 2024]
Write [FileBot License X (Valid-Until: 2071-08-15)] to [/data/filebot/license.txt]
FileBot License X (Valid-Until: 2071-08-15) has been activated successfully.
I hope it works
Re: Problem with activating license in Docker
Posted: 16 Jun 2024, 17:27
by rednoah
How do I activate my license?
Shell: Select all
docker run --rm -it -v data:/data rednoah/filebot --license
How to do I run the process inside the container as a different user?

Let's say you wanted to pass in custom environment variables. The
-e option is a
docker option and
not a
filebot option and so you would add those
-e options to the
docker command like so:
Shell: Select all
docker run --rm -it -e PUID=1000 -e PGID=100 -v data:/data rednoah/filebot --license
Re: Problem with activating license in Docker
Posted: 30 Jun 2024, 13:20
by retikulum
Well, this led to the aforementioned "successful activation"... But, after dropping some files in the following happend:
Code: Select all
Whoopsies! --action COPY requires a valid license.
* Consider using --action TEST
License Error: UNREGISTERED
________________________________________________
/ Please purchase a FileBot License: \
\ https://www.filebot.net/purchase.html#docker /
------------------------------------------------
\ . .
\ / `. .' "
\ .---. < > < > .---.
\ | \ \ - ~ ~ - / / |
_____ ..-~ ~-..-~
| | \~~~\.' `./~~~/
--------- \__/ \__/
.' O \ / / \ "
(_____, `._.' | } \/~~~/
`----. / } | / \__/
`-. | / | / `. ,~~|
~-.__| /_ - ~ ^| /- _ `..-'
| / | / ~-. `-. _ _ _
|_____| |_____| ~ - . _ _ _ _ _>
FileBot requires a valid license. Please run `filebot --license *.psm` to install your FileBot license.
* FileBot is running as [filebot] using [/data/filebot/license.txt]
* Use `-e PUID=0` and `-e PGID=0` to run FileBot as a different user
Bad License (>_<)
--------------------------------------------------------------------------------
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 -e PUID=1000 -e PGID=100 rednoah/filebot --license
--------------------------------------------------------------------------------
Re: Problem with activating license in Docker
Posted: 30 Jun 2024, 13:59
by rednoah

What
exactly are you doing? What is the command you use to install your license? What is the command you use to call
filebot to rename files? Please post verbatim all
docker commands and corresponding
complete console output.

The answer is almost certainly explained in
How do I activate my license? but you may need to arrive at the answer yourself to really understand how
docker volume mounts and
running programs as different users change the context in which a containerized program is running.

If you see the
"Hello! Do you need help Getting Started?" message on startup, then that means that
no license key exists at the expected file path, i.e.
filebot --license has not yet been called, or has been called but as a different user, different persistent storage, etc.
Re: Problem with activating license in Docker
Posted: 30 Jun 2024, 17:23
by retikulum
I just follow the instructions meticulously:
After the container ist set up, I run the command as root
Code: Select all
docker run --rm -it -v data:/data -e PUID=1000 -e PGID=100 rednoah/filebot --license
in the CLI.
Then I paste in the License text with PHP signature.
I receive the "activation successful" message, and after dopping a file in the extracted folder, like a few weeks before, it just "forgot" the license.
The Docker ist set up via compose:
Code: Select all
version: '3.3'
services:
filebot:
container_name: filebot-watcher
image: rednoah/filebot:watcher
restart: unless-stopped
environment:
- PUID=1000
- PGID=100
volumes:
- /Data/Docker/FileBot2:/data
- /Data:/volume1
command: /volume1/Downloads/EXTRACTED --output /volume1/Media -script fn:amc --lang de --def movieFormat="/volume1/Media/Movies/{emby.id}" seriesFormat="/volume1/Media/Series/{n}/Season {s.pad(2)}/{n} - {s00e00} - {t}" --action COPY --log-file /volume1/Media/amc.log -non-strict
Re: Problem with activating license in Docker
Posted: 30 Jun 2024, 18:38
by rednoah
How do I activate my license? wrote:

You are using
(A) -v data:/data when installing your license. You then effectively
"switch hard drives" when you run with
(B) volumes: /Data/Docker/FileBot2:/data and so the license installed into
(A) named-volume data is predictably not there in
(B) /Data/Docker/FileBot2 mapped host volume because it wasn't installed there.

You need to use the
same volume mappings
(i.e. data:/data or /Data/Docker/FileBot2:/data) in
both docker command-line calls and docker compose configuration, otherwise each container is running with a different hard drive attached. You now understand
docker volume mounts from experience.

e.g. install your license into your
/Data/Docker/FileBot2 host folder, so that your other container running with the same volume mounts and same environment variables can then pick it up from there:
Shell: Select all
docker run --rm -it -v /Data/Docker/FileBot2:/data -e PUID=1000 -e PGID=100 rednoah/filebot --license
Re: Problem with activating license in Docker
Posted: 07 Jul 2024, 17:38
by retikulum
This command returned:
WARNING: java.io.tmpdir directory does not exist
But nevertheless the output after inserting the license was again a successful activation. I will try it with new media.
Edit:
Error message still there:
Code: Select all
FileBot requires a valid license. Please run `filebot --license *.psm` to install your FileBot license.
* FileBot is running as [filebot] using [/data/filebot/license.txt]
* Use `-e PUID=0` and `-e PGID=0` to run FileBot as a different user
Bad License (>_<)
Re: Problem with activating license in Docker
Posted: 08 Jul 2024, 09:20
by rednoah

This warning means that the user data folder does not yet exist on startup, i.e.
filebot is running for the first time for all accounts and purposes, likely due to
-v /
volumes not being configured correctly, because you're definitely not calling
filebot for the first time at this point:
Code: Select all
WARNING: java.io.tmpdir directory does not exist

Can you confirm that you are now using the correct same environment variables and volume mappings at all times in all your docker / docker compose calls?

You can also manually put the license file where it needs to be, i.e. the following file path
from the container-point-of-view: