Closed terrytw closed 1 month ago
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
If you're using a custom config file location you have to pass that to flexget when running from the CLI, e.g. flexget -c /config/flexget.yml daemon status
I can't replicate the log issue, the log file gets created in the default location regardless of where the config file is (unless you change the log location).
unless you change the log location
Yes exactly, when the log file is not at the default location (e.g. use -e FG_LOG_FILE=/config/log/flexget.log
), there will be 2 log files, 1 is at /config/log/flexget.log
and that is the real one, a second empty one is also created next to the config file.
I don't understand what the issue is here. We start the process/service in a specific way where we define the config file location as well as the log file location. Those paths and files are created as part of the container init: https://github.com/linuxserver/docker-flexget/blob/main/root/etc/s6-overlay/s6-rc.d/svc-flexget/run#L4-L7
If you exec into the container later, and run manual commands where you define different things as parameters, or not define them at all, you will have files created elsewhere.
We don't support running manual commands inside the container unless we tell you to or document in the readme because doing so often conflicts with our init and intended behaviors.
There are 2 separate issues here, I thought they were the symptoms of the same issue, but it turns out they are not.
Just try this:
docker run -d \
--name flexget1 \
--hostname flexget1 \
-e FG_WEBUI_PASSWORD=asdg987YSA68dsg \
-e FG_LOG_LEVEL=info \
-e FG_LOG_FILE=/config/log/flexget.log \
-e FG_CONFIG_FILE=/config/config.yml \
-v /path/to/data:/data \
-v /path/to/config:/config \
ghcr.io/linuxserver/flexget
Change only the mount path on host, and leave everything else as is. You don't have to run any manual command.
There will 2 log files, 1 in /config (empty), 1 in /config/log (real)
Changing log file with docker environment variable is documented in the readme. It should be supported without unintended outcome.
Change only the mount path on host, and leave everything else as is. You don't have to run any manual command.
Thanks, that's something we can act on. I think I identified the issue, just need to do some testing.
Yup, our bad. It's this line that causes the creation of that log file: https://github.com/linuxserver/docker-flexget/blob/main/root/etc/s6-overlay/s6-rc.d/init-flexget-config/run#L32
If you set a WebUI password, our init runs the flexget command without defining a log file so flexget creates one in the home folder and that is never used ever again.
Is there an existing issue for this?
Current Behavior
When config.yaml is not at the default
/config/.flexget
directory, if you runflexget daemon status
, the flexget daemon manager will report:Flexget is still running, but you can't manually execute tasks like
flexget execute --tasks download
, it will report the same error.On the same note, when log file is not at the same directory as config.yaml, an empty
flexget.log
is created alongsideconfig.yaml
Expected Behavior
Able to run
flexget execute
manually, and no empty log file being created.Steps To Reproduce
Just run the docker container
Environment
CPU architecture
x86-64
Docker creation
Container logs