分享

请教dashboard的问题

luckylee 发表于 2015-1-13 10:33:10 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 10 100071
大家好,我在虚拟机上按照官方文档安装了Havana,在安装配置好dashboard后,访问报错,Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

Apache/2.2.15 (CentOS) Server at hctrl Port 80

Apache的error.log内容如下:


[Tue Jan 13 10:30:32 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Jan 13 10:30:32 2015] [notice] Digest: generating secret for digest authentication ...
[Tue Jan 13 10:30:32 2015] [notice] Digest: done
[Tue Jan 13 10:30:32 2015] [notice] Apache/2.2.15 (Unix) DAV/2 mod_wsgi/3.2 Python/2.6.6 configured -- resuming normal operations
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57] mod_wsgi (pid=24730): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57] Traceback (most recent call last):
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]   File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 219, in __call__
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]     self.load_middleware()
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]   File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 37, in load_middleware
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]     for middleware_path in settings.MIDDLEWARE_CLASSES:
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]   File "/usr/lib/python2.6/site-packages/django/utils/functional.py", line 184, in inner
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]     self._setup()
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]   File "/usr/lib/python2.6/site-packages/django/conf/__init__.py", line 42, in _setup
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]     self._wrapped = Settings(settings_module)
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]   File "/usr/lib/python2.6/site-packages/django/conf/__init__.py", line 93, in __init__
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]     mod = importlib.import_module(self.SETTINGS_MODULE)
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]   File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]     __import__(name)
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/settings.py", line 221, in <module>
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]     from local.local_settings import *  # noqa
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/local/local_settings.py", line 16
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]      ALLOWED_HOSTS = ['hctrl', 'localhost']
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]     ^
[Tue Jan 13 10:30:48 2015] [error] [client 192.168.20.57]  IndentationError: unexpected indent



烦劳大家帮忙分析下,是哪里的问题,非常感谢!
或qq联系:27988629

已有(10)人评论

跳转到指定楼层
w123aw 发表于 2015-1-13 12:11:21

检查下自己的local_settings
> /etc/openstack-dashboard/local_settings
> OPENSTACK_HOST = "controller"
> OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST
> OPENSTACK_KEYSTONE_DEFAULT_ROLE = "admin"


使用下面命令输出内容一致

  1. keystone role-list
复制代码




回复

使用道具 举报

stark_summer 发表于 2015-1-13 12:27:40
能看你的后台管理配置文件么?
回复

使用道具 举报

luckylee 发表于 2015-1-13 14:08:09
stark_summer 发表于 2015-1-13 12:27
能看你的后台管理配置文件么?

是/etc/openstack-dashboard/local_settings这个文件吗?我改过的内容:
ALLOWED_HOSTS = ['hctrl', 'localhost']
CACHES = {
    'default': {
        'BACKEND' : 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION' : '127.0.0.1:11211',
    }
}

#CACHES = {
#    'default': {
#        'BACKEND' : 'django.core.cache.backends.locmem.LocMemCache'
#    }
#}

OPENSTACK_HOST = "hctrl"
#OPENSTACK_HOST = "127.0.0.1"
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "admin"


请帮忙看看,谢谢。
回复

使用道具 举报

luckylee 发表于 2015-1-13 14:09:02
w123aw 发表于 2015-1-13 12:11
检查下自己的local_settings
> /etc/openstack-dashboard/local_settings
> OPENSTACK_HOST = "contro ...

我的配置文件就是这样的。
回复

使用道具 举报

marsaber 发表于 2015-1-13 14:12:25
我遇到过类似的错误。后来排查,/etc/openstack-dashboard/local_settings:
1、ALLOWED_HOSTS = ['*'],注意格式,我有一次写成了ALLOWED_HOSTS = [*];
2、该注释的要注释掉,该取消注释的要取消掉,彻底点,有一次我就是}没有注释掉。

这是我测试中遇到的两个问题,仅供参考。
回复

使用道具 举报

luckylee 发表于 2015-1-13 14:12:58
stark_summer 发表于 2015-1-13 12:27
能看你的后台管理配置文件么?

您是说/etc/openstack-dashboard/local_settings 这个文件吗?我改过的内容是:
ALLOWED_HOSTS = ['hctrl', 'localhost']

CACHES = {
    'default': {
        'BACKEND' : 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION' : '127.0.0.1:11211',
    }
}

#CACHES = {
#    'default': {
#        'BACKEND' : 'django.core.cache.backends.locmem.LocMemCache'
#    }
#}


OPENSTACK_HOST = "hctrl"
#OPENSTACK_HOST = "127.0.0.1"
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "admin"


帮忙看看,谢谢
回复

使用道具 举报

luckylee 发表于 2015-1-13 14:24:10
谢谢大家,现在能打开登陆页面了,可能是因为我的配置文件修改的时候行首有空格的原因。
但是我的登陆页面刚打开就提示“回话超时”。
error.log中的提示:
[error] DeprecationWarning: Translations in the project directory aren't supported anymore. Use the LOCALE_PATHS setting instead.DeprecationWarning: Authentication backends without a `supports_inactive_user` attribute are deprecated. Please define it in <class 'openstack_auth.backend.KeystoneBackend'>.Logging out user "admin".

这又是什么原因呢?
回复

使用道具 举报

luckylee 发表于 2015-1-13 14:30:42
哈哈,重启了一下,ok了。进一步测试。谢谢大家!
回复

使用道具 举报

study123 发表于 2015-4-10 15:13:17
我碰到了同样的问题,请问你是如何解决的?

谢谢!
回复

使用道具 举报

12下一页
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条