redis / hiredis-rb

Ruby wrapper for hiredis
BSD 3-Clause "New" or "Revised" License
320 stars 90 forks source link

Hiredis issue when using with redis.rb and sentinel #35

Closed lukaslozovski closed 9 years ago

lukaslozovski commented 9 years ago

Hi, when using hiredis with redis.rb sentinel connections I get the following error:

/Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis/connection/hiredis.rb:16:in connect': nodename nor servname provided, or not known (RuntimeError) from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis/connection/hiredis.rb:16:inconnect' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:285:in establish_connection' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:79:inblock in connect' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:257:in with_reconnect' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:78:inconnect' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:304:in ensure_connected' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:191:inblock in process' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:270:in logging' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:190:inprocess' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis/client.rb:96:in call' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis.rb:426:inblock in exists' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis.rb:37:in block in synchronize' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/monitor.rb:211:inmon_synchronize' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis.rb:37:in synchronize' from /Library/Ruby/Gems/2.0.0/gems/redis-3.0.7/lib/redis.rb:425:inexists' from /Library/Ruby/Gems/2.0.0/gems/redis-namespace-1.5.1/lib/redis/namespace.rb:392:in call_with_namespace' from /Library/Ruby/Gems/2.0.0/gems/redis-namespace-1.5.1/lib/redis/namespace.rb:289:inmethod_missing' from /Users/ll/.gem/ruby/2.0.0/gems/resque-scheduler-4.0.0/lib/resque/scheduler/scheduling_extensions.rb:55:in schedule=' from /Users/ll/riff-rails/config/initializers/resque.rb:7:in<top (required)>' from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:223:in load' from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:223:inblock in load' from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:214:in load_dependency' from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.5/lib/active_support/dependencies.rb:223:inload' from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:609:in block (2 levels) in <class:Engine>' from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:608:ineach' from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:608:in block in <class:Engine>' from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:30:ininstance_exec' from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:30:in run' from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.5/lib/rails/initializable.rb:55:inblock in run_initializers'

Does hiredis support sentinels?

lukaslozovski commented 9 years ago

Issue lies elsewhere, please ignore.