本帖最后由 yzc2006 于 2016-6-17 15:38 编辑
创建实例总是报 (HTTP 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
不知道是哪里问题???
|