分享

openstack安装dashboard后访问horizon出错

lsy1996 发表于 2016-11-28 12:17:31 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 5 21776
如题,访问controller/horizon出错500:internal server error
apache/error.log出错信息如下:
[Sun Nov 27 03:35:40.350220 2016] [mpm_event:notice] [pid 3313:tid 140083000240000] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Sun Nov 27 03:35:40.350267 2016] [core:notice] [pid 3313:tid 140083000240000] AH00094: Command line: '/usr/sbin/apache2'
[Sun Nov 27 03:43:46.458437 2016] [mpm_event:notice] [pid 3313:tid 140083000240000] AH00491: caught SIGTERM, shutting down
[Sun Nov 27 05:05:03.495445 2016] [mpm_event:notice] [pid 3238:tid 139659907987328] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Sun Nov 27 05:05:03.555512 2016] [core:notice] [pid 3238:tid 139659907987328] AH00094: Command line: '/usr/sbin/apache2'
[Sun Nov 27 05:56:53.084779 2016] [core:error] [pid 3255:tid 139659661248256] [client 192.168.157.1:6059] End of script output before headers: django.wsgi
[Sun Nov 27 06:11:29.776677 2016] [mpm_event:notice] [pid 3238:tid 139659907987328] AH00493: SIGUSR1 received.  Doing graceful restart
[Sun Nov 27 06:11:40.334294 2016] [mpm_event:notice] [pid 3238:tid 139659907987328] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Sun Nov 27 06:11:40.334432 2016] [core:notice] [pid 3238:tid 139659907987328] AH00094: Command line: '/usr/sbin/apache2'
[Sun Nov 27 06:17:21.963054 2016] [core:error] [pid 5214:tid 139659810662144] [client 192.168.157.1:6308] End of script output before headers: django.wsgi
[Sun Nov 27 06:47:06.036727 2016] [mpm_event:notice] [pid 3238:tid 139659907987328] AH00493: SIGUSR1 received.  Doing graceful restart
[Sun Nov 27 06:47:11.888344 2016] [mpm_event:notice] [pid 3238:tid 139659907987328] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Sun Nov 27 06:47:11.888397 2016] [core:notice] [pid 3238:tid 139659907987328] AH00094: Command line: '/usr/sbin/apache2'
[Sun Nov 27 06:47:39.162800 2016] [mpm_event:notice] [pid 3238:tid 139659907987328] AH00493: SIGUSR1 received.  Doing graceful restart
[Sun Nov 27 06:47:42.577268 2016] [core:error] [pid 5842:tid 139659703211776] [client 192.168.157.1:7524] End of script output before headers: django.wsgi
[Sun Nov 27 06:47:42.636704 2016] [mpm_event:notice] [pid 3238:tid 139659907987328] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Sun Nov 27 06:47:42.636744 2016] [core:notice] [pid 3238:tid 139659907987328] AH00094: Command line: '/usr/sbin/apache2'
[Sun Nov 27 06:53:07.710714 2016] [core:error] [pid 6066:tid 139659810662144] [client 192.168.157.1:7537] End of script output before headers: django.wsgi
/etc/openstack-dashboard/local_settings.py部分如下:(按照官网配置)
import os
from django.utils.translation import ugettext_lazy as _
from horizon.utils import secret_key
from openstack_dashboard import exceptions
from openstack_dashboard.settings import HORIZON_CONFIG
DEBUG = False
TEMPLATE_DEBUG = DEBUG
WEBROOT = '/'
OPENSTACK_API_VERSIONS = {
    "identity": 3,
    "image": 2,
    "volume": 2,
}
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "default"
LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/openstack-dashboard/secret_key')
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = {
    'default': {
         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
         'LOCATION': '192.168.157.11:11211',
    }
}
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
OPENSTACK_HOST = "controller"
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "user"
IMAGE_RESERVED_CUSTOM_PROPERTIES = []
API_RESULT_LIMIT = 1000
API_RESULT_PAGE_SIZE = 20
SWIFT_FILE_TRANSFER_CHUNK_SIZE = 512 * 1024
DROPDOWN_MAX_ITEMS = 30
TIME_ZONE = "UTC"
ALLOWED_HOSTS = ['*', ]

已有(5)人评论

跳转到指定楼层
langke93 发表于 2016-11-28 14:28:25
本帖最后由 langke93 于 2016-11-28 15:24 编辑

版本是哪个?上面看不出太多的内容
控制节点应该也有相关错误


回复

使用道具 举报

lsy1996 发表于 2016-11-28 15:49:29
langke93 发表于 2016-11-28 14:28
版本是哪个?上面看不出太多的内容
控制节点应该也有相关错误

mitaka 前面几个组件验证的都没问题 按照官网配置的
回复

使用道具 举报

qcbb001 发表于 2016-11-28 16:21:46
配置 memcached 会话存储服务中192.168.157.11是什么ip地址

这里也有类似的问题
浏览器访问http://controller/horizon 报错误Internal Server Error
http://www.aboutyun.com/thread-19915-1-1.html


回复

使用道具 举报

lsy1996 发表于 2016-11-29 14:28:23
qcbb001 发表于 2016-11-28 16:21
配置 memcached 会话存储服务中192.168.157.11是什么ip地址

这里也有类似的问题

控制节点ip地址
回复

使用道具 举报

yuwenge 发表于 2016-11-29 15:19:51

在/etc/apache2/conf-available/openstack-dashboard.conf 文件中核实是否 有下面内容,没有则添加上

WSGIProcessGroup horizon WSGIApplicationGroup %{GLOBAL}

执行下面命令
/usr/share/openstack-dashboard$ sudo python manage.py compress


回复

使用道具 举报

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

本版积分规则

关闭

推荐上一条 /2 下一条