Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket-rails + redis + phusion passenger: eventmachine not initialized: evma_connect_to_server #446

Open
deepsystm opened this issue May 23, 2018 · 2 comments

Comments

@deepsystm
Copy link

Hi to all!
I'm using rails 4.2.4, websocket-rails 0.7.0 and redis-rails 4.0.0.
In development mode all works well,
but in production when i try to read Rails.cache i getting
eventmachine not initialized: evma_connect_to_server

I spend many hours to deep dive into this issue, but I can't get it work. Anybody solve this error?

@deepsystm
Copy link
Author

part of framework trace

eventmachine (1.0.8) lib/eventmachine.rb:681:in `connect_server'
eventmachine (1.0.8) lib/eventmachine.rb:681:in `bind_connect'
eventmachine (1.0.8) lib/eventmachine.rb:657:in `connect'
redis (3.2.1) lib/redis/connection/synchrony.rb:72:in `connect'
redis (3.2.1) lib/redis/client.rb:322:in `establish_connection'
redis (3.2.1) lib/redis/client.rb:94:in `block in connect'
redis (3.2.1) lib/redis/client.rb:279:in `with_reconnect'
redis (3.2.1) lib/redis/client.rb:93:in `connect'
redis (3.2.1) lib/redis/client.rb:350:in `ensure_connected'
redis (3.2.1) lib/redis/client.rb:207:in `block in process'
redis (3.2.1) lib/redis/client.rb:292:in `logging'
redis (3.2.1) lib/redis/client.rb:206:in `process'
redis (3.2.1) lib/redis/client.rb:112:in `call'
redis (3.2.1) lib/redis.rb:789:in `block in get'
redis (3.2.1) lib/redis.rb:37:in `block in synchronize'
/home/ds/.rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
redis (3.2.1) lib/redis.rb:37:in `synchronize'
redis (3.2.1) lib/redis.rb:788:in `get'
redis-store (1.1.7) lib/redis/store/interface.rb:5:in `get'
redis-store (1.1.7) lib/redis/store/marshalling.rb:17:in `get'
redis-activesupport (4.1.5) lib/active_support/cache/redis_store.rb:230:in `block in read_entry'
redis-activesupport (4.1.5) lib/active_support/cache/redis_store.rb:212:in `call'
redis-activesupport (4.1.5) lib/active_support/cache/redis_store.rb:212:in `with'
redis-activesupport (4.1.5) lib/active_support/cache/redis_store.rb:230:in `read_entry'

@gregawoods
Copy link

This issue has appeared for us recently as well.

2.3.5 :002 > Rails.cache.fetch('test')
RuntimeError: eventmachine not initialized: evma_connect_to_server
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/eventmachine-1.2.3/lib/eventmachine.rb:677:in `connect_server'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/eventmachine-1.2.3/lib/eventmachine.rb:677:in `bind_connect'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/eventmachine-1.2.3/lib/eventmachine.rb:653:in `connect'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis/connection/synchrony.rb:72:in `connect'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis/client.rb:322:in `establish_connection'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis/client.rb:94:in `block in connect'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis/client.rb:279:in `with_reconnect'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis/client.rb:93:in `connect'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis/client.rb:350:in `ensure_connected'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis/client.rb:207:in `block in process'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis/client.rb:292:in `logging'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis/client.rb:206:in `process'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis/client.rb:112:in `call'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis.rb:789:in `block in get'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-3.2.1/lib/redis.rb:37:in `block in synchronize'
	from /usr/local/rvm/rubies/ruby-2.3.5/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
... 8 levels...
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-activesupport-4.1.4/lib/active_support/cache/redis_store.rb:212:in `with'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/redis-activesupport-4.1.4/lib/active_support/cache/redis_store.rb:230:in `read_entry'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:315:in `block in read'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:547:in `block in instrument'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in `instrument'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:547:in `instrument'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:314:in `read'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache.rb:302:in `fetch'
	from (irb):2
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/commands/console.rb:110:in `start'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/commands/console.rb:9:in `start'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:68:in `console'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
	from /var/deploy/example/shared/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
	from bin/rails:4:in `require'
	from bin/rails:4:in `<main>'
2.3.5 :003 > 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants