openstack issue 5-阿里云开发者社区

开发者社区> 开发与运维> 正文

openstack issue 5

简介:

root@controller:~# nova --debug image-list

REQ: curl -i http://controller:35357/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "password"}}}'

INFO (connectionpool:191) Starting new HTTP connection (1): controller
DEBUG (connectionpool:283) "POST /v2.0/tokens HTTP/1.1" 200 1406
RESP: [200] {'date': 'Mon, 30 Dec 2013 08:01:20 GMT', 'content-type': 'application/json', 'content-length': '1406', 'vary': 'X-Auth-Token'}
RESP BODY: {"access": {"token": {"issued_at": "2013-12-30T08:01:20.941558", "expires": "2013-12-31T08:01:20Z", "id": "a6c87a5916294216a32893fadd5b2a53", "tenant": {"description": "Admin Tenant", "enabled": true, "id": "b062f1e52d264aecac9e453fd6299f39", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://controller:9292", "region": "regionOne", "internalURL": "http://controller:9292", "id": "8c4f4bc8884540d28400d780d74564e9", "publicURL": "http://controller:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://controller:8774/v2/b062f1e52d264aecac9e453fd6299f39", "region": "regionOne", "internalURL": "http://controller:8774/v2/b062f1e52d264aecac9e453fd6299f39", "id": "24fb6798cbfb45a99a74283bb5d4ed26", "publicURL": "http://controller:8774/v2/b062f1e52d264aecac9e453fd6299f39"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://controller:35357/v2.0", "region": "regionOne", "internalURL": "http://controller:5000/v2.0", "id": "16556978977a42579d170948fa126c70", "publicURL": "http://controller:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "fdf0ebbb214e4dec90ffebb12824cd84", "roles": [{"name": "admin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["a5cce06fed5346d680b87ba382bc069c"]}}}


REQ: curl -i http://controller:8774/v2/b062f1e52d264aecac9e453fd6299f39/images/detail -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: a6c87a5916294216a32893fadd5b2a53"

INFO (connectionpool:191) Starting new HTTP connection (1): controller
DEBUG (shell:768) [Errno 111] Connection refused
Traceback (most recent call last):
 File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 765, in main
   OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
 File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 701, in main
   args.func(self.cs, args)
 File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 727, in do_image_list
   image_list = cs.images.list(limit=limit)
 File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/images.py", line 55, in list
   return self._list('/images%s%s' % (detail, query), 'images')
 File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 62, in _list
   _resp, body = self.api.client.get(url)
 File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 228, in get
   return self._cs_request(url, 'GET', **kwargs)
 File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 215, in _cs_request
   **kwargs)
 File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 197, in _time_request
   resp, body = self.request(url, method, **kwargs)
 File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 168, in request
   **kwargs)
 File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request
   return session.request(method=method, url=url, **kwargs)
 File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 279, in request
   resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
 File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 374, in send
   r = adapter.send(request, **kwargs)
 File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 206, in send
   raise ConnectionError(sockerr)
ConnectionError: [Errno 111] Connection refused
ERROR: [Errno 111] Connection refused
root@controller:~# vim /root/export.sh
root@controller:~# vim /root/export.sh
root@controller:~# source /root/export.sh
root@controller:~# nova --debug image-list

REQ: curl -i http://controller:35357/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "password"}}}'

INFO (connectionpool:191) Starting new HTTP connection (1): controller
DEBUG (connectionpool:283) "POST /v2.0/tokens HTTP/1.1" 200 1406
RESP: [200] {'date': 'Mon, 30 Dec 2013 09:17:32 GMT', 'content-type': 'application/json', 'content-length': '1406', 'vary': 'X-Auth-Token'}
RESP BODY: {"access": {"token": {"issued_at": "2013-12-30T09:17:32.275739", "expires": "2013-12-31T09:17:32Z", "id": "0708620864d1424195f144a0b20c82a2", "tenant": {"description": "Admin Tenant", "enabled": true, "id": "b062f1e52d264aecac9e453fd6299f39", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://controller:9292", "region": "regionOne", "internalURL": "http://controller:9292", "id": "8c4f4bc8884540d28400d780d74564e9", "publicURL": "http://controller:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://controller:8774/v2/b062f1e52d264aecac9e453fd6299f39", "region": "regionOne", "internalURL": "http://controller:8774/v2/b062f1e52d264aecac9e453fd6299f39", "id": "24fb6798cbfb45a99a74283bb5d4ed26", "publicURL": "http://controller:8774/v2/b062f1e52d264aecac9e453fd6299f39"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://controller:35357/v2.0", "region": "regionOne", "internalURL": "http://controller:5000/v2.0", "id": "16556978977a42579d170948fa126c70", "publicURL": "http://controller:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "fdf0ebbb214e4dec90ffebb12824cd84", "roles": [{"name": "admin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["a5cce06fed5346d680b87ba382bc069c"]}}}


REQ: curl -i http://controller:8774/v2/b062f1e52d264aecac9e453fd6299f39/images/detail -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 0708620864d1424195f144a0b20c82a2"

INFO (connectionpool:191) Starting new HTTP connection (1): controller
DEBUG (shell:768) [Errno 111] Connection refused
Traceback (most recent call last):
 File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 765, in main
   OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
 File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 701, in main
   args.func(self.cs, args)
 File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 727, in do_image_list
   image_list = cs.images.list(limit=limit)
 File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/images.py", line 55, in list
   return self._list('/images%s%s' % (detail, query), 'images')
 File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 62, in _list
   _resp, body = self.api.client.get(url)
 File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 228, in get
   return self._cs_request(url, 'GET', **kwargs)
 File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 215, in _cs_request
   **kwargs)
 File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 197, in _time_request
   resp, body = self.request(url, method, **kwargs)
 File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 168, in request
   **kwargs)
 File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request
   return session.request(method=method, url=url, **kwargs)
 File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 279, in request
   resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)
 File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 374, in send
   r = adapter.send(request, **kwargs)
 File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 206, in send
   raise ConnectionError(sockerr)
ConnectionError: [Errno 111] Connection refused
ERROR: [Errno 111] Connection refused


本文转自luojinghappy 51CTO博客,原文链接:http://blog.51cto.com/luojinghappy/1346962,如需转载请自行联系原作者

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

分享:
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

其他文章