Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Apache2-Horizon SSL bug with missing permissions

Hi all. I use Openstack Kilo and wanted to enable SSL. The only problem:

    [Mon Nov 30 14:07:12.776301 2015] [:error] [pid 29731:tid 140092654630656] [client 95.90.222.115:37845]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/local/local_settings.py", line 116, in <module>
[Mon Nov 30 14:07:12.776308 2015] [:error] [pid 29731:tid 140092654630656] [client 95.90.222.115:37845]     SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/openstack-dashboard/secret_key')
[Mon Nov 30 14:07:12.776311 2015] [:error] [pid 29731:tid 140092654630656] [client 95.90.222.115:37845]   File "/usr/lib/python2.7/dist-packages/horizon/utils/secret_key.py", line 54, in generate_or_read_from_file
[Mon Nov 30 14:07:12.776317 2015] [:error] [pid 29731:tid 140092654630656] [client 95.90.222.115:37845]     with lock:
[Mon Nov 30 14:07:12.776321 2015] [:error] [pid 29731:tid 140092654630656] [client 95.90.222.115:37845]   File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 217, in __enter__
[Mon Nov 30 14:07:12.776326 2015] [:error] [pid 29731:tid 140092654630656] [client 95.90.222.115:37845]     self.acquire()
[Mon Nov 30 14:07:12.776329 2015] [:error] [pid 29731:tid 140092654630656] [client 95.90.222.115:37845]   File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 200, in acquire
[Mon Nov 30 14:07:12.776334 2015] [:error] [pid 29731:tid 140092654630656] [client 95.90.222.115:37845]     self.lockfile = open(self.fname, 'a')
[Mon Nov 30 14:07:12.776345 2015] [:error] [pid 29731:tid 140092654630656] [client 95.90.222.115:37845] IOError: [Errno 13] Permission denied: '/var/lib/openstack-dashboard/_var_lib_openstack-dashboard_secret_key.lock'
[Mon Nov 30 14:07:15.387853 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865] mod_wsgi (pid=29731): Target WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' cannot be loaded as Python module.
[Mon Nov 30 14:07:15.387865 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865] mod_wsgi (pid=29731): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Mon Nov 30 14:07:15.387875 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865] Traceback (most recent call last):
[Mon Nov 30 14:07:15.387885 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi", line 16, in <module>
[Mon Nov 30 14:07:15.387898 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     application = get_wsgi_application()
[Mon Nov 30 14:07:15.387902 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/lib/python2.7/dist-packages/django/core/wsgi.py", line 14, in get_wsgi_application
[Mon Nov 30 14:07:15.387911 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     django.setup()
[Mon Nov 30 14:07:15.387914 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/lib/python2.7/dist-packages/django/__init__.py", line 20, in setup
[Mon Nov 30 14:07:15.387920 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Mon Nov 30 14:07:15.387923 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 46, in __getattr__
[Mon Nov 30 14:07:15.387929 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     self._setup(name)
[Mon Nov 30 14:07:15.387932 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 42, in _setup
[Mon Nov 30 14:07:15.387942 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     self._wrapped = Settings(settings_module)
[Mon Nov 30 14:07:15.387945 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 94, in __init__
[Mon Nov 30 14:07:15.387950 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     mod = importlib.import_module(self.SETTINGS_MODULE)
[Mon Nov 30 14:07:15.387953 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
[Mon Nov 30 14:07:15.387959 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     __import__(name)
[Mon Nov 30 14:07:15.387962 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/settings.py", line 261, in <module>
[Mon Nov 30 14:07:15.387968 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     from local.local_settings import *  # noqa
[Mon Nov 30 14:07:15.387971 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/local/local_settings.py", line 116, in <module>
[Mon Nov 30 14:07:15.387978 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/openstack-dashboard/secret_key')
[Mon Nov 30 14:07:15.387982 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/lib/python2.7/dist-packages/horizon/utils/secret_key.py", line 54, in generate_or_read_from_file
[Mon Nov 30 14:07:15.387987 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     with lock:
[Mon Nov 30 14:07:15.387991 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 217, in __enter__
[Mon Nov 30 14:07:15.387996 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     self.acquire()
[Mon Nov 30 14:07:15.387999 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]   File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 200, in acquire
[Mon Nov 30 14:07:15.388004 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865]     self.lockfile = open(self.fname, 'a')
[Mon Nov 30 14:07:15.388015 2015] [:error] [pid 29731:tid 140092572169984] [client 95.90.222.115:37865] IOError: [Errno 13] Permission denied: '/var/lib/openstack-dashboard/_var_lib_openstack-dashboard_secret_key.lock'

I already checked the permissions. Owner is horizon and readwrite (644). Any suggestions?