Pike - Horizon Internal Server Error

Bug #1743066 reported by Haitao Huang on 2018-01-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Undecided
Unassigned

Bug Description

This is Pike version. Followed Ubuntu related installation guide. Everything else working except Horizon. when access got following error in /var/log/aparche2/error.log

Tried this, did not work:
chown www-data:www-data /usr/lib/python2.7/dist-packages/horizon/utils/secret_key.py

Also tried edit: /etc/openstack-dashboard/local_settings.py with following change and did not work:
TIME_ZONE = "US/Eastern"
or
TIME_ZONE = "America/New_York"
or
LOCAL_PATH = "/tmp"
(right now is LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)))

Both django.wsgi and secret_key.py are root:root

Error message as following:

[Fri Jan 12 21:05:43.174051 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] mod_wsgi (pid=16008): Target WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi' cannot be loaded as Python module.
[Fri Jan 12 21:05:43.174089 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] mod_wsgi (pid=16008): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Fri Jan 12 21:05:43.174123 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] Traceback (most recent call last):
[Fri Jan 12 21:05:43.174147 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi", line 16, in <module>
[Fri Jan 12 21:05:43.174221 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] application = get_wsgi_application()
[Fri Jan 12 21:05:43.174240 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] File "/usr/lib/python2.7/dist-packages/django/core/wsgi.py", line 14, in get_wsgi_application
[Fri Jan 12 21:05:43.174292 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] django.setup()
[Fri Jan 12 21:05:43.174309 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] File "/usr/lib/python2.7/dist-packages/django/__init__.py", line 17, in setup
[Fri Jan 12 21:05:43.174355 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
[Fri Jan 12 21:05:43.174371 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, in __getattr__
[Fri Jan 12 21:05:43.174440 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] self._setup(name)
[Fri Jan 12 21:05:43.174455 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 44, in _setup
[Fri Jan 12 21:05:43.174478 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] self._wrapped = Settings(settings_module)
[Fri Jan 12 21:05:43.174487 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 92, in __init__
[Fri Jan 12 21:05:43.174505 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] mod = importlib.import_module(self.SETTINGS_MODULE)
[Fri Jan 12 21:05:43.174518 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
[Fri Jan 12 21:05:43.174561 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] __import__(name)
[Fri Jan 12 21:05:43.174572 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] File "/usr/share/openstack-dashboard/openstack_dashboard/settings.py", line 345, in <module>
[Fri Jan 12 21:05:43.174705 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] from local.local_settings import * # noqa: F403,H303
[Fri Jan 12 21:05:43.174744 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] File "/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py", line 393
[Fri Jan 12 21:05:43.174753 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] 'supported_vnic_types': ['*'],
[Fri Jan 12 21:05:43.174759 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] ^
[Fri Jan 12 21:05:43.174765 2018] [wsgi:error] [pid 16008:tid 140507071096576] [remote 192.168.1.30:10336] IndentationError: unexpected indent
root@pike-controller:~#

Akihiro Motoki (amotoki) wrote :

The error message says "IndentationError: unexpected indent" at local_settings.py", line 393.
You edited local_settings.py and the file contains the indent error in python. This is not a problem of horizon source code.

Changed in horizon:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers