ERROR: n/a (HTTP 400) too, but in trystack

Asked by Roger Perng

Hi, All:

Just got my trystack.org account, and after setup my python-novaclient, with the env vars, first run of "nova --debug list" shows:

man@RPUBUNTU:~$ nova --debug list
DEBUG (shell:425) n/a (HTTP 400)
Traceback (most recent call last):
  File "/home/rogerp/src/python-novaclient/novaclient/shell.py", line 422, in main
    OpenStackComputeShell().main(sys.argv[1:])
  File "/home/rogerp/src/python-novaclient/novaclient/shell.py", line 367, in main
    self.cs.authenticate()
  File "/home/rogerp/src/python-novaclient/novaclient/v1_1/client.py", line 108, in authenticate
    self.client.authenticate()
  File "/home/rogerp/src/python-novaclient/novaclient/client.py", line 229, in authenticate
    auth_url = self._v2_auth(auth_url)
  File "/home/rogerp/src/python-novaclient/novaclient/client.py", line 284, in _v2_auth
    self._authenticate(url, body)
  File "/home/rogerp/src/python-novaclient/novaclient/client.py", line 305, in _authenticate
    resp, body = self.request(token_url, "POST", body=body)
  File "/home/rogerp/src/python-novaclient/novaclient/client.py", line 107, in request
    raise exceptions.from_response(resp, body)
BadRequest: n/a (HTTP 400)
ERROR: n/a (HTTP 400)

Question:

1). in http://docs.openstack.org/trunk/openstack-compute/admin/content/part-i-setting-up-cloud-infrastructure.html, it shows the setting of:

export OS_USERNAME=joecool
export OS_PASSWORD=coolword
export OS_TENANT_NAME=coolu
export OS_AUTH_URL=http://trystack.org:5000/v2.0
export NOVA_VERSION=1.1

while in my trystack api page https://trystack.org/dash/api_info/ it shows:

export NOVA_USERNAME=facebookxxxxx
export NOVA_API_KEY=xxxx
export NOVA_PROJECT_ID=facebookxxxxx
export NOVA_URL=https://nova-api.trystack.org:5443/v2.0
export NOVA_VERSION=1.1

so I need both ? ... or which one to pick for my nova client ? ...

2). There's a similar question asked in https://answers.launchpad.net/nova/+question/194671 , similar error but not sure if it apply to trystack - I don't even have those "connect", "send", and post header info at all ....

3). Tried to add more info in client.py to print the url, it shows : "https://nova-api.trystack.org:5443/v2.0"

Any help will be very appreciated, Thanks !

Roger

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Roger Perng
Solved:
Last query:
Last reply:
Revision history for this message
Roger Perng (rogerpp) said :
#1

Got it solved, after adding this in my env:

OS_AUTH_URL=http://trystack.org:5000/v2.0

and "nova list" is working fine. This setting is not listed in that API page (https://trystack.org/dash/api_info/).

I wonder why the get auth token calls is returning keystone endpoint to "https://keystone.thefreecloud.org:5000/v2.0" which is not responding at all. But anyway I got it working now ... for those who can't get trystack to work ...

Revision history for this message
HobHub (dden537) said :
#2

hi Perng,

   I added the extra env variable u had mentioned, but still getting the same error as "n/a HTTP 400"

By following the instructions in the http://docs.openstack.org/api/quick-start/content/#comment-558562741, I was able to get a token using the first cURL command, and while using the token , to get connected (second command in the above website), I am getting the following error:

* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
{"badRequest": {"message": "Malformed request url", "code": 400}}

Any suggestiins wwould be of great help