RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable / Authorization failed. The request you have made requires authentication. from 10.0.0.11 [closed]
I have just completed the base installation of Mitaka on Ubuntu 14.04.4. I attempted my first log in to the dashboard and got the following errors. I attempted two other answers to similar issues: Any Thoughts?
UPDATE:
I came across this post while searching stackoverflow "unable to create new session key":
This is the post on stackoverflow " I was getting this error running a local, development version of a Django project, because it was periodically having trouble connecting to a non-local cache. I realized that I could change my session backend to a file-based session to address the issue .
In the settings file for this local, development version of Django, I simply set the following value:
SESSION_ENGINE = 'django.contrib.sessions.backends.file' "
I found that in /etc/openstack-dashboard/local_settings.py if i change SESSION_ENGINE = 'django.contrib.sessions.backends.cache' to SESSION_ENGINE = 'django.contrib.sessions.backends.file' I can log in. I am not sure what this does yet so I am continuing researching this. The post recommends not to set this is PRODUCTION environments . I hope this helps in finding the solution.
UPDATE: django.contrib.sessions.backends.file' writes the session files to /tmp directory so my first thought is that it it does not know the location of the session store or it cant read or write to it. I Don't know where the session store is located yet.
ATTEMPTED SOLUTIONS
**Tried this first:**
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': 'controller1:11211', } } If I use the fqdn (e.g controller1) in the location it fails, try changing it to the IP (e.g. 10.0.0.11 or 127.0.0.1).
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '10.0.0.11:11211', } }
**Tried this second:**
restart your memcached service and delete all seesions from /tmp folder and also delete your cookies and cache from browser.
ERROR LOGS
**/var/log/apache2/error.log**
[Thu Apr 28 11:25:07.531778 2016] [:error] [pid 3305:tid 140348774455040] Login successful for user "admin".
[Thu Apr 28 11:25:11.385729 2016] [:error] [pid 3305:tid 140348774455040] Internal Server Error: /horizon/auth/login/
[Thu Apr 28 11:25:11.385827 2016] [:error] [pid 3305:tid 140348774455040] Traceback (most recent call last):
[Thu Apr 28 11:25:11.385853 2016] [:error] [pid 3305:tid 140348774455040] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
[Thu Apr 28 11:25:11.385859 2016] [:error] [pid 3305:tid 140348774455040] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Thu Apr 28 11:25:11.385864 2016] [:error] [pid 3305:tid 140348774455040] File "/usr/lib/python2.7/dist-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
[Thu Apr 28 11:25:11.385870 2016] [:error] [pid 3305:tid 140348774455040] return view(request, *args, **kwargs)
[Thu Apr 28 11:25:11.385874 2016] [:error] [pid 3305:tid 140348774455040] File "/usr/lib ...