2

Ruby on Rails アプリを起動できなくなりました。明確な理由はありませんが、「rails s」、「rake db:migrate」、「thin start」などのコマンドを実行すると、次の例外が発生するようになりました。

Connection refused - connect(2) (Errno::ECONNREFUSED) (Excon::Errors::SocketError)

少し読んだ後、これは、どこかで何かがいくつかのポートをリッスンしていないことを示しているようです (!) が、残念ながら、これは私が本当に知識がなく、快適ではない領域です。

これを引き起こした原因を突き止めようとしたときに思いつく唯一の最近の変更は、Mavericks を実行している Macbook pro に Jmeter をインストールし、Homebrew で使用したことです。

最終的にこれを解決するために正しい方向に私を向けることができるアイデアは高く評価されます.

記録のために、問題が発生した場所を示す行を次に示します。

編集:ここに完全なトレースがあります:

/Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:218:in `connect_nonblock': Connection refused - connect(2) (Errno::ECONNREFUSED) (Excon::Errors::SocketError)
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:218:in `rescue in block in connect'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:187:in `block in connect'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:183:in `each'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:183:in `connect'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:28:in `initialize'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/connection.rb:418:in `new'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/connection.rb:418:in `socket'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/connection.rb:126:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/newrelic_rpm-3.8.0.218/lib/new_relic/agent/instrumentation/excon/middleware.rb:28:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/middlewares/mock.rb:42:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/middlewares/base.rb:15:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/middlewares/base.rb:15:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/middlewares/base.rb:15:in `request_call'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/connection.rb:269:in `request'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/neography-1.5.0/lib/neography/connection.rb:70:in `block (3 levels) in <class:Connection>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/neography-1.5.0/lib/neography/connection.rb:84:in `log'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/neography-1.5.0/lib/neography/connection.rb:62:in `block (2 levels) in <class:Connection>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/neography-1.5.0/lib/neography/rest/node_auto_indexes.rb:38:in `set_node_auto_index_status'
from /Users/pierre/argomento/config/initializers/01_neo4j.rb:20:in `<top (required)>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:in `load'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:in `block in load'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:in `load'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/engine.rb:592:in `each'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/engine.rb:592:in `block in <class:Engine>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/initializable.rb:30:in `run'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/initializable.rb:54:in `each'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/application.rb:136:in `initialize!'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/pierre/argomento/config/environment.rb:5:in `<top (required)>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require'
from /Users/pierre/argomento/config.ru:3:in `block in <main>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /Users/pierre/argomento/config.ru:in `new'
from /Users/pierre/argomento/config.ru:in `<main>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/commands/server.rb:46:in `app'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/commands/server.rb:70:in `start'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/commands.rb:50:in `tap'
from /Users/pierre/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.18/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
4

1 に答える 1

3

Neo4j サーバーが稼働していることを確認しましたか?

Homebrew を使用してインストールした場合は、次のコマンドを発行して実行できます。

neo4j start

その後、Rails アプリの起動を再試行できます。

rails s

ソース: http://docs.neo4j.org/chunked/stable/server-installation.html

それはあなたの問題を解決しましたか?

于 2014-05-11T08:56:40.707 に答える