分享

请教各位大牛创建实例 (HTTP 500)错误

yzc2006 发表于 2016-6-17 15:35:47 [显示全部楼层] 只看大图 回帖奖励 阅读模式 关闭右栏 10 23036
本帖最后由 yzc2006 于 2016-6-17 15:38 编辑

创建实例总是报 (HTTP 500)错误,

500

500

shell下打印debug信息
# nova --debug boot --flavor m1.tiny --image cirros-0.3.4-x86_64 --nic net-id=38ecec49-deed-43ac-9045-9d6cfc5f5d9e --security-group default --key-name demo-key demo-instance1

使用--debug打印出信息如下:
DEBUG (session:195) REQ: curl -g -i -X GET http://192.168.198.132:5000/v3 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool:213) Starting new HTTP connection (1): 192.168.198.132
DEBUG (connectionpool:393) "GET /v3 HTTP/1.1" 200 254
DEBUG (session:224) RESP: [200] Content-Length: 254 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 Connection: Keep-Alive Date: Fri, 17 Jun 2016 07:16:04 GMT Content-Type: application/json x-openstack-request-id: req-7faf3b8c-f332-47bf-b3fd-cf55f6696629
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://192.168.198.132:5000/v3/", "rel": "self"}]}}

DEBUG (base:171) Making authentication request to http://192.168.198.132:5000/v3/auth/tokens
DEBUG (connectionpool:393) "POST /v3/auth/tokens HTTP/1.1" 201 2859
DEBUG (session:195) REQ: curl -g -i -X GET http://192.168.198.132:8774/v2/f ... 29a62cde1540/images -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}a8103bf3806b1060a1ae157d06340629053f81e6"
INFO (connectionpool:213) Starting new HTTP connection (1): 192.168.198.132
DEBUG (connectionpool:393) "GET /v2/f2fe4023fb8c4fedb8ea29a62cde1540/images HTTP/1.1" 200 523
DEBUG (session:224) RESP: [200] Date: Fri, 17 Jun 2016 07:16:10 GMT Connection: keep-alive Content-Type: application/json Content-Length: 523 X-Compute-Request-Id: req-9222bcc8-a44c-4d4a-893e-55126dcf524b
RESP BODY: {"images": [{"id": "c088e817-e4f0-446a-9ca5-69e36f775b86", "links": [{"href": "http://192.168.198.132:8774/v2/f2fe4023fb8c4fedb8ea29a62cde1540/images/c088e817-e4f0-446a-9ca5-69e36f775b86", "rel": "self"}, {"href": "http://192.168.198.132:8774/f2fe4023fb8c4fedb8ea29a62cde1540/images/c088e817-e4f0-446a-9ca5-69e36f775b86", "rel": "bookmark"}, {"href": "http://192.168.198.132:9292/images/c088e817-e4f0-446a-9ca5-69e36f775b86", "type": "application/vnd.openstack.image", "rel": "alternate"}], "name": "cirros-0.3.4-x86_64"}]}

DEBUG (session:195) REQ: curl -g -i -X GET http://192.168.198.132:8774/v2/f ... a-9ca5-69e36f775b86 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}a8103bf3806b1060a1ae157d06340629053f81e6"
DEBUG (connectionpool:393) "GET /v2/f2fe4023fb8c4fedb8ea29a62cde1540/images/c088e817-e4f0-446a-9ca5-69e36f775b86 HTTP/1.1" 500 128
DEBUG (session:224) RESP:
DEBUG (shell:914) The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-1d476578-d1f5-42b0-8d2b-6873caf4b6f1)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 911, in main
    OpenStackComputeShell().main(argv)
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 838, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 495, in do_boot
    boot_args, boot_kwargs = _boot(cs, args)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 142, in _boot
    image = _find_image(cs, args.image)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/shell.py", line 1894, in _find_image
    return utils.find_resource(cs.images, image)
  File "/usr/lib/python2.7/site-packages/novaclient/utils.py", line 216, in find_resource
    return manager.find(**kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 196, in find
    matches = self.findall(**kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 258, in findall
    found.append(self.get(obj.id))
  File "/usr/lib/python2.7/site-packages/novaclient/v2/images.py", line 53, in get
    return self._get("/images/%s" % base.getid(image), "image")
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 156, in _get
    _resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/site-packages/keystoneclient/adapter.py", line 170, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 96, in request
    raise exceptions.from_response(resp, body, url, method)
ClientException: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-1d476578-d1f5-42b0-8d2b-6873caf4b6f1)
ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-1d476578-d1f5-42b0-8d2b-6873caf4b6f1)



查看/var/log/nova/nova-api.log  日志只有此日志有错误信息
2016-06-17 15:16:11.809 2704 ERROR nova.api.openstack [req-1d476578-d1f5-42b0-8d2b-6873caf4b6f1 b3dbc82f5c0a4f35b6b01fa778c67fda f2fe4023fb8c4fedb8ea29a62cde1540 - - -] Caught error: id



不知道是哪里问题???

已有(10)人评论

跳转到指定楼层
nextuser 发表于 2016-6-17 18:38:54
楼主看下controller的组件日志。
上面信息只能看出controller有问题。
创建实例不成功,很多因素。镜像,Nova,neutron出问题都不能创建成功的。
楼主最有可能是镜像和Nova的问题。不能只看novel api的
回复

使用道具 举报

445433045 发表于 2016-6-19 08:21:36
这个是k版的bug,你可以把python-glanceclient软件版本升级一下就可以解决。我已经为这个问题坑了一个月了。你可以试试,这个问题的原因是nova-api获取glance镜像的时候报500错误。nova-image show image-id会报这个错误
回复

使用道具 举报

yzc2006 发表于 2016-6-19 20:46:45
nextuser 发表于 2016-6-17 18:38
楼主看下controller的组件日志。
上面信息只能看出controller有问题。
创建实例不成功,很多因素。镜像, ...

非常感谢!!
回复

使用道具 举报

yzc2006 发表于 2016-6-19 20:47:34
445433045 发表于 2016-6-19 08:21
这个是k版的bug,你可以把python-glanceclient软件版本升级一下就可以解决。我已经为这个问题坑了一个月了 ...

非常感谢!!
回复

使用道具 举报

hy8431822 发表于 2016-6-21 16:54:05
我也碰到这个错误了,请问楼主解决了吗?如何解决的?
回复

使用道具 举报

yzc2006 发表于 2016-6-22 09:32:32
hy8431822 发表于 2016-6-21 16:54
我也碰到这个错误了,请问楼主解决了吗?如何解决的?

python-glanceclient软件版本升级一下就可以解决
回复

使用道具 举报

hy8431822 发表于 2016-6-22 10:24:22
yzc2006 发表于 2016-6-22 09:32
python-glanceclient软件版本升级一下就可以解决

可以麻烦给出具体的升级步骤吗?
我这边升级的时候提示无可用更新包
我的软件版本号如下:
[root@controller ~]# pip freeze | grep python-
python-ceilometerclient==1.0.13
python-cinderclient==1.2.1
python-dateutil==1.5
python-editor==0.4
python-glanceclient==0.17.0
python-heatclient==0.6.0
python-keystoneclient==1.3.0
python-ldap==2.4.15
python-memcached==1.54
python-mimeparse==0.1.4
python-neutronclient==2.4.0
python-novaclient==2.23.0
python-openstackclient==1.0.3
python-saharaclient==0.8.0
python-swiftclient==2.4.0
python-troveclient==1.0.9



谢谢!

回复

使用道具 举报

hy8431822 发表于 2016-6-22 10:58:55
解决了。
去官网下载一个2.0版本的RPM包,安装之后就可以创建实例了!
回复

使用道具 举报

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

本版积分规则

关闭

推荐上一条 /2 下一条