Ruby 在调用 selenium-webdriver 库时发现报如下错误,找了好久资料不知道问题出在那里,有大神知道的吗

yaoqq321 · 2018年06月28日 · 最后由 imoomc 回复于 2018年06月29日 · 1584 次阅读

求教大佬 刚搭建个 ruby 关键打算写个自动登录网站的脚本 在调用 selenium-webdriver 库时发现报如下错误,找了好久资料不知道问题出在那里,有大神知道的吗? C:/Ruby25-x64/lib/ruby/2.5.0/net/http.rb:939:in rescue in block in connect': Failed to open TCP connection to 127.0.0.1:5555 (No connection could be made because the target machine actively refused it. - connect(2) for "127.0.0.1" port 5555) (Errno::ECONNREFUSED)![](https://l.ruby-china.com/photo/2018/fb06aebe-1f97-4cae-be20-de76c85ad147.png!large) from C:/Ruby25-x64/lib/ruby/2.5.0/net/http.rb:936:inblock in connect' from C:/Ruby25-x64/lib/ruby/2.5.0/timeout.rb:76:in timeout' from C:/Ruby25-x64/lib/ruby/2.5.0/net/http.rb:935:inconnect' from C:/Ruby25-x64/lib/ruby/2.5.0/net/http.rb:920:in do_start' from C:/Ruby25-x64/lib/ruby/2.5.0/net/http.rb:909:instart' from C:/Ruby25-x64/lib/ruby/2.5.0/net/http.rb:1455:in request' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/http/default.rb:121:inresponse_for' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/http/default.rb:76:in request' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/http/common.rb:62:incall' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/bridge.rb:164:in execute' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/bridge.rb:97:increate_session' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/remote/bridge.rb:53:in handshake' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/ie/driver.rb:46:ininitialize' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/common/driver.rb:46:in new' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver/common/driver.rb:46:infor' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.12.0/lib/selenium/webdriver.rb:86:in for' from C:/Users/Ҧǿǿ/Desktop/code/ruby/require 'selenium-webdriver.rb:17:in

' [Finished in 4.5s with exit code 1]

Failed to open TCP connection to 127.0.0.1:5555是不是啥服务没开

Emm...同意楼上的说法,不过之前我的问题是没有 grafana

需要 登录 后方可回复, 如果你还没有账号请 注册新账号