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

Net::HTTP can't find host, but it's there #1

Closed
turboladen opened this issue May 24, 2011 · 4 comments
Closed

Net::HTTP can't find host, but it's there #1

turboladen opened this issue May 24, 2011 · 4 comments

Comments

@turboladen
Copy link

Installed version 0.0.3 and I can't seem to make a call to my XMLRPC server. I tried doing proxy = client.proxy, but that fails simliarly; I tried without the :path and get the same as well:

ruby-1.9.2-p180 :015 > client = Rapuncel::Client.new :host => "http://testlink.pelco.org", :path => '/lib/api/xmlrpc.php', :port => 80
 => #<Rapuncel::Client:0x00000100af3e70 @connection=#<Rapuncel::Connection:0x00000100af3c68 @host="http://testlink.pelco.org", @port=80, @path="lib/api/xmlrpc.php", @headers={}>, raise_on_faultfalse, raise_on_errorfalse 
ruby-1.9.2-p180 :016 > client.call "tl.about"
SocketError: getaddrinfo: nodename nor servname provided, or not known
    from /Users/sloveless/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:644:in `initialize'
    from /Users/sloveless/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:644:in `open'
    from /Users/sloveless/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:644:in `block in connect'
    from /Users/sloveless/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
    from /Users/sloveless/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:87:in `timeout'
    from /Users/sloveless/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:644:in `connect'
    from /Users/sloveless/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
    from /Users/sloveless/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:626:in `start'
    from /Users/sloveless/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:1168:in `request'
    from /Users/sloveless/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:978:in `post'
    from /Users/sloveless/.rvm/gems/ruby-1.9.2-p180/gems/rapuncel-0.0.3/lib/rapuncel/adapters/net_http_adapter.rb:30:in `send_method_call'
    from /Users/sloveless/.rvm/gems/ruby-1.9.2-p180/gems/rapuncel-0.0.3/lib/rapuncel/client.rb:51:in `execute'
    from /Users/sloveless/.rvm/gems/ruby-1.9.2-p180/gems/rapuncel-0.0.3/lib/rapuncel/client.rb:35:in `call'
    from (irb):16
    from /Users/sloveless/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>'
@cice
Copy link
Contributor

cice commented May 24, 2011

i'll check that out

@cice
Copy link
Contributor

cice commented May 24, 2011

could you try

client = Rapuncel::Client.new :host => "testlink.pelco.org", :path => '/lib/api/xmlrpc.php', :port => 80

(without 'http://')
haven't actually looked into it yet, but this may be the problem, but i see the inconvience of needing to omit the protocol, i'll fix that.

@cice
Copy link
Contributor

cice commented May 24, 2011

i fixed that and together with some ruby 1.9 fixes released 0.0.4, please let me know if you run into any bugs or missing features

@turboladen
Copy link
Author

That worked! Thanks for the quick follow up!

@cice cice closed this as completed May 24, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants