0

我正在尝试将我的 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>'

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

4

1 回答 1

0

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

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

于 2013-10-02T21:18:32.493 回答