Ask Your Question
0

RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.

asked 2017-08-30 06:03:19 -0600

liaodalin19903 gravatar image

In the dashboard, I can not login, and in the /var/log/httpd/error_log, I get the bellow error:

[Wed Aug 30 18:59:27.742156 2017] [:error] [pid 30986] Attempted scope to domain Default failed, will attemptto scope to another domain.
[Wed Aug 30 18:59:27.935474 2017] [:error] [pid 30986] Login successful for user "admin", remote address 118.116.90.43.
[Wed Aug 30 18:59:33.461313 2017] [:error] [pid 30986] Internal Server Error: /dashboard/auth/login/
[Wed Aug 30 18:59:33.461348 2017] [:error] [pid 30986] Traceback (most recent call last):
[Wed Aug 30 18:59:33.461353 2017] [:error] [pid 30986]   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response

...
 [Wed Aug 30 18:59:33.461520 2017] [:error] [pid 30986]     response = view_func(request, *args, **kwargs)
[Wed Aug 30 18:59:33.461522 2017] [:error] [pid 30986]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/views.py", line 51, in login
[Wed Aug 30 18:59:33.461525 2017] [:error] [pid 30986]     auth_login(request, form.get_user())
[Wed Aug 30 18:59:33.461528 2017] [:error] [pid 30986]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 110, in login
[Wed Aug 30 18:59:33.461531 2017] [:error] [pid 30986]     request.session.cycle_key()
[Wed Aug 30 18:59:33.461549 2017] [:error] [pid 30986]   File "/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py", line 285, in cycle_key
[Wed Aug 30 18:59:33.461553 2017] [:error] [pid 30986]     self.create()
[Wed Aug 30 18:59:33.461556 2017] [:error] [pid 30986]   File "/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/cache.py", line 48, in create
[Wed Aug 30 18:59:33.461559 2017] [:error] [pid 30986]     "Unable to create a new session key. "
[Wed Aug 30 18:59:33.461562 2017] [:error] [pid 30986] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.
edit retag flag offensive close merge delete

Comments

It is memcached correctly configured? Please share horizon config files

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2017-08-30 07:38:44 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-08-30 22:04:14 -0600

liaodalin19903 gravatar image

In the end, I found I config the caches in /etc/openstack-dashboard/local_settings wrongly:

CACHES = {
    'default': {
         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
         'LOCATION': 'controller:11211',  # here I written wrong
    }
}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-08-30 06:03:19 -0600

Seen: 448 times

Last updated: Aug 30 '17