Ask Your Question
2

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/secret_key.py", 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 10.0.0.70] 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 10.0.8.151] mod_wsgi (pid=17310): Exception occurred processing WSGI script '/usr/share/openstack-dashboard
/openstack_dashboard/wsgi/django.wsgi'.
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151] Traceback (most recent call last):
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 187, in __call__
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]     self.load_middleware()
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 46, in load_middle
ware
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]     for middleware_path in settings.MIDDLEWARE_CLASSES:
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 54, in __getattr__
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]     self._setup(name)
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 49, in _setup
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]     self._wrapped = Settings(settings_module)
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 128, in __init__
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]     mod = importlib.import_module(self.SETTINGS_MODULE)
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]   File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py", line 40, in import_module
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]     __import__(name)
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/setti
ngs.py", line 219, in <module>
[Tue May 20 10:01:16 2014] [error] [client 10.0.8.151]     from local.local_settings import *  # noqa
[Tue May ...
(more)
edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
2

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

Comments

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

Thanks!

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
2

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
2

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
1

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

agupta gravatar image

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

horizon:x:121:131::/var/lib/openstack-dashboard:/bin/false

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

2 followers

Stats

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

Seen: 9,369 times

Last updated: Oct 22 '18