redis.clients.jedis.exceptions.JedisConnectionException: Unknown reply: b

1,692 views
Skip to first unread message

clara

unread,
Jul 27, 2011, 11:28:40 AM7/27/11
to Jedis
I've been getting strange exceptions from Jedis when using a single
client. The Jedis connection pool is set up through redis gorm plugin.
I set testOnBorrow on the connection pool to true.

This is happening both on jedis 1.5.2 and 2.0.0

I am calling the same method in fast sequence and I am getting the
following on zrevrange:
redis.clients.jedis.exceptions.JedisConnectionException: Unknown
reply: b
at redis.clients.jedis.Protocol.process(Protocol.java:71)
at redis.clients.jedis.Protocol.read(Protocol.java:122)
at
redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:
189)
at redis.clients.jedis.Connection.getMultiBulkReply(Connection.java:
182)
at redis.clients.jedis.Jedis.zrevrange(Jedis.java:1567)

and on hgetall
redis.clients.jedis.exceptions.JedisConnectionException: Unknown
reply: 2
at redis.clients.jedis.Protocol.process(Protocol.java:71)
at redis.clients.jedis.Protocol.processMultiBulkReply(Protocol.java:
116)
at redis.clients.jedis.Protocol.process(Protocol.java:63)
at redis.clients.jedis.Protocol.read(Protocol.java:122)
at
redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:
189)
at redis.clients.jedis.Jedis.hgetAll(Jedis.java:861)

These calls succeed if they are not called in fast sequence. Once the
error occurs subsequent calls fail as well. It looks like the errors
put the connection in an inconsistent state.

I appreciate any suggestions to get passed this.

Thanks,
Clara




Jonathan Leibiusky

unread,
Aug 2, 2011, 2:11:55 PM8/2/11
to jedis...@googlegroups.com
are you using pipelines?
this error will happen only if you are sharing instances across threads or using pipelines and not closing them and returning the instance to the pool.
can you share your code or part of it where you reproduce this?

clara

unread,
Aug 4, 2011, 12:16:24 PM8/4/11
to Jedis
Thank you for your answer.

I was not using pipelines - but I was going through the redis gorm
(grails) plugin which is a wrapper on top of jedis.
I switched to go directly to jedis and the problem went away.

On Aug 2, 2:11 pm, Jonathan Leibiusky <ionat...@gmail.com> wrote:
> are you using pipelines?
> this error will happen only if you are sharing instances across threads or
> using pipelines and not closing them and returning the instance to the pool.
> can you share your code or part of it where you reproduce this?
>

yuanjun Li

unread,
Aug 28, 2013, 11:22:24 AM8/28/13
to jedis...@googlegroups.com
I got this problem too, but in my code, I didn't use pipeline, so what's the problem?

在 2011年7月27日星期三UTC+8下午11时28分40秒,clara写道:
Reply all
Reply to author
Forward
0 new messages