我在ubuntu 16.04流浪盒上安装了OpenStack,除了仪表板外一切正常,当我打开它时我收到以下错误:
mod_wsgi (pid=6601): Target WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' cannot be loaded as Python module.
mod_wsgi (pid=6601): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
Traceback (most recent call last):
File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi", line 16, in <module>
application = get_wsgi_application()
File "/usr/lib/python2.7/dist-packages/django/core/wsgi.py", line 14, in get_wsgi_application
django.setup()
File "/usr/lib/python2.7/dist-packages/django/__init__.py", line 17, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, in __getattr__
self._setup(name)
File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 44, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 92, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/share/openstack-dashboard/openstack_dashboard/settings.py", line 335, in <module>
from local.local_settings import * # noqa
File "/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py", line 132, in <module>
SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/openstack-dashboard/secret_key')
File "/usr/share/openstack-dashboard/horizon/utils/secret_key.py", line 68, in generate_or_read_from_file
key = read_from_file(key_file)
File "/usr/share/openstack-dashboard/horizon/utils/secret_key.py", line 50, in read_from_file
with open(key_file, 'r') as f:
IOError: [Errno 13] Permission denied: '/var/lib/openstack-dashboard/secret_key'
我知道密钥是由Apache生成的,低于密钥的权限。
vagrant@vagrant:/var/lib/openstack-dashboard$ ls -ltrh
total 12K
drwxr-xr-x 2 root root 4.0K Feb 22 19:40 secret-key
-rw-r--r-- 1 root root 0 Mar 6 08:19 _var_lib_openstack-dashboard_secret_key.lock
-rw------- 1 root root 64 Mar 6 08:19 secret_key
drwxr-xr-x 10 www-data www-data 4.0K Mar 6 10:06 static
我按照installation guide安装了信息中心。
答案 0 :(得分:2)
scrollHeight
然后,没关系!
chown -R www-data:www-data secret-key