Project

General

Profile

Bug #2558

Task #2434: Update the web-server

admin page doesn't show up

Added by Luke Murphey almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
12/31/2019
Due date:
% Done:

100%

Associated revisions

Revision 1008 (diff)
Added by luke.murphey almost 5 years ago

Adding logging of failure to load version info

Reference #2558

History

#1 Updated by Luke Murphey almost 5 years ago

Obs:
  • This works on my local host.
  • This doesn't work even when proxying via SSH
  • The version number is missing on the admin page
Qs:
  • What does w3m see when browsing locally?
    • Nothing
  • What does Firefox see when browsing locally?
    • Doesn't work
  • Is the localhost on a different range?
    • Server: 172.17.0.3
  • Are their any error messages?
    OSError: [Errno 2] No such file or directory: '/usr/src/app/var/cache/tmpGfsjmy'
    root@a76721f997a8:/usr/src/app/var/log# tail app.log
        num = len(clone)
      File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 232, in __len__
        self._fetch_all()
      File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 1121, in _fetch_all
        self._result_cache = list(self._iterable_class(self))
      File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 53, in __iter__
        results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
      File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
        raise original_exception
    OperationalError: no such table: django_session
    root@a76721f997a8:/usr/src/app/var/log# tail app.log
        return self.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/templatetags/cache.py", line 49, in render
        fragment_cache.set(cache_key, value, expire_time)
      File "/usr/local/lib/python2.7/site-packages/django/core/cache/backends/filebased.py", line 51, in set
        fd, tmp_path = tempfile.mkstemp(dir=self._dir)
      File "/usr/local/lib/python2.7/tempfile.py", line 314, in mkstemp
        return _mkstemp_inner(dir, prefix, suffix, flags)
      File "/usr/local/lib/python2.7/tempfile.py", line 244, in _mkstemp_inner
        fd = _os.open(file, flags, 0600)
    OSError: [Errno 2] No such file or directory: '/usr/src/app/var/cache/tmpT3SlD_'
    root@a76721f997a8:/usr/src/app/var/log# tail -n 100 app.log
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
        bit = node.render_annotated(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
        return self.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 177, in render
        return compiled_parent._render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 199, in _render
        return self.nodelist.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
        bit = node.render_annotated(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
        return self.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 72, in render
        result = block.nodelist.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
        bit = node.render_annotated(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
        return self.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/defaulttags.py", line 529, in render
        return self.nodelist.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
        bit = node.render_annotated(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
        return self.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/templatetags/cache.py", line 49, in render
        fragment_cache.set(cache_key, value, expire_time)
      File "/usr/local/lib/python2.7/site-packages/django/core/cache/backends/filebased.py", line 51, in set
        fd, tmp_path = tempfile.mkstemp(dir=self._dir)
      File "/usr/local/lib/python2.7/tempfile.py", line 314, in mkstemp
        return _mkstemp_inner(dir, prefix, suffix, flags)
      File "/usr/local/lib/python2.7/tempfile.py", line 244, in _mkstemp_inner
        fd = _os.open(file, flags, 0600)
    OSError: [Errno 2] No such file or directory: '/usr/src/app/var/cache/tmpT3SlD_'
    2019-12-31 20:33:44,091 [ERROR] django.request: Internal Server Error: /work/scytha
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
        response = get_response(request)
      File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
        response = self._get_response(request)
      File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
        response = self.process_exception_by_middleware(e, request)
      File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
        response = wrapped_callback(request, *callback_args, **callback_kwargs)
      File "/usr/src/app/reader/shortcuts/__init__.py", line 423, in return_cached_page_if_ajax
        result = fn(*args, **kwargs)
      File "/usr/src/app/reader/shortcuts/__init__.py", line 359, in ajax_switch
        return fn(*args, **kwargs)
      File "/usr/src/app/reader/views.py", line 580, in read_work
        RequestContext(request))
      File "/usr/local/lib/python2.7/site-packages/django/shortcuts.py", line 30, in render
        content = loader.render_to_string(template_name, context, request, using=using)
      File "/usr/local/lib/python2.7/site-packages/django/template/loader.py", line 68, in render_to_string
        return template.render(context, request)
      File "/usr/local/lib/python2.7/site-packages/django/template/backends/django.py", line 66, in render
        return self.template.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 207, in render
        return self._render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 199, in _render
        return self.nodelist.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
        bit = node.render_annotated(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
        return self.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 177, in render
        return compiled_parent._render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 199, in _render
        return self.nodelist.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
        bit = node.render_annotated(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
        return self.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 177, in render
        return compiled_parent._render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 199, in _render
        return self.nodelist.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
        bit = node.render_annotated(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
        return self.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 72, in render
        result = block.nodelist.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
        bit = node.render_annotated(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
        return self.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/defaulttags.py", line 529, in render
        return self.nodelist.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 990, in render
        bit = node.render_annotated(context)
      File "/usr/local/lib/python2.7/site-packages/django/template/base.py", line 957, in render_annotated
        return self.render(context)
      File "/usr/local/lib/python2.7/site-packages/django/templatetags/cache.py", line 49, in render
        fragment_cache.set(cache_key, value, expire_time)
      File "/usr/local/lib/python2.7/site-packages/django/core/cache/backends/filebased.py", line 51, in set
        fd, tmp_path = tempfile.mkstemp(dir=self._dir)
      File "/usr/local/lib/python2.7/tempfile.py", line 314, in mkstemp
        return _mkstemp_inner(dir, prefix, suffix, flags)
      File "/usr/local/lib/python2.7/tempfile.py", line 244, in _mkstemp_inner
        fd = _os.open(file, flags, 0600)
    OSError: [Errno 2] No such file or directory: '/usr/src/app/var/cache/tmpT3SlD_'
    

    2019-12-31 20:39:12,416 [ERROR] django.request: Internal Server Error: /admin/login/
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
        response = get_response(request)
      File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
        response = self._get_response(request)
      File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
        response = self.process_exception_by_middleware(e, request)
      File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
        response = wrapped_callback(request, *callback_args, **callback_kwargs)
      File "/usr/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
        response = view_func(request, *args, **kwargs)
      File "/usr/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 366, in login
        if request.method == 'GET' and self.has_permission(request):
      File "/usr/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 187, in has_permission
        return request.user.is_active and request.user.is_staff
      File "/usr/local/lib/python2.7/site-packages/django/utils/functional.py", line 238, in inner
        self._setup()
      File "/usr/local/lib/python2.7/site-packages/django/utils/functional.py", line 386, in _setup
        self._wrapped = self._setupfunc()
      File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/middleware.py", line 24, in <lambda>
        request.user = SimpleLazyObject(lambda: get_user(request))
      File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/middleware.py", line 12, in get_user
        request._cached_user = auth.get_user(request)
      File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 211, in get_user
        user_id = _get_user_session_key(request)
      File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 61, in _get_user_session_key
        return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])
      File "/usr/local/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py", line 57, in __getitem__
        return self._session[key]
      File "/usr/local/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py", line 207, in _get_session
        self._session_cache = self.load()
      File "/usr/local/lib/python2.7/site-packages/django/contrib/sessions/backends/db.py", line 35, in load
        expire_date__gt=timezone.now()
      File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
        return getattr(self.get_queryset(), name)(*args, **kwargs)
      File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 374, in get
        num = len(clone)
      File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 232, in __len__
        self._fetch_all()
      File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 1121, in _fetch_all
        self._result_cache = list(self._iterable_class(self))
      File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line 53, in __iter__
        results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
      File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
        raise original_exception
    OperationalError: no such table: django_session
    
  • Does the session table exist?
Possible Fixes:
  • The django IP filter setting is preventing it from working
  • The context processor is failing
  • Run migration
    • python manage.py migrate --database=default
    • Remade superuser, this worked

#2 Updated by Luke Murphey almost 5 years ago

I updated the build and now it doesn't work locally.

#3 Updated by Luke Murphey almost 5 years ago

  • Status changed from New to In Progress

#4 Updated by Luke Murphey almost 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

Still doesn't work online.

#5 Updated by Luke Murphey almost 5 years ago

  • Status changed from Closed to In Progress
  • % Done changed from 100 to 50

#6 Updated by Luke Murphey almost 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

Also available in: Atom PDF