如何避免Errno :: ECONNREFUSED :(连接被拒绝 - 连接(2)

时间:2014-02-15 09:26:42

标签: ruby selenium-webdriver cucumber calabash pageobjects

当我突然执行方案时,我收到如下错误消息:

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'

如何解决并克服此问题。

我以前执行的评论是:

  • 黄瓜功能/ APP_PATH = ..... / ... / .. / test.app DEVICE = ipad SDK_VERSION = 6.1

2 个答案:

答案 0 :(得分:4)

我遇到了同样的错误,这是因为elasticsearch服务没有运行。干脆做了: sudo service elasticsearch start

答案 1 :(得分:0)

您是否尝试在模拟器上启动应用程序?确保模拟器正在运行且-cal应用程序已启动。这应该打开该端口进行通信。