pig2 发表于 2014-1-26 15:39:09

上传镜像(glance img)出现出现Request returned failure status.总结

安装镜像服务(Image Service)时,在Verify the Image Service installation这一步,上传镜像到镜像服务时(Upload the image to the Image Service)提示如标题所示的错误:Request returned failure status. HTTPInternalServerError (HTTP 500) .



解决方法:重启glance-registry和glance-api两个服务,即在命令行输入 service glance-registry restart和service glance-api restart运行,问题迎刃而解!原因是重启Linux(ubuntu),导致以上两个服务被关闭。其实这只是一个低级错误,有很多人也遇到过这个错误。

marsaber 发表于 2014-12-23 16:39:44

我的好像不行啊。(CentOS6.5,64位,icehouse)

# service openstack-glance-api restart && service openstack-glance-registry restart
Stopping openstack-glance-api:                           
Starting openstack-glance-api:                           
Stopping openstack-glance-registry:                        
Starting openstack-glance-registry:                        
# cd openstack_bak/
# ll
total 17364
-rw-r--r--1 root root       305 Dec 23 02:05 1.bash_profile
-rw-r--r--1 root root13167616 Dec 23 02:05 cirros-0.3.2-x86_64-disk.img
-rw-r--r--1 root root   14540 Dec 23 02:05 epel-release-6-8.noarch.rpm
-rw-r--r--1 root root   1340903 Dec 23 02:05 get-pip.py
drwxr-xr-x 16 1001 wheel   4096 Dec 23 06:58 gmp-6.0.0
-rw-r--r--1 root root   2319400 Dec 23 02:05 gmp-6.0.0a.tar.bz2
-rwxr-xr-x1 root root       196 Dec 23 02:05 keysone_clear.sh
-rw-r--r--1 root root      21 Dec 23 02:05 openssl_rand.txt
drwxr-xr-x7 10001000   4096 Dec 23 07:19 pycrypto-2.6.1
-rw-r--r--1 root root    446240 Jun 202014 pycrypto-2.6.1.tar.gz
-rw-r--r--1 root root    443445 Dec 23 02:05 pycrypto-2.6.tar.gz
-rw-r--r--1 root root   13589 Dec 23 02:05 rdo-release-icehouse-4.noarch.rpm
# glance image-create --name "cirros-0.3.2-x86_64" --disk-format qcow2 --container-format bare --is-public True --progress < cirros-0.3.2-x86_64-disk.img
[=============================>] 100%
Request returned failure status.
HTTPInternalServerError (HTTP 500)
#

marsaber 发表于 2014-12-23 16:41:02

日志/var/log/glance/api.log

2014-12-23 09:20:29.454 1472 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): controller
2014-12-23 09:20:29.601 1472 INFO glance.registry.client.v1.client Registry client request POST /images raised ServerError
2014-12-23 09:20:29.602 1472 INFO glance.wsgi.server Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/eventlet/wsgi.py", line 389, in handle_one_response
    result = self.application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
File "/usr/lib/python2.6/site-packages/webob/request.py", line 1296, in send
    application, catch_exc_info=False)
File "/usr/lib/python2.6/site-packages/webob/request.py", line 1260, in call_application
    app_iter = application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/keystoneclient/middleware/auth_token.py", line 679, in __call__
    return self.app(env, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
File "/usr/lib/python2.6/site-packages/webob/request.py", line 1296, in send
    application, catch_exc_info=False)
File "/usr/lib/python2.6/site-packages/webob/request.py", line 1260, in call_application
    app_iter = application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/paste/urlmap.py", line 203, in __call__
    return app(environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
File "/usr/lib/python2.6/site-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
File "/usr/lib/python2.6/site-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/utils.py", line 436, in wrapped
    return func(self, req, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/api/v1/images.py", line 794, in create
    image_meta = self._reserve(req, image_meta)
File "/usr/lib/python2.6/site-packages/glance/api/v1/images.py", line 523, in _reserve
    image_meta = registry.add_image_metadata(req.context, image_meta)
File "/usr/lib/python2.6/site-packages/glance/registry/client/v1/api.py", line 161, in add_image_metadata
    return c.add_image(image_meta)
File "/usr/lib/python2.6/site-packages/glance/registry/client/v1/client.py", line 163, in add_image
    res = self.do_request("POST", "/images", body=body, headers=headers)
File "/usr/lib/python2.6/site-packages/glance/registry/client/v1/client.py", line 107, in do_request
    **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 66, in wrapped
    return func(self, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 386, in do_request
    headers=copy.deepcopy(headers))
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 83, in wrapped
    return func(self, method, url, body, headers)
File "/usr/lib/python2.6/site-packages/glance/common/client.py", line 542, in _do_request
    raise exception.ServerError()
ServerError: The request returned 500 Internal Server Error.
2014-12-23 09:20:29.642 1472 INFO glance.wsgi.server 192.168.25.7 - - "POST /v1/images HTTP/1.1" 500 139 0.189350

marsaber 发表于 2014-12-23 19:15:10

http://www.aboutyun.com/thread-10752-1-1.html
版主,有时间帮忙看看吧。

℡藏 发表于 2016-1-8 11:24:30

我安装你说的重启服务还是不行呢,版主可以帮帮我吗





下面这个是日志文件



tntzbzc 发表于 2016-1-8 12:58:39

℡藏 发表于 2016-1-8 11:24
我安装你说的重启服务还是不行呢,版主可以帮帮我吗




这个目录已经上传成功了,但是数据库添加失败了。所以还是看看数据库是否正常。

℡藏 发表于 2016-1-8 16:49:20

可以帮帮我 吗?我不知道具体怎么弄,这个问题一直没解决,数据库也重建过。我QQ599912093。拜托啦

arsenduan 发表于 2016-1-8 17:24:42

℡藏 发表于 2016-1-8 16:49
可以帮帮我 吗?我不知道具体怎么弄,这个问题一直没解决,数据库也重建过。我QQ599912093。拜托啦

先补充下mysql知识吧,或则按照标准的教程:

推荐:这里有mysql的安装,
about云openstack入门宝典第四版_kilo版
http://www.aboutyun.com/thread-14650-1-1.html

如果教程不能满足的话,推荐视频
about云零基础开发、部署+理论openstack入门视频【J版及 K版】

这个也是about云的课程,和教程是同步的




页: [1]
查看完整版本: 上传镜像(glance img)出现出现Request returned failure status.总结