标签:
最近研究openstack,想把自己遇到的问题记录下来,同时如果有别的朋友也碰到同样问题的时候可以有个参考。
这次的问题是在openstack搭建好之后,dashboard本身是能用的,但是在某一天后,突然发现打开dashboard后出现Internal Server Error. 于是乎在网上找答案但是没有,那就自己动手解决吧。
首先打开dashboard的log文件,我的是:~/log/horizon.log.
发现下面的error 信息:
2015-04-28 01:39:55.380169 Traceback (most recent call last): 2015-04-28 01:39:55.380313 File "/opt/stack/horizon/openstack_dashboard/wsgi/django.wsgi", line 14, in <module> 2015-04-28 01:39:55.380466 application = get_wsgi_application() 2015-04-28 01:39:55.380557 File "/usr/local/lib/python2.7/dist-packages/django/core/wsgi.py", line 14, in get_wsgi_application 2015-04-28 01:39:55.380659 django.setup() 2015-04-28 01:39:55.380740 File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 20, in setup 2015-04-28 01:39:55.380837 configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) 2015-04-28 01:39:55.380939 File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 46, in __getattr__ 2015-04-28 01:39:55.381056 self._setup(name) 2015-04-28 01:39:55.381140 File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 42, in _setup 2015-04-28 01:39:55.381250 self._wrapped = Settings(settings_module) 2015-04-28 01:39:55.381337 File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 94, in __init__ 2015-04-28 01:39:55.381435 mod = importlib.import_module(self.SETTINGS_MODULE) 2015-04-28 01:39:55.381518 File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module 2015-04-28 01:39:55.381665 __import__(name) 2015-04-28 01:39:55.381751 File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/settings.py", line 263, in <module> 2015-04-28 01:39:55.381886 from local.local_settings import * # noqa 2015-04-28 01:39:55.381977 File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/local/local_settings.py", line 117, in <module> 2015-04-28 01:39:55.382078 os.path.join(LOCAL_PATH, ‘.secret_key_store‘)) 2015-04-28 01:39:55.382174 File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/utils/secret_key.py", line 63, in generate_or_read_from_file 2015-04-28 01:39:55.382377 raise FilePermissionError("Insecure key file permissions!") 2015-04-28 01:39:55.382494 FilePermissionError: Insecure key file permissions!
初步判断是文件的权限问题,根据os.path.join(LOCAL_PATH, ‘.secret_key_store‘) 找到/opt/stack/horizon/openstack_dashboard/local/.secret_key_store, 并发现对这个文件拥有所有的权限,很奇怪为啥会出现permission的问题
登陆到另外一台dashboard正常work的机器上发现
然后决定删除这两个文件,再次刷新dashboard的url,很神奇的是work了,同时也发现该目录下新产生了这两个文件,并且权限和上图一样。
这个问题误打误撞的解决了,但是在操作openstack过程中发现openstack很不稳定,有的功能开始是好的,过一两天就不好用了,或是装一个东西怎么也装不上,然后多重装几次就好了,还是不明白其中的原因,但是要多学习,多探索! ^_^
打开Openstack dashboard出现Internal Server Error
标签:
原文地址:http://www.cnblogs.com/baibai-tech/p/4463516.html