How to avoid Errno::ECONNREFUSED: (Connection refused - connect(2)

KAK picture KAK · Feb 15, 2014 · Viewed 7.1k times · Source

While I'm executing the scenarios suddenly I got the error message as follows:

Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Failing... Errno::ECONNREFUSED
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Retrying.. Errno::ECONNREFUSED: (Connection refused - connect(2) (http://localhost:37265))
Failing... Errno::ECONNREFUSED
Connection refused - connect(2) (http://localhost:37265) (Errno::ECONNREFUSED)
/usr/local/rvm/gems/ruby-1.9.3-p429/gems/httpclient-2.3.4.1/lib/httpclient/session.rb:803:in `initialize'

How do I resolve and overcome from this issue.

Comment that I used to execute is:

  • cucumber features/ APP_PATH=...../.../../test.app DEVICE=ipad SDK_VERSION=6.1

Answer

Shimaa Marzouk picture Shimaa Marzouk · Mar 16, 2014

i faced the same error, and it was because elasticsearch service not running. simply did: sudo service elasticsearch start