Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to start docker with default docker-compose.yml from README.md without issues. #75

Open
kopax opened this issue Sep 21, 2020 · 1 comment

Comments

@kopax
Copy link

kopax commented Sep 21, 2020

Within the container, I have:

root@0dfdc7f74c83:/config# ls -altr
total 12
-rwxrwxrwx 1 abc  users  183 Sep 21 23:59 config.yml
drwxrwxrwx 2 abc  users 4096 Sep 21 23:59 .

But it crash on startup with:

2020-09-22 00:09:05 DEBUG    manager                       Figuring out config load paths
2020-09-22 00:09:05 CRITICAL manager                       Failed to find configuration file config.yml
2020-09-22 00:09:05 INFO     manager                       Tried to read from: /run/s6/services/flexget, /root/.flexget, /root/.config/flexget
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/flexget/__init__.py", line 18, in main
    manager = Manager(args)
  File "/usr/lib/python3.7/site-packages/flexget/manager.py", line 147, in __init__
    self._init_config(create=False)
  File "/usr/lib/python3.7/site-packages/flexget/manager.py", line 611, in _init_config
    raise OSError('No configuration file found.')
OSError: No configuration file found.
2020-09-22 00:09:06 DEBUG    manager                       Figuring out config load paths
2020-09-22 00:09:06 CRITICAL manager                       Failed to find configuration file config.yml
2020-09-22 00:09:06 INFO     manager                       Tried to read from: /run/s6/services/flexget, /root/.flexget, /root/.config/flexget
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/flexget/__init__.py", line 18, in main
    manager = Manager(args)
  File "/usr/lib/python3.7/site-packages/flexget/manager.py", line 147, in __init__
    self._init_config(create=False)
  File "/usr/lib/python3.7/site-packages/flexget/manager.py", line 611, in _init_config
    raise OSError('No configuration file found.')
OSError: No configuration file found.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
2020-09-22 00:09:07 DEBUG    manager                       Figuring out config load paths
2020-09-22 00:09:07 CRITICAL manager                       Failed to find configuration file config.yml
2020-09-22 00:09:07 INFO     manager                       Tried to read from: /run/s6/services/flexget, /root/.flexget, /root/.config/flexget
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/flexget/__init__.py", line 18, in main
    manager = Manager(args)
  File "/usr/lib/python3.7/site-packages/flexget/manager.py", line 147, in __init__
    self._init_config(create=False)
  File "/usr/lib/python3.7/site-packages/flexget/manager.py", line 611, in _init_config
    raise OSError('No configuration file found.')
OSError: No configuration file found.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
root@master-letort-01:/srv/nas/flexget/config# ls -altr
total 12
drwxrwxrwx 3 root  root  4096 Sep 21 23:26 ..
-rwxrwxrwx 1 kopax kopax  183 Sep 21 23:59 config.yml
-rwxrwxrwx 1 kopax kopax    0 Sep 22 00:07 .password-lock             # <-- created with touch and empty
drwxrwxrwx 2 kopax kopax 4096 Sep 22 00:07 .

This is /config/config.yaml:

web_server: yes

schedules:
  - tasks: '*'
    interval:
      minutes: 1

tasks:
  test task:
    rss: https://rss.example.com/myfeed.rss
    series:
      - My Favorite Show

I expected it to start without errors.

This is the command used to start the container with the following command:

docker \
  -e FLEXGET_LOG_LEVEL=debug \
  -e PUID=1000 \
  -e PGID=1000 \
   -e TORRENT_PLUGIN=transmission \
  -e TZ=Europe/Paris \
  -e WEB_PASSWD=<secret> \
  -v /srv/transmission/downloads:/downloads:rw \
  -v /srv/flexget/config:/config:rw \
   --net bridge \
  -p 31770:5050/tcp \
  --name \
  cpoppema/docker-flexget:latest

Also, in the UI, it says to create the .password-lock using flexget cli:

The Web UI is protected by a login, you need to either set the WEB_PASSWD environment variable or setup a user after starting this docker:

Connect with the running docker:

docker exec -it flexget bash

If your configuration file is named "config.yml" you can setup a password like this:

flexget -c /config/config.yml web passwd <some_password>

I have tried to execute this within the running cpoppema/docker-flexget:latest container and:

bash: flexget: command not found
@cpoppema
Copy link
Owner

Hello @kopax. I ran the following to test out the issues you're pointing out.

 $    docker run --rm \
  -e FLEXGET_LOG_LEVEL=debug \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TORRENT_PLUGIN=transmission \
  -e TZ=Europe/Paris \
  -e WEB_PASSWD=itsa123secret \
  -v /local/sandbox/docker-flexget/flexget-clean/:/config:rw \
  --net bridge \
  -p 31770:5050/tcp \
  --name=flexget \
  cpoppema/docker-flexget:latest

[..]

2020-09-28 08:43:00 DEBUG    plugin                        Trying to load components from: ['/root/.flexget/components', '/usr/lib/python3.7/site-packages/flexget/components']
2020-09-28 08:43:00 DEBUG    plugin                        Plugins took 1.13 seconds to load. 306 plugins in registry.
2020-09-28 08:43:00 DEBUG    manager                       Connecting to: sqlite:////root/.flexget/db-config.sqlite
2020-09-28 08:43:01 DEBUG    manager                       config_name: config
2020-09-28 08:43:01 DEBUG    manager                       config_base: /root/.flexget
2020-09-28 08:43:01 DEBUG    manager                       New config data loaded.
2020-09-28 08:43:01 DEBUG    schema                        current flexget version already exist in db 3.1.71
2020-09-28 08:43:01 DEBUG    parsing                       setting default movie parser to internal. (options: {'internal': <flexget.components.parsing.parsers.parser_internal.ParserInternal object at 0x7f3ffd7b7f50>, 'guessit': <flexget.components.parsing.parsers.parser_guessit.ParserGuessit object at 0x7f3ffd7bb190>})
2020-09-28 08:43:01 DEBUG    parsing                       setting default series parser to internal. (options: {'internal': <flexget.components.parsing.parsers.parser_internal.ParserInternal object at 0x7f3ffd7b7f50>, 'guessit': <flexget.components.parsing.parsers.parser_guessit.ParserGuessit object at 0x7f3ffd7bb190>})
2020-09-28 08:43:01 INFO     web_server_daemon                 Running web server at IP 0.0.0.0:5050
2020-09-28 08:43:01 INFO     web_server_daemon                 Initiating API
2020-09-28 08:43:01 INFO     web_server_daemon                 Registering WebUI v2
2020-09-28 08:43:01 DEBUG    irc                           No irc connections defined in the config
2020-09-28 08:43:01 INFO     web_server                    Web server started at http://172.17.0.2:5050
2020-09-28 08:43:01 INFO     web_server                    API available at http://172.17.0.2:5050/api
2020-09-28 08:43:01 INFO     web_server                    WebUI (v2) available at http://172.17.0.2:5050/
2020-09-28 08:43:01 INFO     scheduler                     Starting scheduler
2020-09-28 08:43:01 INFO     apscheduler.scheduler                 Scheduler started
2020-09-28 08:43:01 INFO     apscheduler.scheduler                 Added job "*" to job store "default"
2020-09-28 08:43:01 INFO     apscheduler.scheduler                 Resumed scheduler job processing
2020-09-28 08:43:01 DEBUG    apscheduler.scheduler                 Looking for jobs to run

/root/.flexget is a symlink to /config, can you confirm the filesystem permissions for /srv/flexget/config ?

That however should not impact your other problem of setting the password and the error "command not found."

 $    docker exec -it flexget bash
root@13fad8dbf8d5:/# flexget -c /config/config.yml web passwd itsa456secret
There is a FlexGet process already running for this config, sending execution there.
Updated password

What do you see when you run the following ?

 $    docker exec -it flexget find / -name \*flexget\* | sort
/config/flexget.log
/etc/cont-init.d/20-update-flexget
/etc/services.d/flexget
/root/.flexget
/run/s6/services/flexget
/usr/bin/flexget
/usr/bin/flexget-headless
/usr/lib/python3.7/site-packages/flexget
/usr/lib/python3.7/site-packages/flexget/resources/flexget.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants