Faye private pub web sockets Errno::ECONNREFUSED: Connection refused - connect(2)

Posted by Rubytastic on Stack Overflow See other posts from Stack Overflow or by Rubytastic
Published on 2013-10-30T17:49:02Z Indexed on 2013/10/31 15:54 UTC
Read the original article Hit count: 624

Filed under:
|
|

Faye private pub has issues connecting. It works from rails console and from inside application. It fails when called from background process like delayed_job or sidekiq.

I have been unable to resolve this issue for some time now, does anyone know why this happens?

Errno::ECONNREFUSED: Connection refused - connect(2) /Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/resolv-replace.rb:23:in initialize' /Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/resolv-replace.rb:23:in initialize' /Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:878:in open' /Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:878:in block in connect' /Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/timeout.rb:52:in timeout' /Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:877:in connect' /Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:862:in do_start' /Users/jordan/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:851:in start' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/private_pub-1.0.3/lib/private_pub.rb:42:in publish_message' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/private_pub-1.0.3/lib/private_pub.rb:29:in publish_to' /srv/books/app/workers/session_reload.rb:16:in perform' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/processor.rb:48:in block (3 levels) in process' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/chain.rb:119:in call' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/chain.rb:119:inblock in invoke' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/newrelic_rpm-3.6.8.168/lib/new_relic/agent/instrumentation/sidekiq.rb:25:in block in call' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/newrelic_rpm-3.6.8.168/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:324:in perform_action_with_newrelic_trace' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/newrelic_rpm-3.6.8.168/lib/new_relic/agent/instrumentation/sidekiq.rb:21:in call' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/chain.rb:121:inblock in invoke' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-failures-0.2.2/lib/sidekiq/failures/middleware.rb:10:in call' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/chain.rb:121:inblock in invoke' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/server/active_record.rb:6:in call' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/chain.rb:121:inblock in invoke' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/server/retry_jobs.rb:62:in call' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/chain.rb:121:inblock in invoke' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/server/logging.rb:11:in block in call' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/logging.rb:22:in with_context' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/server/logging.rb:7:in call' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/chain.rb:121:inblock in invoke' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/chain.rb:124:in call' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/middleware/chain.rb:124:ininvoke' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/processor.rb:47:in block (2 levels) in process' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/processor.rb:102:in stats' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/processor.rb:46:in block in process' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/processor.rb:83:in do_defer' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/sidekiq-2.16.0/lib/sidekiq/processor.rb:37:in process' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in public_send' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in dispatch' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/celluloid-0.15.2/lib/celluloid/calls.rb:122:in dispatch' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in block in handle_message' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in block in task' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in block in initialize' /Users/jordan/.rvm/gems/ruby-2.0.0-p247@books/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in block in create' Processor: dev-air.local:db67c04914cdef80c501043115298f6d-70211452597260

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about websocket