Horizon's home page can't access after installed

Asked by Johnny

Install openstack newton release on Ubuntu 16.04 LTS as the guide.
All the services(keystone, glance, network...) are installed and verified.
After horizon is installed and configured, its home page http://controller/horizon
can't access and the error response is:
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.

I debugged the python scripts in wsgi and found it finally hang on importing lib gi.overrides.GLib:

[Fri Nov 25 22:51:34.833823 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7080 [Fri Nov 25 22:51:34.833845 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf exit import_models
7081 [Fri Nov 25 22:51:34.833848 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7082 [Fri Nov 25 22:51:34.833850 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf: in populate: in loop2
7083 [Fri Nov 25 22:51:34.833852 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7084 [Fri Nov 25 22:51:34.833860 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf: in populate: in loop2, label:openstack_auth
7085 [Fri Nov 25 22:51:34.833863 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7086 [Fri Nov 25 22:51:34.833881 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in import_models:openstack_auth.models
7087 [Fri Nov 25 22:51:34.833884 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7088 [Fri Nov 25 22:51:34.833887 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: import_module:openstack_auth.models
7089 [Fri Nov 25 22:51:34.833888 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7090 [Fri Nov 25 22:51:34.833891 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: start import: openstack_auth.models
7091 [Fri Nov 25 22:51:34.833892 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7092 [Fri Nov 25 22:51:34.854004 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: import_module:keystoneclient.access
7093 [Fri Nov 25 22:51:34.854016 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7094 [Fri Nov 25 22:51:34.854020 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: start import: keystoneclient.access
7095 [Fri Nov 25 22:51:34.854021 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7096 [Fri Nov 25 22:51:34.854226 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: import_module:keystoneclient.service_catalog
7097 [Fri Nov 25 22:51:34.854231 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7098 [Fri Nov 25 22:51:34.854234 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: start import: keystoneclient.service_catalog
7099 [Fri Nov 25 22:51:34.854236 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7100 [Fri Nov 25 22:51:34.854571 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: exit import_module:keystoneclient.service_catalog
7101 [Fri Nov 25 22:51:34.854577 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7102 [Fri Nov 25 22:51:34.854654 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: exit import_module:keystoneclient.access
7103 [Fri Nov 25 22:51:34.854657 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7104 [Fri Nov 25 22:51:34.855729 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: import_module:keystoneclient.httpclient
7105 [Fri Nov 25 22:51:34.855734 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7106 [Fri Nov 25 22:51:34.855738 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: start import: keystoneclient.httpclient
7107 [Fri Nov 25 22:51:34.855740 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7108 [Fri Nov 25 22:51:35.165983 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: import_module:.file
7109 [Fri Nov 25 22:51:35.166005 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7110 [Fri Nov 25 22:51:35.166008 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: parse name
7111 [Fri Nov 25 22:51:35.166010 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7112 [Fri Nov 25 22:51:35.166017 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: start import: keyring.backends.file
7113 [Fri Nov 25 22:51:35.166019 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7114 [Fri Nov 25 22:51:35.166512 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: exit import_module:keyring.backends.file
7115 [Fri Nov 25 22:51:35.166518 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7116 [Fri Nov 25 22:51:35.166524 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: import_module:.Gnome
7117 [Fri Nov 25 22:51:35.166526 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7118 [Fri Nov 25 22:51:35.166529 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: parse name
7119 [Fri Nov 25 22:51:35.166531 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7120 [Fri Nov 25 22:51:35.166537 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: start import: keyring.backends.Gnome
7121 [Fri Nov 25 22:51:35.166539 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7122 [Fri Nov 25 22:51:35.170083 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: import_module:gi.repository.GObject
7123 [Fri Nov 25 22:51:35.170090 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7124 [Fri Nov 25 22:51:35.170093 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: start import: gi.repository.GObject
7125 [Fri Nov 25 22:51:35.170095 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7126 [Fri Nov 25 22:51:35.170115 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: import_module:gi.repository.GLib
7127 [Fri Nov 25 22:51:35.170118 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7128 [Fri Nov 25 22:51:35.170120 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: start import: gi.repository.GLib
7129 [Fri Nov 25 22:51:35.170122 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7130 [Fri Nov 25 22:51:35.170221 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: import_module:gi.overrides.GLib
7131 [Fri Nov 25 22:51:35.170226 2016] [wsgi:error] [pid 9683:tid 140019949864704]
7132 [Fri Nov 25 22:51:35.170228 2016] [wsgi:error] [pid 9683:tid 140019949864704] haoqf in init.py: start import: gi.overrides.GLib
7133 [Fri Nov 25 22:51:35.170230 2016] [wsgi:error] [pid 9683:tid 140019949864704]

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu openstack-dashboard Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Johnny (qf-hao) said :
#1

The original error is as below when it was importing openstack_auth.models:
Gateway Timeout

The gateway did not receive a timely response from the upstream server or application.
Apache/2.4.18 (Ubuntu) Server at controller2 Port 80

After I added some trace info, the error becomes 500 internal server error as above.

Revision history for this message
Johnny (qf-hao) said :
#2

After set Debug=True in local_settings.py, the error.log shows as below when accessing http://controller/horizon:
[Tue Dec 13 21:22:00.401864 2016] [wsgi:warn] [pid 1994:tid 139797004613504] mod_wsgi: Compiled for Python/2.7.11.
 28 [Tue Dec 13 21:22:00.435707 2016] [wsgi:warn] [pid 1994:tid 139797004613504] mod_wsgi: Runtime using Python/2.7.12.
 29 [Tue Dec 13 21:22:00.437353 2016] [mpm_event:notice] [pid 1994:tid 139797004613504] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
 30 [Tue Dec 13 21:22:00.437362 2016] [core:notice] [pid 1994:tid 139797004613504] AH00094: Command line: '/usr/sbin/apache2'
 31 [Tue Dec 13 21:30:56.322089 2016] [wsgi:error] [pid 1999:tid 139796900419328] haoqf: import GLib now
 32 [Tue Dec 13 21:34:38.499653 2016] [wsgi:error] [pid 1997:tid 139796900419328] haoqf: import GLib now
 33 [Tue Dec 13 21:35:54.035917 2016] [wsgi:error] [pid 2010:tid 139796900419328] [client 10.0.0.11:45595] Timeout when reading response headers from daemon process 'horizon': /usr/share/openstack-dashboar d/openstack_dashboard/wsgi/django.wsgi
 34 [Tue Dec 13 21:39:37.555353 2016] [wsgi:error] [pid 2011:tid 139796908812032] [client 10.0.0.11:45674] Timeout when reading response headers from daemon process 'horizon': /usr/share/openstack-dashboar d/openstack_dashboard/wsgi/django.wsgi, referer: http://10.0.0.12/horizon/auth/login/?next=/horizon/
 35 [Tue Dec 13 21:52:28.966614 2016] [mpm_event:notice] [pid 1994:tid 139797004613504] AH00491: caught SIGTERM, shutting down
 36 [Tue Dec 13 21:55:11.775683 2016] [wsgi:warn] [pid 2017:tid 140505883744128] mod_wsgi: Compiled for Python/2.7.11.
 37 [Tue Dec 13 21:55:11.917540 2016] [wsgi:warn] [pid 2017:tid 140505883744128] mod_wsgi: Runtime using Python/2.7.12.
 38 [Tue Dec 13 21:55:11.919261 2016] [mpm_event:notice] [pid 2017:tid 140505883744128] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
 39 [Tue Dec 13 21:55:11.919272 2016] [core:notice] [pid 2017:tid 140505883744128] AH00094: Command line: '/usr/sbin/apache2'
 40 [Tue Dec 13 21:57:17.147326 2016] [wsgi:error] [pid 2030:tid 140505779549952] haoqf: import GLib now
 41 [Tue Dec 13 22:01:46.937740 2016] [wsgi:error] [pid 2029:tid 140505779549952] haoqf: import GLib now
 42 [Tue Dec 13 22:02:08.229711 2016] [wsgi:error] [pid 2031:tid 140505779549952] haoqf: import GLib now
 43 [Tue Dec 13 22:02:14.533556 2016] [wsgi:error] [pid 2043:tid 140505787942656] [client 10.0.0.11:45981] Timeout when reading response headers from daemon process 'horizon': /usr/share/openstack-dashboar d/openstack_dashboard/wsgi/django.wsgi
 44 [Tue Dec 13 22:06:46.041883 2016] [wsgi:error] [pid 2042:tid 140505787942656] [client 10.0.0.11:46008] Timeout when reading response headers from daemon process 'horizon': /usr/share/openstack-dashboar d/openstack_dashboard/wsgi/django.wsgi
 45 [Tue Dec 13 22:06:51.102783 2016] [wsgi:error] [pid 2043:tid 140505694336768] [client 10.0.0.11:46054] Truncated or oversized response headers received from daemon process 'horizon': /usr/share/opensta ck-dashboard/openstack_dashboard/wsgi/django.wsgi
 46 [Tue Dec 13 22:07:07.363326 2016] [wsgi:error] [pid 2043:tid 140505...

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.