chibicitiberiu/ytsm

Docker image doesn't compile and run

Closed this issue · 12 comments

After the config changes, the image no longer compiles and runs as a container.

Receive the following error

Failed to read file /usr/src/ytsm/config/defaults.ini
[2018-11-03 18:46:01 +0000] [13] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/usr/src/ytsm/app/YtManager/wsgi.py", line 16, in <module>
    application = get_wsgi_application()
  File "/usr/local/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
    django.setup(set_prefix=False)
  File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 19, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 57, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 107, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/src/ytsm/app/YtManager/settings.py", line 226, in <module>
    load_config_ini()
  File "/usr/src/ytsm/app/YtManager/settings.py", line 170, in load_config_ini
    raise Exception('Cannot read file ' + DEFAULTS_FILE)
Exception: Cannot read file /usr/src/ytsm/config/defaults.ini

I have the same issue I believe. It says it is running but I do not see it in the docker stats

this is the command I use
docker run -d --name ytsm -p 8001:8000 --volume /tmp/download:/usr/src/app/data/downloads chibicitiberiu/ytsm:latest

Closing as fixed.

docker run -d --name ytsm -p 8002:8000 --volume downloads:/usr/src/app/data/downloads chibicitiberiu/ytsm:latest

This still does not run for me, docker stats does not show any ytsm

Neither this

docker run -d --name ytsm -p 8002:8000 --volume /media/O/_temp:/usr/src/ytsm/data --volume /media/ytsm/config:/usr/src/ytsm/config chibicitiberiu/ytsm:latest

Are you able to run docker log ytsm and put the output here?

that just gives me docker help lines.

Ok I think you meant docker logs

docker run -d --name ytsm -p 8002:8000 --volume downloads:/usr/src/ytsm/data --volume config:/usr/src/ytsm/config chibicitiberiu/ytsm:latest

There is downloads and config folders where I run docker command.

docker logs ytsm
Failed to read file /usr/src/ytsm/config/config.ini
Traceback (most recent call last):
  File "./manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 325, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 57, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 107, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/src/ytsm/app/YtManager/settings.py", line 228, in <module>
    load_config_ini()
  File "/usr/src/ytsm/app/YtManager/settings.py", line 175, in load_config_ini
    raise Exception('Cannot read file ' + CONFIG_FILE)
Exception: Cannot read file /usr/src/ytsm/config/config.ini
[2018-11-10 02:05:20 +0000] [9] [INFO] Starting gunicorn 19.9.0
[2018-11-10 02:05:20 +0000] [9] [INFO] Listening at: http://0.0.0.0:8000 (9)
[2018-11-10 02:05:20 +0000] [9] [INFO] Using worker: sync
[2018-11-10 02:05:20 +0000] [12] [INFO] Booting worker with pid: 12
[2018-11-10 02:05:20 +0000] [13] [INFO] Booting worker with pid: 13
[2018-11-10 02:05:20 +0000] [14] [INFO] Booting worker with pid: 14
[2018-11-10 02:05:20 +0000] [15] [INFO] Booting worker with pid: 15
[2018-11-10 02:05:20 +0000] [13] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/usr/src/ytsm/app/YtManager/wsgi.py", line 16, in <module>
    application = get_wsgi_application()
  File "/usr/local/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
    django.setup(set_prefix=False)
  File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 19, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 57, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 107, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/src/ytsm/app/YtManager/settings.py", line 228, in <module>
    load_config_ini()
  File "/usr/src/ytsm/app/YtManager/settings.py", line 175, in load_config_ini
    raise Exception('Cannot read file ' + CONFIG_FILE)
Exception: Cannot read file /usr/src/ytsm/config/config.ini
[2018-11-10 02:05:20 +0000] [13] [INFO] Worker exiting (pid: 13)
Failed to read file /usr/src/ytsm/config/config.ini
[2018-11-10 02:05:20 +0000] [14] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/usr/src/ytsm/app/YtManager/wsgi.py", line 16, in <module>
    application = get_wsgi_application()
  File "/usr/local/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
    django.setup(set_prefix=False)
  File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 19, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 57, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 107, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/src/ytsm/app/YtManager/settings.py", line 228, in <module>
    load_config_ini()
  File "/usr/src/ytsm/app/YtManager/settings.py", line 175, in load_config_ini
    raise Exception('Cannot read file ' + CONFIG_FILE)
Exception: Cannot read file /usr/src/ytsm/config/config.ini
[2018-11-10 02:05:20 +0000] [12] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/usr/src/ytsm/app/YtManager/wsgi.py", line 16, in <module>
    application = get_wsgi_application()
  File "/usr/local/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
    django.setup(set_prefix=False)
  File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 19, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
Failed to read file /usr/src/ytsm/config/config.ini
Failed to read file /usr/src/ytsm/config/config.ini
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 57, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 107, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/src/ytsm/app/YtManager/settings.py", line 228, in <module>
    load_config_ini()
  File "/usr/src/ytsm/app/YtManager/settings.py", line 175, in load_config_ini
    raise Exception('Cannot read file ' + CONFIG_FILE)
Exception: Cannot read file /usr/src/ytsm/config/config.ini
[2018-11-10 02:05:20 +0000] [12] [INFO] Worker exiting (pid: 12)
[2018-11-10 02:05:20 +0000] [14] [INFO] Worker exiting (pid: 14)
[2018-11-10 02:05:20 +0000] [15] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/usr/src/ytsm/app/YtManager/wsgi.py", line 16, in <module>
    application = get_wsgi_application()
  File "/usr/local/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
    django.setup(set_prefix=False)
  File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 19, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 57, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 107, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/src/ytsm/app/YtManager/settings.py", line 228, in <module>
    load_config_ini()
  File "/usr/src/ytsm/app/YtManager/settings.py", line 175, in load_config_ini
    raise Exception('Cannot read file ' + CONFIG_FILE)
Exception: Cannot read file /usr/src/ytsm/config/config.ini
Failed to read file /usr/src/ytsm/config/config.ini
[2018-11-10 02:05:20 +0000] [15] [INFO] Worker exiting (pid: 15)
[2018-11-10 02:05:20 +0000] [9] [INFO] Shutting down: Master
[2018-11-10 02:05:20 +0000] [9] [INFO] Reason: Worker failed to boot.



Nevermind, I think, I guess one has to provide full path to downloads and configs. I am testing the docker version now.

Whoops, yeah I meant logs. Sorry for missing the s.

I'm pretty sure when mapping volumes on the command line/terminal you have to use the full path.

Does it work when testing that @gerroon ?

Yeah it seems to work with full paths, but there seems to be a catch. I am not getting an downloads or channel thumbnails at all. All empty.

Try doing a manual sync (the statusbar button should do that, there won't be any indication that it started). Does the app produce any log.log file (it used to be in the mapped config directory, but now it should be in the data mapped directory)?