On premises webserver when login return 500 error


#1

Hi I have install on premises webserver to my server ubuntu 18.04 with latest version of OpenALPR.

The login page is open properly but when I try to login it return 500 error. The log show as below.

ERROR 2019-11-11 07:40:36,599 /usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/handlers/exception.py:handle_uncaught_exception:135 3344 139823274918760 Internal Server Error: /account/login/
Traceback (most recent call last):
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/usr/share/openalpr-web/venv/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/share/openalpr-web/venv/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/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/auth/views.py”, line 54, in inner
return func(*args, **kwargs)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/auth/views.py”, line 150, in login
)(request)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/decorators.py”, line 67, in _wrapper
return bound_func(*args, **kwargs)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/views/decorators/debug.py”, line 76, in sensitive_post_parameters_wrapper
return view(request, *args, **kwargs)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/decorators.py”, line 63, in bound_func
return func.get(self, type(self))(*args2, **kwargs2)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/decorators.py”, line 67, in _wrapper
return bound_func(*args, **kwargs)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/decorators.py”, line 149, in _wrapped_view
response = view_func(request, *args, **kwargs)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/decorators.py”, line 63, in bound_func
return func.get(self, type(self))(*args2, **kwargs2)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/decorators.py”, line 67, in _wrapper
return bound_func(*args, **kwargs)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/views/decorators/cache.py”, line 57, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/utils/decorators.py”, line 63, in bound_func
return func.get(self, type(self))(*args2, **kwargs2)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/auth/views.py”, line 90, in dispatch
return super(LoginView, self).dispatch(request, *args, **kwargs)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/views/generic/base.py”, line 88, in dispatch
return handler(request, *args, **kwargs)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/views/generic/edit.py”, line 183, in post
return self.form_valid(form)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/auth/views.py”, line 119, in form_valid
auth_login(self.request, form.get_user())
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/auth/init.py”, line 140, in login
request.session.cycle_key()
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py”, line 311, in cycle_key
self.create()
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/sessions/backends/db.py”, line 50, in create
self._session_key = self._get_new_session_key()
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py”, line 164, in _get_new_session_key
if not self.exists(session_key):
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/contrib/sessions/backends/cached_db.py”, line 58, in exists
if session_key and (self.cache_key_prefix + session_key) in self._cache:
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/django/core/cache/backends/base.py”, line 203, in contains
return self.has_key(key)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/redis_cache/backends/base.py”, line 30, in wrapped
return method(self, client, key, *args, **kwargs)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/redis_cache/backends/base.py”, line 367, in has_key
return client.exists(key)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/redis/client.py”, line 1307, in exists
return self.execute_command(‘EXISTS’, *names)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/redis/client.py”, line 836, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/redis/connection.py”, line 1222, in get_connection
connection.connect()
File “/usr/share/openalpr-web/venv/lib/python2.7/site-packages/redis/connection.py”, line 543, in connect
raise ConnectionError(self._error_message(e))
ConnectionError: Error 111 connecting to localhost:6379. Connection refused.


#2

For some reason Redis is not running. You can start it with:
sudo /etc/init.d/redis-server restart

There may be more information about why it might have stopped in the Redis log file:
/var/log/redis/redis-server.log