Ask Your Question

ERROR: n/a (HTTP 400) when run nova

asked 2012-04-25 09:21:46 -0600

tungns-inf gravatar image

I use the official documents of Openstack to install Essex on Ubuntu 12.04 beta My nova use keystone to auth, keystone service is worked well with glance, but nova command doesn't work.

nova list

ERROR: n/a (HTTP 400)

I create an openrc file with content and

$ source openrc

export OS_USERNAME=adminUser export OS_TENANT_NAME=openstackDemo export OS_PASSWORD=secretword export OS_AUTH_URL= export OS_REGION_NAME=RegionOne

It works well with glance.

What's wrong in this case? Thank you!

edit retag flag offensive close merge delete

6 answers

Sort by » oldest newest most voted

answered 2012-05-18 05:33:01 -0600

tungns-inf gravatar image

Thanks Vish Ishaya, that solved my question.

edit flag offensive delete link more

answered 2012-04-26 03:31:15 -0600

tungns-inf gravatar image

The IP is correct. Maybe Ubuntu 12.04 beta doesn't complete so there're some errors. I will make a fresh install with the final version. Thank for your help :)

edit flag offensive delete link more

answered 2012-04-26 03:23:41 -0600

vishvananda gravatar image

Yes, your problem seems to be that the ip is wrong or that nova-api is not running properly. The endpoint configuration seems to be correct.

edit flag offensive delete link more

answered 2012-04-26 03:03:31 -0600

zhhuabj gravatar image

here is my env, you can refer:

export OS_USERNAME=admin export OS_PASSWORD=password export SERVICE_ENDPOINT=http://localhost:35357/v2.0 export SERVICE_TOKEN=ADMIN

#for nova client export NOVA_AUTH_STRATEGY=keystone export NOVA_USERNAME=admin export NOVA_PASSWORD=password export NOVA_PROJECT_ID=admin export NOVA_URL=http://localhost:35357/v2.0 export NOVA_VERSION=1.1

#for glance client export OS_AUTH_USER=admin export OS_AUTH_KEY=password export OS_AUTH_TENANT=admin export OS_AUTH_URL=http://localhost:35357/v2.0 export OS_AUTH_STRATEGY=keystone

edit flag offensive delete link more

answered 2012-04-26 02:31:51 -0600

tungns-inf gravatar image

Here the output of debug command:

connect: (, 5000) send: 'POST /v2.0/tokens HTTP/1.1\r\nHost:\r\nContent-Length: 117\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n{"auth": {"tenantName": "openstackDemo", "passwordCredentials": {"username": "adminUser", "password": "secretword"}}}' reply: 'HTTP/1.1 200 OK\r\n' header: Content-Type: application/json header: Vary: X-Auth-Token header: Date: Thu, 26 Apr 2012 02:28:44 GMT header: Transfer-Encoding: chunked connect: (, 8774) connect fail: (u'', 8774) DEBUG (shell:416) n/a (HTTP 400) Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/novaclient/", line 413, in main OpenStackComputeShell().main(sys.argv[1:]) File "/usr/lib/python2.7/dist-packages/novaclient/", line 364, in main args.func(self.cs, args) File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/", 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/", line 279, in list return self._list("/servers%s%s" % (detail, query_string), "servers") File "/usr/lib/python2.7/dist-packages/novaclient/", line 71, in _list resp, body = self.api.client.get(url) File "/usr/lib/python2.7/dist-packages/novaclient/", line 136, in get return self._cs_request(url, 'GET', *kwargs) File "/usr/lib/python2.7/dist-packages/novaclient/", line 124, in _cs_request *kwargs) File "/usr/lib/python2.7/dist-packages/novaclient/", line 107, in request raise exceptions.from_response(resp, body) BadRequest: n/a (HTTP 400) ERROR: n/a (HTTP 400)

It can not connect to host IP but here is the detail of my tokens. Is this look correct?

{ "access": { "serviceCatalog": [ { "endpoints": [ { "adminURL": "", "internalURL": "", "publicURL": "", "region": "RegionOne" } ], "endpoints_links": [], "name": "volume", "type": "volume" }, { "endpoints": [ { "adminURL": "", "internalURL": "", "publicURL": "", "region": "RegionOne" } ], "endpoints_links": [], "name": "swift", "type": "storage" }, { "endpoints": [ { "adminURL": "", "internalURL": "", "publicURL": "", "region": "RegionOne" } ], "endpoints_links": [], "name": "glance", "type": "image" }, { "endpoints": [ { "adminURL": "", "internalURL": "", "publicURL": "", "region": "RegionOne" } ], "endpoints_links": [], "name": "nova", "type": "compute" }, { "endpoints": [ { "adminURL": "", "internalURL": "", "publicURL": "", "region": "RegionOne" } ], "endpoints_links": [], "name": "keystone", "type": "identity" } ], "token": { "expires": "2012-04-27T02:26:02Z", "id": "987bea4f08274405adad8a361067b371", "tenant": { "description": "Service Tenant", "enabled": true, "id": "735ffa39e5cd4b8b8f30414ce4dcc2cd", "name": "service" } }, "user": { "id": "c9c8c911c9f64eb1aad01b2792a99ce7", "name": "nova", "roles": [ { "id": "e7f1492647894b179fb1002894f8f497", "name": "admin" } ], "roles_links": [], "username": "nova" } } }

edit flag offensive delete link more

answered 2012-04-25 14:53:16 -0600

vishvananda gravatar image


nova --debug list

you should be able to see the url that is failing. Probably your endpoints are misconfigured and it is connecting to the wrong url.


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2012-04-25 09:21:46 -0600

Seen: 213 times

Last updated: May 18 '12