Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Stack - 503 Service Unavailable #3696

Closed
robear opened this issue Sep 17, 2015 · 5 comments
Closed

Open Stack - 503 Service Unavailable #3696

robear opened this issue Sep 17, 2015 · 5 comments

Comments

@robear
Copy link

robear commented Sep 17, 2015

Hi there,
I am trying to get fog working with swift at an OpenStack provider. I get what seems to be a correct service object after creation (correct urls and credentials for interacting with swift). When I try to use that object, I get 503 Service Unavailable for requests. How can I debug this? I get the full excon response object after the unexpected response. Am I able to capture the request object so that I can see what is going on?
Thanks,
Robert

@tunglam14
Copy link

Hi,

Have you try to place your debug code into this function: https://github.com/fog/fog/blob/master/lib/fog/openstack/storage.rb#L144

btw, i think 503 error that relate to server thing.

@robear
Copy link
Author

robear commented Sep 18, 2015

I have used httplog to watch requests. I did find an issue. When adding the :query => {'format' => 'json'} to requests (this is in the ruby files in the requests folder), this literally adds {'format' => 'json'} to the query string. The :query option is looking for a string literal such as '?format=json'

I have still not figured out the problem. The Open Stack command line tools work so the server is there and working fine. I will look at it further tomorrow.

@robear
Copy link
Author

robear commented Sep 21, 2015

I haven't gotten any closer to solving this. I wrote a small Ruby script using Net:HTTP to talk to the OpenStack api and it works fine. The command line tools work fine. There is something wrong in fog with OpenStack. Maybe it is an api version thing or something? Any pointers on where to look within fog to solve this?

@tunglam14
Copy link

It works fine for me:

[1] pry(main)> arg = {:provider=>"OpenStack", :openstack_auth_url=>ENV['OS_AUTH_URL'] + "/tokens", :openstack_username=>ENV['OS_USERNAME'], :openstack_api_key=>ENV['OS_PASSWORD'], :openstack_tenant=>ENV['OS_TENANT_NAME']}
=> xxxx
[2] pry(main)> 
[3] pry(main)> 
[4] pry(main)> Fog::Storage.new(arg).get_containers
=> #<Excon::Response:0x007f2ff495bd18
 @body="[]",
 @data=
 ...
>

You could try to compare 2 http requests, one comes from CLI tool, one comes from Fog, to find different things between them, i think :)

@plribeiro3000
Copy link
Member

Closing in favor of fog/fog-openstack#50

@fog fog locked and limited conversation to collaborators Mar 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants