When auth_host (in api-paste.ini) has the wrong IP address, python-novaclient doesn't handle the error well. The given error message isn't helpful at all.
$ nova --debug list
....
reply: 'HTTP/1.1 503 Service Unavailable\r\n'
header: Content-Length: 100
header: Content-Type: text/plain; charset=UTF-8
header: Date: Tue, 27 Mar 2012 00:43:15 GMT
DEBUG (shell:416) string indices must be integers, not str
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 413, in main
OpenStackComputeShell().main(sys.argv[1:])
File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 364, in main
args.func(self.cs, args)
File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 520, in do_list
utils.print_list(cs.servers.list(search_opts=search_opts), columns,
File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py", line 279, in list
return self._list("/servers%s%s" % (detail, query_string), "servers")
File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 75, in _list
data = body[response_key]
TypeError: string indices must be integers, not str
ERROR: string indices must be integers, not str
It seems /review. openstack. org/#change, 5801 meets your requirements.
https:/
After that patch, if there are some erros in factory = keystone. middleware. auth_token: filter_ factory localhost: 5000/
[filter:authtoken]
paste.filter_
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_host = localhost1
auth_port = 35357
auth_protocol = http
auth_uri = http://
admin_tenant_name = admin
admin_user = admin
admin_password = password
the commands like nova list will get output like this: 35357\r\ nContent- Length: 103\r\ncontent- type: application/ json\r\ naccept- encoding: gzip, deflate\r\naccept: application/ json\r\ nuser-agent: python- novaclient\ r\n\r\n' tials": {"username": "admin", "password": "password"}}}' 72a437890e5df7b f9805097/ servers/ detail HTTP/1.1\r\nHost: localhost: 8774\r\ nx-auth- project- id: admin\r\ nx-auth- token: 1e831f77b86d45f 7af6dff6f405b9a fe\r\naccept- encoding: gzip, deflate\r\naccept: application/ json\r\ nuser-agent: python- novaclient\ r\n\r\n' 35357\r\ nContent- Length: 103\r\ncontent- type: application/ json\r\ naccept- encoding: gzip, deflate\r\naccept: application/ json\r\ nuser-agent: python- novaclient\ r\n\r\n' tials": {"username": "admin", "password": "password"}}}' 72a437890e5df7b f9805097/ servers/ detail HTTP/1.1\r\nHost: localhost: 8774\r\ nx-auth- project- id: admin\r\ nx-auth- token: 1e831f77b86d45f 7af6dff6f405b9a fe\r\naccept- encoding: gzip, deflate\r\naccept: application/ json\r\ nuser-agent: python- novaclient\ r\n\r\n' python2. 6/site- packages/ python_ novaclient- 2012.2- py2.6.egg/ novaclient/ shell.py" , line 412, in main mputeShell( ).main( sys.argv[ 1:]) python2. 6/site- packages/ python_ novaclient- 2012.2- py2.6.egg/ novaclient/ shell.py" , line 363, in main func(self. cs, args) python2. 6/site- packages/ python_ novaclient- ...
[root@robinlinux eclipse]# nova --debug list
connect: (localhost, 35357)
connect fail: ('localhost', 35357)
connect: (localhost, 35357)
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: localhost:
send: '{"auth": {"tenantName": "admin", "passwordCreden
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json
header: Vary: X-Auth-Token
header: Content-Length: 1965
header: Date: Tue, 27 Mar 2012 02:01:17 GMT
connect: (localhost, 8774)
connect fail: (u'localhost', 8774)
connect: (localhost, 8774)
send: u'GET /v1.1/36cf36c39
reply: 'HTTP/1.1 401 Unauthorized\r\n'
header: Content-Length: 54
header: Content-Type: text/plain; charset=UTF-8
header: Date: Tue, 27 Mar 2012 02:01:17 GMT
xxxxxxx &{u'error': {u'message': u'Unable to obtain admin token'}}
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: localhost:
send: '{"auth": {"tenantName": "admin", "passwordCreden
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json
header: Vary: X-Auth-Token
header: Content-Length: 1965
header: Date: Tue, 27 Mar 2012 02:01:17 GMT
send: u'GET /v1.1/36cf36c39
reply: 'HTTP/1.1 401 Unauthorized\r\n'
header: Content-Length: 54
header: Content-Type: text/plain; charset=UTF-8
header: Date: Tue, 27 Mar 2012 02:01:18 GMT
xxxxxxx &{u'error': {u'message': u'Unable to obtain admin token'}}
DEBUG (shell:415) Unable to obtain admin token (HTTP 401)
Traceback (most recent call last):
File "/usr/lib/
OpenStackCo
File "/usr/lib/
args.
File "/usr/lib/