Revision history [back]

click to hide/show revision 1
initial version

Can't re-login to horizon, bad session_id cookie

I'm following the instructions from http://docs.openstack.org/kilo/install-guide/install/yum/content/install_dashboard.html

When going to my controller http url: http://controller0/dashboard I am able to login at first time. Then after the timeout has expired, I can't login anymore. I have to manually delete the cookie session_id to allow the connection again.

[Tue Jun 16 09:47:29.449268 2015] [:error] [pid 29403] Login successful for user "admin".
[Tue Jun 16 09:47:29.450647 2015] [:error] [pid 29403] Internal Server Error: /dashboard/auth/login/
[Tue Jun 16 09:47:29.450694 2015] [:error] [pid 29403] Traceback (most recent call last):
[Tue Jun 16 09:47:29.450703 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
[Tue Jun 16 09:47:29.450710 2015] [:error] [pid 29403]     response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Tue Jun 16 09:47:29.450717 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
[Tue Jun 16 09:47:29.450723 2015] [:error] [pid 29403]     return view(request, *args, **kwargs)
[Tue Jun 16 09:47:29.450728 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
[Tue Jun 16 09:47:29.450734 2015] [:error] [pid 29403]     response = view_func(request, *args, **kwargs)
[Tue Jun 16 09:47:29.450748 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
[Tue Jun 16 09:47:29.450777 2015] [:error] [pid 29403]     response = view_func(request, *args, **kwargs)
[Tue Jun 16 09:47:29.450821 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/openstack_auth/views.py", line 111, in login
[Tue Jun 16 09:47:29.450827 2015] [:error] [pid 29403]     **kwargs)
[Tue Jun 16 09:47:29.450830 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
[Tue Jun 16 09:47:29.450839 2015] [:error] [pid 29403]     return view(request, *args, **kwargs)
[Tue Jun 16 09:47:29.450878 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
[Tue Jun 16 09:47:29.450902 2015] [:error] [pid 29403]     response = view_func(request, *args, **kwargs)
[Tue Jun 16 09:47:29.450925 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
[Tue Jun 16 09:47:29.450957 2015] [:error] [pid 29403]     response = view_func(request, *args, **kwargs)
[Tue Jun 16 09:47:29.451111 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/views.py", line 51, in login
[Tue Jun 16 09:47:29.451205 2015] [:error] [pid 29403]     auth_login(request, form.get_user())
[Tue Jun 16 09:47:29.451235 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 102, in login
[Tue Jun 16 09:47:29.451271 2015] [:error] [pid 29403]     if _get_user_session_key(request) != user.pk or (
[Tue Jun 16 09:47:29.451293 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 59, in _get_user_session_key
[Tue Jun 16 09:47:29.451316 2015] [:error] [pid 29403]     return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])
[Tue Jun 16 09:47:29.451351 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 969, in to_python
[Tue Jun 16 09:47:29.451385 2015] [:error] [pid 29403]     params={'value': value},
[Tue Jun 16 09:47:29.451414 2015] [:error] [pid 29403] ValidationError: [u'La valeur \\xab\\xa06179526a8fed46ddacef42d06de4467a\\xa0\\xbb doit \\xeatre un nombre entier.']

It seems request.session[SESSION_KEY] is not an integer. How can I fix that? btw I don't know why the logs are mixing english and french... I'm using Firefox 38.0.5

Can't re-login to horizon, bad session_id cookie

I'm following the instructions from http://docs.openstack.org/kilo/install-guide/install/yum/content/install_dashboard.html

When going to my controller http url: http://controller0/dashboard I am able to login at first time. Then after the timeout has expired, I can't login anymore. I have to manually delete the cookie session_id to allow the connection again.

[Tue Jun 16 09:47:29.449268 2015] [:error] [pid 29403] Login successful for user "admin".
[Tue Jun 16 09:47:29.450647 2015] [:error] [pid 29403] Internal Server Error: /dashboard/auth/login/
[Tue Jun 16 09:47:29.450694 2015] [:error] [pid 29403] Traceback (most recent call last):
[Tue Jun 16 09:47:29.450703 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
[Tue Jun 16 09:47:29.450710 2015] [:error] [pid 29403]     response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Tue Jun 16 09:47:29.450717 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
[Tue Jun 16 09:47:29.450723 2015] [:error] [pid 29403]     return view(request, *args, **kwargs)
[Tue Jun 16 09:47:29.450728 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
[Tue Jun 16 09:47:29.450734 2015] [:error] [pid 29403]     response = view_func(request, *args, **kwargs)
[Tue Jun 16 09:47:29.450748 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
[Tue Jun 16 09:47:29.450777 2015] [:error] [pid 29403]     response = view_func(request, *args, **kwargs)
[Tue Jun 16 09:47:29.450821 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/openstack_auth/views.py", line 111, in login
[Tue Jun 16 09:47:29.450827 2015] [:error] [pid 29403]     **kwargs)
[Tue Jun 16 09:47:29.450830 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
[Tue Jun 16 09:47:29.450839 2015] [:error] [pid 29403]     return view(request, *args, **kwargs)
[Tue Jun 16 09:47:29.450878 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
[Tue Jun 16 09:47:29.450902 2015] [:error] [pid 29403]     response = view_func(request, *args, **kwargs)
[Tue Jun 16 09:47:29.450925 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
[Tue Jun 16 09:47:29.450957 2015] [:error] [pid 29403]     response = view_func(request, *args, **kwargs)
[Tue Jun 16 09:47:29.451111 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/views.py", line 51, in login
[Tue Jun 16 09:47:29.451205 2015] [:error] [pid 29403]     auth_login(request, form.get_user())
[Tue Jun 16 09:47:29.451235 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 102, in login
[Tue Jun 16 09:47:29.451271 2015] [:error] [pid 29403]     if _get_user_session_key(request) != user.pk or (
[Tue Jun 16 09:47:29.451293 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 59, in _get_user_session_key
[Tue Jun 16 09:47:29.451316 2015] [:error] [pid 29403]     return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])
[Tue Jun 16 09:47:29.451351 2015] [:error] [pid 29403]   File "/usr/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 969, in to_python
[Tue Jun 16 09:47:29.451385 2015] [:error] [pid 29403]     params={'value': value},
[Tue Jun 16 09:47:29.451414 2015] [:error] [pid 29403] ValidationError: [u'La valeur \\xab\\xa06179526a8fed46ddacef42d06de4467a\\xa0\\xbb doit \\xeatre un nombre entier.']

It seems request.session[SESSION_KEY] is not an integer. How can I fix that? btw I don't know why the logs are mixing english and french... I'm using Firefox 38.0.5