分享

上传镜像提示HTTPInternalServerError (HTTP 500)

Pikachu 发表于 2018-3-23 16:32:48 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 1 16041
openStack新手一枚,今天在搭建过程中遇到下面这个问题,google良久无法找出问题原因:
系统:Ubuntu 16.04
openStack版本:Queen
搭建操作步骤参考的是官网手册:https://docs.openstack.org/glanc ... install-ubuntu.html
在上传镜像时提示HTTPInternalServerError (HTTP 500)
root@controller:~# openstack image create "cirros"   --file cirros-0.3.5-x86_64-disk.img   --disk-format qcow2 --container-format bare   --public
HTTPInternalServerError (HTTP 500)


日志 /var/log/glance/glance-api.log存在错误提示,
2018-03-23 15:48:47.371 26621 WARNING keystonemiddleware._common.config [-] The option "__file__" in conf is not known to auth_token
2018-03-23 15:48:47.371 26621 WARNING keystonemiddleware._common.config [-] The option "here" in conf is not known to auth_token
2018-03-23 15:48:47.374 26621 WARNING keystonemiddleware.auth_token [-] AuthToken middleware is set with keystone_authtoken.service_token_roles_required set to False. This is backwards compatible but deprecated behaviour. Please set this to True.
2018-03-23 15:48:47.379 26621 WARNING oslo_config.cfg [-] Option "auth_uri" from group "keystone_authtoken" is deprecated. Use option "www_authenticate_uri" from group "keystone_authtoken".
2018-03-23 15:48:47.425 26621 INFO glance.common.wsgi [-] Starting 4 workers
2018-03-23 15:48:47.429 26621 INFO glance.common.wsgi [-] Started child 26636
2018-03-23 15:48:47.431 26636 INFO eventlet.wsgi.server [-] (26636) wsgi starting up on http://0.0.0.0:9292
2018-03-23 15:48:47.433 26621 INFO glance.common.wsgi [-] Started child 26637
2018-03-23 15:48:47.436 26637 INFO eventlet.wsgi.server [-] (26637) wsgi starting up on http://0.0.0.0:9292
2018-03-23 15:48:47.439 26621 INFO glance.common.wsgi [-] Started child 26638
2018-03-23 15:48:47.441 26638 INFO eventlet.wsgi.server [-] (26638) wsgi starting up on http://0.0.0.0:9292
2018-03-23 15:48:47.444 26621 INFO glance.common.wsgi [-] Started child 26639
2018-03-23 15:48:47.446 26639 INFO eventlet.wsgi.server [-] (26639) wsgi starting up on http://0.0.0.0:9292
2018-03-23 15:49:21.593 26639 WARNING keystoneauth.identity.generic.base [-] Failed to discover available identity versions when contacting http://controller:35357. Attempting to parse version from URL.: ConnectFailure: Unable to establish connection to http://controller:35357: HTTPConnectionPool(host='controller', port=35357): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f56d5a02150>: Failed to establish a new connection: [Errno 111] ECONNREFUSED',))
2018-03-23 15:49:21.596 26639 INFO eventlet.wsgi.server [-] Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 481, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/oslo_middleware/base.py", line 131, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/oslo_middleware/base.py", line 131, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/oslo_middleware/base.py", line 131, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 809, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/osprofiler/web.py", line 119, in __call__
    return request.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 334, in __call__
    response = self.process_request(req)
  File "/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 633, in process_request
    resp = super(AuthProtocol, self).process_request(request)
  File "/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 407, in process_request
    allow_expired=allow_expired)
  File "/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 440, in _do_fetch_token
    data = self.fetch_token(token, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token/__init__.py", line 772, in fetch_token
    allow_expired=allow_expired)
  File "/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token/_identity.py", line 219, in verify_token
    auth_ref = self._request_strategy.verify_token(
  File "/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token/_identity.py", line 170, in _request_strategy
    strategy_class = self._get_strategy_class()
  File "/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token/_identity.py", line 192, in _get_strategy_class
    if self._adapter.get_endpoint(version=klass.AUTH_VERSION):
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 223, in get_endpoint
    return self.session.get_endpoint(auth or self.auth, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 942, in get_endpoint
    return auth.get_endpoint(self, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 379, in get_endpoint
    allow_version_hack=allow_version_hack, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 270, in get_endpoint_data
    service_catalog = self.get_access(session).service_catalog
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/base.py", line 134, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 199, in get_auth_ref
    self._plugin = self._do_create_plugin(session)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/identity/generic/base.py", line 194, in _do_create_plugin
    raise exceptions.DiscoveryFailure('Could not determine a suitable URL '
DiscoveryFailure: Could not determine a suitable URL for the plugin

2018-03-23 15:49:21.596 26639 INFO eventlet.wsgi.server [-] 10.246.86.96 - - [23/Mar/2018 15:49:21] "GET /v2/schemas/image HTTP/1.1" 500 139 0.013599


下面是我的配置文件/etc/glance/glance-api.conf
root@controller:~# cat /etc/glance/glance-api.conf |grep -v ^# |grep -v ^$
[DEFAULT]
[cors]
[database]
connection = mysql+pymysql://glance:supor123@controller/glance
backend = sqlalchemy
[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
[image_format]
disk_formats = ami,ari,aki,vhd,vhdx,vmdk,raw,qcow2,vdi,iso,ploop.root-tar
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = supor123
[matchmaker_redis]
[oslo_concurrency]
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_messaging_zmq]
[oslo_middleware]
[oslo_policy]
[paste_deploy]
flavor = keystone
[profiler]
[store_type_location_strategy]
[task]
[taskflow_executor]


hosts文件
root@controller:~# cat /etc/hosts
127.0.0.1        localhost
#127.0.1.1        contr

10.246.86.96 controller
10.246.86.97 compute1
10.246.86.98 block1


# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


已有(1)人评论

跳转到指定楼层
hello2018 发表于 2018-3-23 20:50:12
http://controller:35357这个后面应该有版本信息,核实下,是不是配置漏掉了。 http://controller:35357/v3

回复

使用道具 举报

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

本版积分规则

关闭

推荐上一条 /2 下一条