分享

glance上传镜像提示HTTP500错误

会飞的兔子 发表于 2015-4-30 15:12:47 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 4 36177
root@ubuntu:~# glance image-create --name "cirros-0.3.3-x86_64" --file /tmp/images/cirros-0.3.3-x86_64-disk.img \
> --disk-format qcow2 --container-format bare --is-public True --progress
[=============================>] 100%
Request returned failure status 500.
HTTPInternalServerError (HTTP 500)
日志如下所示:
2015-04-30 15:00:11.106 15694 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 125.223.29.49
2015-04-30 15:00:11.137 15694 INFO keystonemiddleware.auth_token [-] Auth Token confirmed use of v2.0 apis
2015-04-30 15:00:11.140 15694 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 125.223.29.49
2015-04-30 15:00:11.378 15694 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 125.223.29.49
2015-04-30 15:00:11.437 15694 INFO glance.registry.client.v1.client [af0744e4-4a7c-4cdf-bd53-00a2c512c68c 34c02d3e67584f0e877204925ada6339 2beb270a330e4303be7d32efc91983ec - - -]
Registry client request POST /images raised ClientConnectionError
2015-04-30 15:00:11.443 15694 INFO glance.wsgi.server [af0744e4-4a7c-4cdf-bd53-00a2c512c68c 34c02d3e67584f0e877204925ada6339 2beb270a330e4303be7d32efc91983ec - - -] Traceback (mos
t recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 394, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/osprofiler/web.py", line 99, in __call__
    return request.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystonemiddleware/auth_token.py", line 661, in __call__
    return self._app(env, start_response)File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 373, in do_request
    headers=copy.deepcopy(headers))
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 85, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 539, in _do_request
    raise exception.ClientConnectionError(e)
ClientConnectionError: [Errno 111] ECONNREFUSED
2015-04-30 15:00:11.501 15694 INFO glance.wsgi.server [af0744e4-4a7c-4cdf-bd53-00a2c512c68c 34c02d3e67584f0e877204925ada6339 2beb270a330e4303be7d32efc91983ec - - -] 125.223.29.49
- - [30/Apr/2015 15:00:11] "POST /v1/images HTTP/1.1" 500 139 0.427338
配置文件如下:
[DEFAULT]
notification_driver = noop
verbose = True
bind_host = 125.223.29.49
bind_port = 9292
log_file = /var/log/glance/api.log
[database]
connection = mysql://glance:HLJ@ppsd@ubuntu/glance
[keystone_authtoken]
auth_uri = http://125.223.29.49:5000/v2.0
identity_uri = http://125.223.29.49:35357
auth_host = ubuntu
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = HLJ@ppsd
备注:数据库连接都没有任何问题,数据库登陆正常,只有glance image-list和上传镜像报http500 客户端连接失败的错误


已有(4)人评论

跳转到指定楼层
bioger_hit 发表于 2015-4-30 15:53:11
配置有些多余
mysql的password去掉@at符号,可能会被误解析


认证配置,按照下面啊即可,其余可去掉
  1. [keystone_authtoken]
  2. ...
  3. auth_uri = http://controller:5000/v2.0
  4. identity_uri = http://controller:35357
  5. admin_tenant_name = service
  6. admin_user = glance
  7. admin_password = GLANCE_PASS
复制代码


回复

使用道具 举报

会飞的兔子 发表于 2015-5-4 10:46:52
都该了 还是不行  报客户端连接错误,这是连接那里的报错啊?数据库连接没有问题啊
回复

使用道具 举报

Alkaloid0515 发表于 2015-5-4 13:38:14
会飞的兔子 发表于 2015-5-4 10:46
都该了 还是不行  报客户端连接错误,这是连接那里的报错啊?数据库连接没有问题啊

不要只说客观观点,都改了,数据库连接没有问题,但是还报错。说明该的还不对,贴出你认为对的内容,这样才有帮助
回复

使用道具 举报

跟着大王去巡山 发表于 2015-5-5 08:46:04
上次我也是,密码你看一下和数据库对应的一致吗?
回复

使用道具 举报

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

本版积分规则

关闭

推荐上一条 /2 下一条