Ask Your Question
0

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=http://172.17.2.203:5000/v2.0/ 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
0

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
0

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
0

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
0

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
0

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

tungns-inf gravatar image

Here the output of debug command:

connect: (172.17.2.203, 5000) send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 172.17.2.203:5000\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: (172.17.2.203, 8774) connect fail: (u'172.17.2.203', 8774) DEBUG (shell:416) n/a (HTTP 400) 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 71, in _list resp, body = self.api.client.get(url) File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 136, in get return self._cs_request(url, 'GET', *kwargs) File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 124, in _cs_request *kwargs) File "/usr/lib/python2.7/dist-packages/novaclient/client.py", 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 172.17.2.203:8774 but here is the detail of my tokens. Is this look correct?

{ "access": { "serviceCatalog": [ { "endpoints": [ { "adminURL": "http://172.17.2.203:8776/v1/735ffa39e5cd4b8b8f30414ce4dcc2cd", "internalURL": "http://172.17.2.203:8776/v1/735ffa39e5cd4b8b8f30414ce4dcc2cd", "publicURL": "http://172.17.2.203:8776/v1/735ffa39e5cd4b8b8f30414ce4dcc2cd", "region": "RegionOne" } ], "endpoints_links": [], "name": "volume", "type": "volume" }, { "endpoints": [ { "adminURL": "http://127.0.0.1:8080/", "internalURL": "http://127.0.0.1:8080/v1/AUTH_735ffa39e5cd4b8b8f30414ce4dcc2cd", "publicURL": "http://127.0.0.1:8080/v1/AUTH_735ffa39e5cd4b8b8f30414ce4dcc2cd", "region": "RegionOne" } ], "endpoints_links": [], "name": "swift", "type": "storage" }, { "endpoints": [ { "adminURL": "http://172.17.2.203:9292/v1", "internalURL": "http://172.17.2.203:9292/v1", "publicURL": "http://172.17.2.203:9292/v1", "region": "RegionOne" } ], "endpoints_links": [], "name": "glance", "type": "image" }, { "endpoints": [ { "adminURL": "http://172.17.2.203:8774/v2/735ffa39e5cd4b8b8f30414ce4dcc2cd", "internalURL": "http://172.17.2.203:8774/v2/735ffa39e5cd4b8b8f30414ce4dcc2cd", "publicURL": "http://172.17.2.203:8774/v2/735ffa39e5cd4b8b8f30414ce4dcc2cd", "region": "RegionOne" } ], "endpoints_links": [], "name": "nova", "type": "compute" }, { "endpoints": [ { "adminURL": "http://172.17.2.203:5000/v2.0", "internalURL": "http://172.17.2.203:5000/v2.0", "publicURL": "http://172.17.2.203:35357/v2.0", "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
0

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

vishvananda gravatar image

Try:

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.

Vish

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

Stats

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

Seen: 213 times

Last updated: May 18 '12