原创

openstack dashboard登录出错

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/LS7011846/article/details/52626540

这几天在重新配置openstack环境,正在对实例进行操作的时候,服务器报错了,如下图,一直重新登录也没用。

I{PXK_3`(YA63ID~7}6XH@0

忽然有点不知所措,于是去查看apache服务器的日志 /var/log/httpd/error_log 发现如下,可以看到,这个登录错误不是用户名和密码引起的,log日志说明已经登陆成功。然后我又去谷歌了一下相关的错误,终于在一个国外的网站上找到了答案,是网页的session到期了。

[Sun May 15 17:20:47.613558 2016] [:error] [pid 6978] Login successful for user “admin”.
[Sun May 15 17:20:47.697623 2016] [:error] [pid 6978] Internal Server Error: /dashboard/auth/login/
[Sun May 15 17:20:47.697679 2016] [:error] [pid 6978] Traceback (most recent call last):
[Sun May 15 17:20:47.697687 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/django/core/handlers/base.py”, line 132, in get_response
[Sun May 15 17:20:47.697693 2016] [:error] [pid 6978] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Sun May 15 17:20:47.697699 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/django/views/decorators/debug.py”, line 76, in sensitive_post_parameters_wrapper
[Sun May 15 17:20:47.697704 2016] [:error] [pid 6978] return view(request, *args, **kwargs)
[Sun May 15 17:20:47.697709 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/django/utils/decorators.py”, line 110, in _wrapped_view
[Sun May 15 17:20:47.697714 2016] [:error] [pid 6978] response = view_func(request, *args, **kwargs)
[Sun May 15 17:20:47.697719 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/django/views/decorators/cache.py”, line 57, in _wrapped_view_func
[Sun May 15 17:20:47.697724 2016] [:error] [pid 6978] response = view_func(request, *args, **kwargs)
[Sun May 15 17:20:47.697729 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/openstack_auth/views.py”, line 111, in login
[Sun May 15 17:20:47.697734 2016] [:error] [pid 6978] **kwargs)
[Sun May 15 17:20:47.697739 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/django/views/decorators/debug.py”, line 76, in sensitive_post_parameters_wrapper
[Sun May 15 17:20:47.697744 2016] [:error] [pid 6978] return view(request, *args, **kwargs)
[Sun May 15 17:20:47.697749 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/django/utils/decorators.py”, line 110, in _wrapped_view
[Sun May 15 17:20:47.697753 2016] [:error] [pid 6978] response = view_func(request, *args, **kwargs)
[Sun May 15 17:20:47.697758 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/django/views/decorators/cache.py”, line 57, in _wrapped_view_func
[Sun May 15 17:20:47.697762 2016] [:error] [pid 6978] response = view_func(request, *args, **kwargs)
[Sun May 15 17:20:47.697767 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/django/contrib/auth/views.py”, line 51, in login
[Sun May 15 17:20:47.697772 2016] [:error] [pid 6978] auth_login(request, form.get_user())
[Sun May 15 17:20:47.697776 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/django/contrib/auth/init.py”, line 102, in login
[Sun May 15 17:20:47.697781 2016] [:error] [pid 6978] if _get_user_session_key(request) != user.pk or (
[Sun May 15 17:20:47.697785 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/django/contrib/auth/init.py”, line 59, in _get_user_session_key
[Sun May 15 17:20:47.697790 2016] [:error] [pid 6978] return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])
[Sun May 15 17:20:47.697816 2016] [:error] [pid 6978] File “/usr/lib/python2.7/site-packages/django/db/models/fields/init.py”, line 969, in to_python
[Sun May 15 17:20:47.697822 2016] [:error] [pid 6978] params={‘value’: value},
[Sun May 15 17:20:47.697826 2016] [:error] [pid 6978] ValidationError: [u’\u20196ba4361953fa422480f2c67ca71300a4\u2018 \u5fc5\u987b\u4e3a\u6574\u6570\u3002’]

解决方案:1.换个浏览器。

2.清除这个浏览器的cokkies。

改完之后发现,我在出现问题之前,对controller节点的日期进行了修改,导致当时session过期的问题。

正文到此结束
Loading...