OpenStack部署完Dashboard之后无法访问页面,报500错误

unicsdner 2018-06-14 06:07:59
按照OpenStack官方文档逐步部署的
操作系统为Ubuntu 16.04LTS Desktop, Openstack为O版
初学者,部署完dashboard之后,访问http://controller/horizon出现500错误如下:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache日志如下,求解决方案,谢谢。


[Thu Jun 14 16:34:23.054670 2018] [wsgi:warn] [pid 1677:tid 140303303034752] mod_wsgi: Compiled for Python/2.7.11.
[Thu Jun 14 16:34:23.054698 2018] [wsgi:warn] [pid 1677:tid 140303303034752] mod_wsgi: Runtime using Python/2.7.12.
[Thu Jun 14 16:34:23.059306 2018] [mpm_event:notice] [pid 1677:tid 140303303034752] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Thu Jun 14 16:34:23.059334 2018] [core:notice] [pid 1677:tid 140303303034752] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jun 14 16:57:47.938993 2018] [mpm_event:notice] [pid 1677:tid 140303303034752] AH00493: SIGUSR1 received. Doing graceful restart
[Thu Jun 14 16:57:48.357333 2018] [wsgi:warn] [pid 1677:tid 140303303034752] mod_wsgi: Compiled for Python/2.7.11.
[Thu Jun 14 16:57:48.357348 2018] [wsgi:warn] [pid 1677:tid 140303303034752] mod_wsgi: Runtime using Python/2.7.12.
[Thu Jun 14 16:57:48.360480 2018] [mpm_event:notice] [pid 1677:tid 140303303034752] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Thu Jun 14 16:57:48.360501 2018] [core:notice] [pid 1677:tid 140303303034752] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jun 14 16:58:06.543667 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] mod_wsgi (pid=5719): Target WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' cannot be loaded as Python module.
[Thu Jun 14 16:58:06.543697 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] mod_wsgi (pid=5719): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Thu Jun 14 16:58:06.543714 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] Traceback (most recent call last):
[Thu Jun 14 16:58:06.543728 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi", line 16, in <module>
[Thu Jun 14 16:58:06.543766 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] application = get_wsgi_application()
[Thu Jun 14 16:58:06.543772 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] File "/usr/lib/python2.7/dist-packages/django/core/wsgi.py", line 14, in get_wsgi_application
[Thu Jun 14 16:58:06.544229 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] django.setup()
[Thu Jun 14 16:58:06.544241 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] File "/usr/lib/python2.7/dist-packages/django/__init__.py", line 17, in setup
[Thu Jun 14 16:58:06.544701 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Thu Jun 14 16:58:06.544715 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, in __getattr__
[Thu Jun 14 16:58:06.545157 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] self._setup(name)
[Thu Jun 14 16:58:06.545169 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 44, in _setup
[Thu Jun 14 16:58:06.545185 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] self._wrapped = Settings(settings_module)
[Thu Jun 14 16:58:06.545190 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 92, in __init__
[Thu Jun 14 16:58:06.545197 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] mod = importlib.import_module(self.SETTINGS_MODULE)
[Thu Jun 14 16:58:06.545202 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
[Thu Jun 14 16:58:06.545609 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] __import__(name)
[Thu Jun 14 16:58:06.545620 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] File "/usr/share/openstack-dashboard/openstack_dashboard/settings.py", line 335, in <module>
[Thu Jun 14 16:58:06.546085 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] from local.local_settings import * # noqa
[Thu Jun 14 16:58:06.546097 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] File "/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py", line 124, in <module>
[Thu Jun 14 16:58:06.546230 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/openstack-dashboard/secret_key')
[Thu Jun 14 16:58:06.546237 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] File "/usr/share/openstack-dashboard/horizon/utils/secret_key.py", line 70, in generate_or_read_from_file
[Thu Jun 14 16:58:06.546577 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] key = read_from_file(key_file)
[Thu Jun 14 16:58:06.546589 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] File "/usr/share/openstack-dashboard/horizon/utils/secret_key.py", line 52, in read_from_file
[Thu Jun 14 16:58:06.546605 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] with open(key_file, 'r') as f:
[Thu Jun 14 16:58:06.546624 2018] [wsgi:error] [pid 5719:tid 140303182046976] [remote 192.168.1.128:27880] IOError: [Errno 13] Permission denied: '/var/lib/openstack-dashboard/secret_key'
~
...全文
1729 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_42474063 2018-06-17
  • 打赏
  • 举报
回复
Permission denied: '/var/lib/openstack-dashboard/secret_key' 权限问题,查看一下这个文件的用户权限是什么,一般是apache/apache

999

社区成员

发帖
与我相关
我的任务
社区描述
OpenStack
社区管理员
  • OpenStack社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧