Ask Your Question

Getting 500 internal server error while accessing horizon dashboard in ubuntu icehouse

asked 2014-05-20 00:15:59 -0500

freenavigator gravatar image

Hi, While accessing horizon dashboard(ubuntu:icehouse) I am getting 500 internal server error. apache2 log file gives following error:

File "/usr/lib/python2.7/dist-packages/horizon/utils/", line 65, in generate_or_read_from_file
     with open(key_file, 'r') as f:
IOError: [Errno 13] Permission denied: '/var/lib/openstack-dashboard/secret_key'
[error] [client] File does not exist: /var/www/favicon.ico

I have gone through similar posts for 500 internal error but none seems to related to this scenario (i.e. permission denied). Any clue!

Full backtrace:

[Tue May 20 10:00:56 2014] [warn] mod_wsgi: Compiled for Python/2.7.2+.
[Tue May 20 10:00:56 2014] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Tue May 20 10:00:56 2014] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Tue May 20 10:01:16 2014] [error] [client] mod_wsgi (pid=17310): Exception occurred processing WSGI script '/usr/share/openstack-dashboard
[Tue May 20 10:01:16 2014] [error] [client] Traceback (most recent call last):
[Tue May 20 10:01:16 2014] [error] [client]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/", line 187, in __call__
[Tue May 20 10:01:16 2014] [error] [client]     self.load_middleware()
[Tue May 20 10:01:16 2014] [error] [client]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/", line 46, in load_middle
[Tue May 20 10:01:16 2014] [error] [client]     for middleware_path in settings.MIDDLEWARE_CLASSES:
[Tue May 20 10:01:16 2014] [error] [client]   File "/usr/lib/python2.7/dist-packages/django/conf/", line 54, in __getattr__
[Tue May 20 10:01:16 2014] [error] [client]     self._setup(name)
[Tue May 20 10:01:16 2014] [error] [client]   File "/usr/lib/python2.7/dist-packages/django/conf/", line 49, in _setup
[Tue May 20 10:01:16 2014] [error] [client]     self._wrapped = Settings(settings_module)
[Tue May 20 10:01:16 2014] [error] [client]   File "/usr/lib/python2.7/dist-packages/django/conf/", line 128, in __init__
[Tue May 20 10:01:16 2014] [error] [client]     mod = importlib.import_module(self.SETTINGS_MODULE)
[Tue May 20 10:01:16 2014] [error] [client]   File "/usr/lib/python2.7/dist-packages/django/utils/", line 40, in import_module
[Tue May 20 10:01:16 2014] [error] [client]     __import__(name)
[Tue May 20 10:01:16 2014] [error] [client]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/setti", line 219, in <module>
[Tue May 20 10:01:16 2014] [error] [client]     from local.local_settings import *  # noqa
[Tue May ...
edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted

answered 2014-05-20 00:58:33 -0500

SGPJ gravatar image

updated 2014-05-20 01:09:40 -0500

Can you check keystone log whether it has created proper keys in /var/lib/openstack-dashboard/secret_key and you have right authentication for user. Then try to login with proper authentication.

edit flag offensive delete link more

answered 2017-03-14 12:08:38 -0500

Nosmoht gravatar image

I just run into the same issue with a fresh install of Ocata on Ubuntu 16.04 LTS.

Had to chown from root to www-data to get it working.

edit flag offensive delete link more


Can you elaborate on what you did? I am having the same issue for Ocata on Ubuntu 16.04.


DC gravatar imageDC ( 2017-03-16 01:01:51 -0500 )edit

This worked for me

sudo chown www-data /var/lib/openstack-dashboard/secret_key
sudo service apache2 reload
mckaycr gravatar imagemckaycr ( 2017-03-29 17:48:52 -0500 )edit

I had the same problem. Worked for me, too. Nice! Thanks!

tk8 gravatar imagetk8 ( 2017-08-29 07:46:56 -0500 )edit

this one also worked for me as well. Many Thanks!

berkcelebi gravatar imageberkcelebi ( 2017-10-30 19:48:14 -0500 )edit

answered 2014-05-20 00:58:49 -0500

freenavigator gravatar image

OK... Now able to login with following workaround: I have manually changed the owner of file /var/lib/openstack-dashboard/secret_key from root to horizon Somewhere during the steup horizon might have tried to set the wrong owner (root) for this file.

edit flag offensive delete link more

answered 2018-10-22 01:17:56 -0500

agupta gravatar image

If you would do cat /etc/passwd that should show this


In my case it was set incorrectly and hence fixed it like this

root@ozt:/var/lib/openstack-dashboard# chown horizon:horizon secret_key root@ozt:/var/lib/openstack-dashboard# service apache2 restart

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2014-05-20 00:15:59 -0500

Seen: 9,696 times

Last updated: Oct 22 '18