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

Docker installation broken #300

Closed
Rafiot opened this issue Dec 19, 2017 · 11 comments
Closed

Docker installation broken #300

Rafiot opened this issue Dec 19, 2017 · 11 comments

Comments

@Rafiot
Copy link
Contributor

Rafiot commented Dec 19, 2017

First of all, I never used Django before, so the issue I encountered might sound obvious, sorry for that.

I tried to install pretalx from the docker documentation (https://docs.pretalx.org/en/latest/administrator/simple_docker.html)

Expected Behavior

Loading https://<url>/ and seeing a page with content.

Current Behavior

Blank page.

Error log:

Dec 19 00:42:10 s docker[17323]: WARNING 2017-12-18 17:42:10,364 django.request base Not Found: /static/vendored/fullcalendar/fullcalendar.min.ba055a2cd2b3.css                                                                                                                                                  
Dec 19 00:42:10 s docker[17323]: WARNING 2017-12-18 17:42:10,364 django.request base Not Found: /static/vendored/fullcalendar/fullcalendar.min.ba055a2cd2b3.css                                                                                                                                                  
Dec 19 00:42:10 s docker[17323]: WARNING 2017-12-18 17:42:10,436 django.request base Not Found: /static/common/img/logo.c86a874657c9.svg             
Dec 19 00:42:10 s docker[17323]: WARNING 2017-12-18 17:42:10,436 django.request base Not Found: /static/common/img/logo.c86a874657c9.svg             

I never tried to open https://<url>/orga (btw, maybe redirecting to /orga when there are no CFP defined)

Possible Solution

Recommend a tagged version of pretalx (i.e. v0.2.2) in the documentation instead of master.

Your Environment

  • Version used: 53491c0
  • Server: Ubuntu 16.04 & Docker version 17.09.1-ce, build 19e2cf6
Rafiot added a commit to Rafiot/pretalx that referenced this issue Dec 19, 2017
@loelkes
Copy link

loelkes commented Dec 28, 2017

Seems like the same issue, so i would like to provide additional information.

Expected Behavior

Loading https://<url>/ and seeing a page with content.

Current Behavior

Screenshot

screen shot 2017-12-28 at 14 22 53

Error message I got per mail

mkdir: cannot create directory ‘/data/logs’: Permission denied
mkdir: cannot create directory ‘/data/media’: Permission denied
Traceback (most recent call last):
File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/pretix/src/pretix/main.py", line 9, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/init.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-packages/django/core/management/init.py", line 308, in execute
settings.INSTALLED_APPS
File "/usr/local/lib/python3.6/site-packages/django/conf/init.py", line 56, in getattr
self._setup(name)
File "/usr/local/lib/python3.6/site-packages/django/conf/init.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python3.6/site-packages/django/conf/init.py", line 110, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/local/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/pretix/src/production_settings.py", line 1, in
from pretix.settings import *
File "/pretix/src/pretix/settings.py", line 32, in
os.mkdir(LOG_DIR)
PermissionError: [Errno 13] Permission denied: '/data/logs'

From the docker log

WARNING 2017-12-28 07:26:38,321 django.request base Not Found: /static/vendored/typeahead.34a449069f27.css
WARNING 2017-12-28 07:26:38,321 django.request base Not Found: /static/vendored/typeahead.34a449069f27.css
WARNING 2017-12-28 07:26:38,321 django.request base Not Found: /static/vendored/fullcalendar/fullcalendar.min.ba055a2cd2b3.css
WARNING 2017-12-28 07:26:38,321 django.request base Not Found: /static/vendored/fullcalendar/fullcalendar.min.ba055a2cd2b3.css
WARNING 2017-12-28 07:26:38,363 django.request base Not Found: /static/common/img/icon_white.d36748aff433.svg
WARNING 2017-12-28 07:26:38,363 django.request base Not Found: /static/common/img/icon_white.d36748aff433.svg

Steps to Reproduce (for bugs)

  1. Pull the current git, build the docker and run it (update procedure from the manual).

Context

Installation using the Simple installation using Docker manual by the letter.

Your Environment

  • Version used: e9eb4a5
  • Server: Linux eventvm 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3 (2017-12-03) x86_64 GNU/Linux

@rixx
Copy link
Member

rixx commented Jan 7, 2018

I'm not sure why this started happening now, to be honest. I changed mkdir /data into mkdir /data/logs /data/media in the dockerfile, which might fix the issue, but I don't think so. Investigating.

@rixx rixx changed the title Current HEAD broken? Docker installation broken Jan 21, 2018
@rixx
Copy link
Member

rixx commented Feb 2, 2018

I have updated the Dockerfile again, and it ought to be fixed. I'll also update the documentation to show that installation via pip is much better supported than installation via Docker. Please reopen this issue if you still encounter the same issue, or create a new one if other things are broken.
Thanks for your reports, both!

@rixx rixx closed this as completed Feb 2, 2018
@loelkes
Copy link

loelkes commented Feb 18, 2018

I checked out the release v0.4.1.

There is an immense amount of error message if i try to access the images:

This is from the docker:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 135, in handle
self.handle_request(listener, req, client, addr)
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 146, in call
response = self.get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 81, in get_response
response = self._middleware_chain(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner
response = response_for_exception(request, exc)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 126, in handle_uncaught_exception
return callback(request, **param_dict)
File "/usr/local/lib/python3.6/site-packages/django/utils/decorators.py", line 142, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/defaults.py", line 75, in server_error
return HttpResponseServerError(template.render())
File "/usr/local/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 175, in render
return self._render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 167, in _render
return self.nodelist.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 943, in render
bit = node.render_annotated(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 910, in render_annotated
return self.render(context)
File "/usr/local/lib/python3.6/site-packages/compressor/templatetags/compress.py", line 131, in render
return self.render_compressed(context, self.kind, self.mode, forced=forced)
File "/usr/local/lib/python3.6/site-packages/compressor/templatetags/compress.py", line 90, in render_compressed
return self.render_offline(context)
File "/usr/local/lib/python3.6/site-packages/compressor/templatetags/compress.py", line 64, in render_offline
original_content = self.get_original_content(context)
File "/usr/local/lib/python3.6/site-packages/compressor/templatetags/compress.py", line 123, in get_original_content
return self.nodelist.render(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 943, in render
bit = node.render_annotated(context)
File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 910, in render_annotated
return self.render(context)
File "/usr/local/lib/python3.6/site-packages/django/templatetags/static.py", line 106, in render
url = self.url(context)
File "/usr/local/lib/python3.6/site-packages/django/templatetags/static.py", line 103, in url
return self.handle_simple(path)
File "/usr/local/lib/python3.6/site-packages/django/templatetags/static.py", line 118, in handle_simple
return staticfiles_storage.url(path)
File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/storage.py", line 155, in url
return self._url(self.stored_name, name, force)
File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/storage.py", line 134, in _url
hashed_name = hashed_name_func(*args)
File "/usr/local/lib/python3.6/site-packages/django/contrib/staticfiles/storage.py", line 422, in stored_name
raise ValueError("Missing staticfiles manifest entry for '%s'" % clean_name)
ValueError: Missing staticfiles manifest entry for 'common/scss/error.scss'

This is from the nginx (addresses redacted):

2018/02/18 21:44:06 [error] 24949#24949: *16617 connect() failed (111: Connection refused) while connecting to upstream, client: ::1, server: pretalx.example.de, request: "GET /favicon.ico/ HTTP/1.1", upstream: "http://[::1]:8089/favicon.ico/", host: "pretalx.example.de", referrer: "https://pretalx.example.de/"

Same setup as in the previous issue.

@rixx rixx reopened this Feb 18, 2018
@loelkes
Copy link

loelkes commented Feb 21, 2018

During docker build i get these weird errors:

docker build --no-cache -t pretalx/pretalx .

Version: HEAD

Building wheels for collected packages: pretalx, csscompressor, django-bootstrap4, django-libsass, inlinestyler, rules, urlman, vobject, rjsmin, rcssmin, django-jquery-js
Running setup.py bdist_wheel for pretalx: started
Running setup.py bdist_wheel for pretalx: finished with status 'error'
Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-vun5ip5r/pretalx/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmp636djbn8pip-wheel- --python-tag cp36:
running bdist_wheel
running build
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-vun5ip5r/pretalx/setup.py", line 109, in
cmdclass=cmdclass,
File "/usr/local/lib/python3.6/site-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 204, in run
self.run_command('build')
File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-vun5ip5r/pretalx/setup.py", line 23, in run
import django
ModuleNotFoundError: No module named 'django'


Failed building wheel for pretalx

@Janfred
Copy link

Janfred commented Feb 27, 2018

I've encountered the same issue when deploying with docker.

I only see a page with "Internal Server Error"

@loelkes
Copy link

loelkes commented Feb 27, 2018

I got it working with ade00e8

Please also see the updated documentation.

@rixx
Copy link
Member

rixx commented Mar 2, 2018

Since both @loelkes and I got the docker setup to work independently, I'll close this as fixed.

@rixx rixx closed this as completed Mar 2, 2018
@Janfred
Copy link

Janfred commented Mar 11, 2018

I've tried it again with the current master. I still have the same problem.

Is there a public docker container which I could use?

@rixx
Copy link
Member

rixx commented Mar 11, 2018

No, there is no public docker container.

If this issue persists, I'll probably rather withdraw the Dockerfiles and installation guide. I'm not familiar enough with Docker to remotely debug other peoples' issues with it, and I won't pretend to offer an installation method I can't/won't support.

@Janfred
Copy link

Janfred commented Mar 11, 2018

I also tried installation with pip, but I'm on a debian stable and afaik python3.6 is not yet available in the main repositories.
Installing python3.6 from the testing repository broke many things on my server (and I had to manually unistall some packets with things like "force ignore dependencies")

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

4 participants