Ask Your Question

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 [closed]

asked 2016-04-28 13:52:16 -0500

rrottach gravatar image

updated 2016-04-28 16:49:05 -0500

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? 

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/ 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.


**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. or

SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '', } }

**Tried this second:**
restart your memcached service and delete all seesions from /tmp folder and also delete your cookies and cache from browser.


[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/", 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/", 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 ...
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by rrottach
close date 2016-04-28 18:10:07.963642

1 answer

Sort by » oldest newest most voted

answered 2016-04-28 18:09:10 -0500

rrottach gravatar image

I figure out my problem: The problem is I did not see the note after you edit /etc/memcached.conf file. I had to change this line -l to this line -l Dumb mistake but I hope it helps others out.

edit flag offensive delete link more


Hi, Thanks for the help. I have changed to -l in /etc/memcached.conf

Veerendra gravatar imageVeerendra ( 2016-09-29 08:45:22 -0500 )edit

It works for me, too ! Thanks a lot. But don't forget “service memcached restart".

geloutingxue gravatar imagegeloutingxue ( 2017-02-20 23:36:19 -0500 )edit

Thank you! It helped me. In my installation, the file was at /etc/sysconfig/memcached

Marcio_SP gravatar imageMarcio_SP ( 2017-02-25 19:07:59 -0500 )edit

It works !! Thanks you.

salman shajahan gravatar imagesalman shajahan ( 2017-03-02 21:40:50 -0500 )edit

Yes, it works! change the /etc/memcached.conf >> -l (small L letter) to -l x.x.x.x (your management ip of controller. ) then, you must restart the service with " service memcached restart"

tarek.awadallah gravatar imagetarek.awadallah ( 2017-03-29 03:17:22 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-04-28 13:52:16 -0500

Seen: 11,724 times

Last updated: Apr 28 '16