Openstack Newton Dashboard ERROR 500

来源:互联网 发布:爱丽丝疯狂回归mac版 编辑:程序博客网 时间:2024/05/17 07:25

Ocata dashboard 根据官方手顺构筑之后,主机访问 URL 报错 500。

官方安装地址:
https://docs.openstack.org/newton/install-guide-rdo/horizon-install.html

报错信息:

[root@controller ~]# tail -f  /etc/httpd/logs/error_log[Thu Feb 16 03:42:58.680943 2017] [:error] [pid 3419] Login successful for user "admin".[Thu Feb 16 03:43:02.620782 2017] [:error] [pid 3419] Internal Server Error: /dashboard/auth/login/[Thu Feb 16 03:43:02.620848 2017] [:error] [pid 3419] Traceback (most recent call last):[Thu Feb 16 03:43:02.620853 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response[Thu Feb 16 03:43:02.620857 2017] [:error] [pid 3419]     response = wrapped_callback(request, *callback_args, **callback_kwargs)[Thu Feb 16 03:43:02.620859 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper[Thu Feb 16 03:43:02.620862 2017] [:error] [pid 3419]     return view(request, *args, **kwargs)[Thu Feb 16 03:43:02.620864 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view[Thu Feb 16 03:43:02.620867 2017] [:error] [pid 3419]     response = view_func(request, *args, **kwargs)[Thu Feb 16 03:43:02.620869 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func[Thu Feb 16 03:43:02.620873 2017] [:error] [pid 3419]     response = view_func(request, *args, **kwargs)[Thu Feb 16 03:43:02.620876 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/openstack_auth/views.py", line 102, in login[Thu Feb 16 03:43:02.620889 2017] [:error] [pid 3419]     **kwargs)[Thu Feb 16 03:43:02.620906 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper[Thu Feb 16 03:43:02.620909 2017] [:error] [pid 3419]     return view(request, *args, **kwargs)[Thu Feb 16 03:43:02.620912 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view[Thu Feb 16 03:43:02.620914 2017] [:error] [pid 3419]     response = view_func(request, *args, **kwargs)[Thu Feb 16 03:43:02.620916 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func[Thu Feb 16 03:43:02.620919 2017] [:error] [pid 3419]     response = view_func(request, *args, **kwargs)[Thu Feb 16 03:43:02.620921 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/views.py", line 51, in login[Thu Feb 16 03:43:02.620923 2017] [:error] [pid 3419]     auth_login(request, form.get_user())[Thu Feb 16 03:43:02.620925 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 110, in login[Thu Feb 16 03:43:02.620942 2017] [:error] [pid 3419]     request.session.cycle_key()[Thu Feb 16 03:43:02.620945 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py", line 285, in cycle_key[Thu Feb 16 03:43:02.620975 2017] [:error] [pid 3419]     self.create()[Thu Feb 16 03:43:02.621096 2017] [:error] [pid 3419]   File "/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/cache.py", line 48, in create[Thu Feb 16 03:43:02.621149 2017] [:error] [pid 3419]     "Unable to create a new session key. "[Thu Feb 16 03:43:02.621178 2017] [:error] [pid 3419] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.[Thu Feb 16 11:47:08.029071 2017] [mpm_prefork:notice] [pid 3418] AH00170: caught SIGWINCH, shutting down gracefully[Thu Feb 16 11:47:35.000768 2017] [suexec:notice] [pid 4162] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)[Thu Feb 16 11:47:35.016493 2017] [auth_digest:notice] [pid 4162] AH01757: generating secret for digest authentication ...[Thu Feb 16 11:47:35.017199 2017] [lbmethod_heartbeat:notice] [pid 4162] AH02282: No slotmem from mod_heartmonitor[Thu Feb 16 11:47:35.029614 2017] [mpm_prefork:notice] [pid 4162] AH00163: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations[Thu Feb 16 11:47:35.029675 2017] [core:notice] [pid 4162] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'[Thu Feb 16 03:48:20.869596 2017] [:error] [pid 4163] WARNING:py.warnings:RemovedInDjango19Warning: The use of the language code 'zh-cn' is deprecated. Please use the 'zh-hans' translation instead.

报错的核心信息:
RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.
很明显的提示是 dashboard 配置的 cache 不可用。

官方手顺有以下配置:

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

个人推测原因是运行过程中不能识别 controller。
参考之前版本的配置和配置文件的 demo:
‘LOCATION’: ‘controller:11211’, 修改为 ‘LOCATION’: ‘127.0.0.1:11211’,
重启服务,dashboard 访问正常

[root@controller ~]# tail -f  /etc/httpd/logs/error_log[Thu Feb 16 03:48:39.076329 2017] [:error] [pid 4163] Login successful for user "admin".[Thu Feb 16 11:48:39.099551 2017] [authz_core:error] [pid 4174] [client 10.167.225.188:50101] AH01630: client denied by server configuration: /usr/bin/keystone-wsgi-public, referer: http://193.168.141.109/dashboard/auth/login/?next=/dashboard/

题外话:
Ocata 版本的安装必须使用 controller!!!

0 0
原创粉丝点击