# Connection failed error

**URL:** <https://www.ruby-forum.com/t/connection-failed-error/154269>\
**Category:** Ruby\
**Created:** [November 27, 2008, 5:34am UTC](https://www.ruby-forum.com/t/connection-failed-error/154269 "2008-11-27T05:34:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manoah](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7993a0/32.png) [@manoah](https://www.ruby-forum.com/u/manoah)\
**Post date:** [November 27, 2008, 5:34am UTC](https://www.ruby-forum.com/t/connection-failed-error/154269/1 "2008-11-27T05:34:21Z")

</div>

I am getting the below error while i try to get response from API. What  
should I do to solve this

c:/ruby/lib/ruby/1.8/net/http.rb:564:in `initialize': A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2) (Errno::ETIMEDOUT) from c:/ruby/lib/ruby/1.8/net/http.rb:564:in`open’  
from c:/ruby/lib/ruby/1.8/net/http.rb:564:in `connect' from c:/ruby/lib/ruby/1.8/timeout.rb:48:in`timeout’  
from c:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout' from c:/ruby/lib/ruby/1.8/net/http.rb:564:in`connect’  
from c:/ruby/lib/ruby/1.8/net/http.rb:557:in `do_start' from c:/ruby/lib/ruby/1.8/net/http.rb:546:in`start’  
from c:/ruby/lib/ruby/1.8/open-uri.rb:243:in `open_http' from c:/ruby/lib/ruby/1.8/open-uri.rb:617:in`buffer\_open’  
from c:/ruby/lib/ruby/1.8/open-uri.rb:164:in `open_loop' from c:/ruby/lib/ruby/1.8/open-uri.rb:162:in`catch’  
from c:/ruby/lib/ruby/1.8/open-uri.rb:162:in `open_loop' from c:/ruby/lib/ruby/1.8/open-uri.rb:132:in`open\_uri’  
from c:/ruby/lib/ruby/1.8/open-uri.rb:519:in `open' from c:/ruby/lib/ruby/1.8/open-uri.rb:30:in`open’  
from wishpot.rb:19:in `create\_urlrequest’  
from wishpot.rb:50
