jimsynz / faye-rails

Simple Rails glue for the Faye messaging protocol.
MIT License
435 stars 79 forks source link

Interference with DelayedJob? No Acceptor #19

Closed natew closed 11 years ago

natew commented 11 years ago

EDIT: no longer thing it has to do with delayed_job necessarily, though the errors were different when I used it. Here's my procfile btw:

web: bundle exec thin start -p $PORT
worker: bundle exec rake --trace jobs:work ENV=development
log: tail -f -n 0 log/development.log

If I try and run faye-rails (listening on any number of ports) and run delayed_job (using bundle exec rake --trace jobs:work) I get this:

>> Thin web server (v1.4.1 codename Chromeo)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:2000, CTRL+C to stop
rake aborted!
no acceptor
/.rvm/gems/ruby-1.9.3-p0@2u/gems/eventmachine-0.12.10/lib/eventmachine.rb:572:in `start_tcp_server'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/eventmachine-0.12.10/lib/eventmachine.rb:572:in `start_server'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/thin-1.4.1/lib/thin/backends/tcp_server.rb:16:in `connect'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/thin-1.4.1/lib/thin/backends/base.rb:55:in `block in start'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/thin-1.4.1/lib/thin/backends/base.rb:61:in `call'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/thin-1.4.1/lib/thin/backends/base.rb:61:in `start'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/thin-1.4.1/lib/thin/server.rb:159:in `start'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rack-1.4.1/lib/rack/handler/thin.rb:13:in `run'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/faye-0.8.5/lib/faye/adapters/rack_adapter.rb:54:in `listen'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/faye-rails-1.0.1/lib/faye-rails/rack_adapter.rb:16:in `listen'
/Sites/fusefm/config/routes.rb:8:in `block (2 levels) in <top (required)>'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/faye-rails-1.0.1/lib/faye-rails/routing_hooks.rb:27:in `instance_eval'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/faye-rails-1.0.1/lib/faye-rails/routing_hooks.rb:27:in `faye_server'
/Sites/fusefm/config/routes.rb:5:in `block in <top (required)>'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:282:in `eval_block'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:260:in `draw'
/Sites/fusefm/config/routes.rb:1:in `<top (required)>'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `block in load'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:40:in `each'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:16:in `reload!'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/activesupport-3.2.6/lib/active_support/file_update_checker.rb:78:in `call'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/activesupport-3.2.6/lib/active_support/file_update_checker.rb:78:in `execute'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:27:in `updater'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Sites/fusefm/config/environment.rb:5:in `<top (required)>'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/application.rb:103:in `require_environment!'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/railties-3.2.6/lib/rails/application.rb:292:in `block (2 levels) in initialize_tasks'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/.rvm/gems/ruby-1.9.3-p0@2u/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/.rvm/gems/ruby-1.9.3-p0@2u/bin/rake:19:in `load'
/.rvm/gems/ruby-1.9.3-p0@2u/bin/rake:19:in `<main>'
Tasks: TOP => jobs:work => environment
>> Thin web server (v1.4.1 codename Chromeo)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:5100, CTRL+C to stop
exited with code 1

If I remove the delayed_job worker I get:

>> Thin web server (v1.4.1 codename Chromeo)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:2000, CTRL+C to stop
>> Thin web server (v1.4.1 codename Chromeo)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:5000, CTRL+C to stop
exited with code 0

Any reason why it just exits like this?

natew commented 11 years ago

Got it working without specifying a port, though still trying to get a successful send/receive!