问题现象 :
浏览器输入 http://controller/dashboard 访问仪表盘无法登陆,提示“出错啦!
遇到异常情况,请刷新。如需帮助请联系管理员。”
/var/log/httpd/error_log 中一直报以下错误:
... ...
[Wed Nov 01 06:36:08.539559 2017] [:error] [pid 16283] self.create
[Wed Nov 01 06:36:08.539566 2017] [:error] [pid 16283] File "/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/cache.py", line 48, in create
[Wed Nov 01 06:36:08.539569 2017] [:error] [pid 16283] "Unable to create a newsession key. "
[Wed Nov 01 06:36:08.539577 2017] [:error] [pid 16283] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.
[Wed Nov 01 02:41:09.576741 2017] [mpm_prefork:notice] [pid 16278] AH00170: caught SIGWINCH, shutting down gracefully
解决办法:
更改dashboard的local_settings配置文件并重启httpd和memcached,刷新后可正常登陆。
?
- # vim /etc/openstack-dashboard/local_settings
- #SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
- SESSION_ENGINE = 'django.contrib.sessions.backends.file'
- # systemctl restart httpd memcached
- # systemctl status httpd memcached