将sidekiq连接到twemproxy(胡桃夹子)

时间:2013-09-30 17:23:24

标签: ruby redis sidekiq twemproxy

我正在尝试将我的sidekiq连接到twemproxy而不是直接Redis连接,但是我收到以下错误:

2013-09-30T17:16:53Z 23329 TID-3q3o4 INFO: Booting Sidekiq 2.12.1 using redis://localhost:22121 with options {}
2013-09-30T17:16:53Z 23329 TID-3q3o4 INFO: Running in ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]
2013-09-30T17:16:53Z 23329 TID-3q3o4 INFO: See LICENSE and the LGPL-3.0 for licensing details.
Connection lost (ECONNRESET)
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis/client.rb:210:in `rescue in io'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis/client.rb:206:in `io'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis/client.rb:214:in `read'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis/client.rb:84:in `block in call'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis/client.rb:187:in `block (2 levels) in process'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis/client.rb:295:in `ensure_connected'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis/client.rb:177:in `block in process'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis/client.rb:256:in `logging'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis/client.rb:176:in `process'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis/client.rb:84:in `call'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis.rb:410:in `block in keys'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis.rb:36:in `block in synchronize'
/usr/local/rubies/1.9.3-p448/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis.rb:36:in `synchronize'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/redis-3.0.4/lib/redis.rb:409:in `keys'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/sidekiq-2.12.1/lib/sidekiq/api.rb:71:in `block in cleanup'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/connection_pool-1.1.0/lib/connection_pool.rb:49:in `with'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/sidekiq-2.12.1/lib/sidekiq.rb:67:in `redis'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/sidekiq-2.12.1/lib/sidekiq/api.rb:70:in `cleanup'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/sidekiq-2.12.1/lib/sidekiq/cli.rb:55:in `run'
/mnt/-production/shared/bundle/ruby/1.9.1/gems/sidekiq-2.12.1/bin/sidekiq:8:in `<top (required)>'
/mnt/-production/shared/bundle/ruby/1.9.1/bin/sidekiq:23:in `load'
/mnt/-production/shared/bundle/ruby/1.9.1/bin/sidekiq:23:in `<main>'

似乎我失去了联系,但我无法确定根本原因。你知道它是否兼容尝试这种连接吗?

1 个答案:

答案 0 :(得分:0)

最新版本的sidekiq(截至2.14.1时)能够连接到twemproxy而不是redis服务器。

但是由于使用brpop命令,它不兼容。