分享

上传镜像时500错误

zjnbb 发表于 2017-10-31 12:29:28 [显示全部楼层] 只看大图 回帖奖励 阅读模式 关闭右栏 4 7000
[root@controlNode ~]# openstack image create "cirros" --file cirros-0.3.5-x86_64-disk.img --disk-format qcow2 --container-format bare --public
HTTPInternalServerError (HTTP 500)
查看api.log如下:
2017-10-29 18:51:49.474 4471 WARNING keystoneauth.identity.generic.base [-] Failed to discover available identity versions when contacting http://controlNode:35357. Attempting to parse version from URL.: ConnectFailure: Unable to establish connection to http://controlNode:35357: HTTPConnectionPool(host='controlnode', port=35357): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x6291c50>: Failed to establish a new connection: [Errno -2] No address found',))
2017-10-29 18:51:49.479 4471 INFO eventlet.wsgi.server [-] Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/eventlet/wsgi.py", line 490, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/oslo_middleware/base.py", line 131, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/oslo_middleware/base.py", line 131, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/oslo_middleware/base.py", line 131, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 795, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/osprofiler/web.py", line 115, in __call__
    return request.get_response(self.application)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 331, in __call__
    response = self.process_request(req)
  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 622, in process_request
    resp = super(AuthProtocol, self).process_request(request)
  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 404, in process_request
    allow_expired=allow_expired)
  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 434, in _do_fetch_token
    data = self.fetch_token(token, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 761, in fetch_token
    allow_expired=allow_expired)
  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/_identity.py", line 217, in verify_token
    auth_ref = self._request_strategy.verify_token(
  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/_identity.py", line 168, in _request_strategy
    strategy_class = self._get_strategy_class()
  File "/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/_identity.py", line 190, in _get_strategy_class
    if self._adapter.get_endpoint(version=klass.AUTH_VERSION):
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 226, in get_endpoint
    return self.session.get_endpoint(auth or self.auth, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 947, in get_endpoint
    return auth.get_endpoint(self, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 378, in get_endpoint
    allow_version_hack=allow_version_hack, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 269, in get_endpoint_data
    service_catalog = self.get_access(session).service_catalog
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 135, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 196, in get_auth_ref
    self._plugin = self._do_create_plugin(session)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 191, in _do_create_plugin
    raise exceptions.DiscoveryFailure('Could not determine a suitable URL '
DiscoveryFailure: Could not determine a suitable URL for the plugin

2017-10-29 18:51:49.479 4471 INFO eventlet.wsgi.server [-] 192.168.88.8 - - [29/Oct/2017 18:51:49] "GET /v2/schemas/image HTTP/1.1" 500 139 2.154434

已有(4)人评论

跳转到指定楼层
zjnbb 发表于 2017-10-31 12:33:59
查了好久没查出原因来,重装过glance模块,重置过keystone和glance的数据库,都不行。另外,响应的端口,都用curl测试过,都正常。
也抓过包:看着与keystone通信及mysql通信都正常,对应的配置文件*.conf也没发现问题。
GET /v2/schemas/image HTTP/1.1
Host: controlnode:9292
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-glanceclient
Content-Type: application/octet-stream
X-Auth-Token: gAAAAABZ9xUrm5Fm_AzbXMugDVwuAczUh91ES-_zNL8g07jOVnGZohjJpl9O9X3gmjCEWqxdbCzuAp7BZXXl7sxd3tiggptm-F-fkEKZ6vmXHWDixxy68hzgllsIQpbZ-OpXEZUdbPyptyVYrekQfnUC-GshXEsbbXlZOwtodvPIoeB-Tnm88Wg

HTTP/1.1 500 Internal Server Error
Content-Type: text/plain
Content-Length: 0
Date: Mon, 30 Oct 2017 12:03:55 GMT
Connection: close
回复

使用道具 举报

zjnbb 发表于 2017-10-31 12:35:15
另外,我在centos 7.2 上,用RDO方式安装的P版,请大家帮帮忙,非常感谢!
回复

使用道具 举报

einhep 发表于 2017-10-31 14:53:12
zjnbb 发表于 2017-10-31 12:35
另外,我在centos 7.2 上,用RDO方式安装的P版,请大家帮帮忙,非常感谢!

hostname修改下
1.jpg
回复

使用道具 举报

zjnbb 发表于 2017-11-2 21:14:44
今天按照您的方法修改一下,已经解决问题了。非常感谢!
回复

使用道具 举报

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

本版积分规则

关闭

推荐上一条 /2 下一条