ezmobius/redis-rb — Issue #155: Redis::ProtocolError: Got 'I' as initial reply byte.
Author: manuelmeurer
Created: 2011-10-17 14:46:15+00:00
State: open

I updated an app from Rails 3 to 3.1 and added Resque and now started getting `Redis::ProtocolError: Got 'I' as initial reply byte...` (different letters and numbers as 'I').

```
[GEM_ROOT]/gems/redis-2.2.2/lib/redis/connection/ruby.rb:78:in `format_reply'
[GEM_ROOT]/gems/redis-2.2.2/lib/redis/connection/ruby.rb:68:in `read'
[GEM_ROOT]/gems/redis-2.2.2/lib/redis/client.rb:162:in `read'
[GEM_ROOT]/gems/redis-2.2.2/lib/redis/client.rb:46:in `block in call'
[GEM_ROOT]/gems/redis-2.2.2/lib/redis/client.rb:142:in `block (2 levels) in process'
[GEM_ROOT]/gems/redis-2.2.2/lib/redis/client.rb:250:in `ensure_connected'
[GEM_ROOT]/gems/redis-2.2.2/lib/redis/client.rb:137:in `block in process'
[GEM_ROOT]/gems/redis-2.2.2/lib/redis/client.rb:206:in `logging'
[GEM_ROOT]/gems/redis-2.2.2/lib/redis/client.rb:136:in `process'
[GEM_ROOT]/gems/redis-2.2.2/lib/redis/client.rb:46:in `call'
[GEM_ROOT]/gems/redis-2.2.2/lib/redis.rb:157:in `block in get'
/home/rails/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
[GEM_ROOT]/gems/redis-2.2.2/lib/redis.rb:156:in `get'
[GEM_ROOT]/gems/redis-store-1.0.0.1/lib/redis/store/interface.rb:5:in `get'
[GEM_ROOT]/gems/redis-store-1.0.0.1/lib/redis/store/marshalling.rb:13:in `get'
[GEM_ROOT]/gems/redis-store-1.0.0.1/lib/redis/store/namespace.rb:13:in `block in get'
[GEM_ROOT]/gems/redis-store-1.0.0.1/lib/redis/store/namespace.rb:46:in `namespace'
[GEM_ROOT]/gems/redis-store-1.0.0.1/lib/redis/store/namespace.rb:13:in `get'
[GEM_ROOT]/gems/redis-store-1.0.0.1/lib/i18n/backend/redis.rb:59:in `lookup'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n/backend/base.rb:26:in `translate'
[GEM_ROOT]/gems/redis-store-1.0.0.1/lib/i18n/backend/redis.rb:33:in `translate'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n/backend/chain.rb:46:in `block (2 levels) in translate'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n/backend/chain.rb:44:in `catch'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n/backend/chain.rb:44:in `block in translate'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n/backend/chain.rb:43:in `each'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n/backend/chain.rb:43:in `translate'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n/backend/fallbacks.rb:44:in `block (2 levels) in translate'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n/backend/fallbacks.rb:43:in `catch'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n/backend/fallbacks.rb:43:in `block in translate'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n/backend/fallbacks.rb:42:in `each'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n/backend/fallbacks.rb:42:in `translate'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n.rb:156:in `block in translate'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n.rb:152:in `catch'
[GEM_ROOT]/gems/i18n-0.6.0/lib/i18n.rb:152:in `translate'
```

The exception is triggered seemingly at random and by different calls to `I18n.t(...)` (some from my app, some internally from Rails).

The redis-rb version I run is 2.2.2 and the docs say versions >= 2.2.0 are thread safe by default so I don't know what the issue is...

I use Redis directly, via Redis-Store (session store, cache, I18n store) and via Resque.