-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.Exception: Protocol error: Got ($,[B@1669a570) as initial reply byte during hscan #229
Comments
We had this problem and solved it. What appears to be the issue is code like either of the following examples. val clientOutOfScope = redisPool.withClient { client =>
client
}
clientOutOfScope.get(...) redisPool.withClient { client =>
Future {
client.get(...)
}
} In both cases, the Solution: do not use async code within |
object RedisConnectionUtil extends RedisServiceProvider {
} I am using the redis client like this, still getting above error. Can you help me find out what is the issue? |
I don't see any problem with that code... Perhaps consider writing a minimal example with a test, and posting it to GitHub so it's reproducible. |
Yes, a minimal reproducible test case will help debug the problem. |
@Oduig Indeed .. a |
I just bumped into this issue because I was sending a list of items to redis in batches with |
@Oduig
use only withClient "inside".
Now my code doesn't cause protocol errors. |
@debasishg I've got a exception similar to the which is = "java.lang.Exception: Protocol error: Got ($,[B@1669a570) as initial reply byte". I am using Redis server v=4.0.9, clitent "net.debasishg" %% "redisclient" % "3.9".
Exception was raised from here !!!
val scanTri:Option[(Option[Int], Option[List[Option[String]]])] = try {
r.hscan(key, cursor, s"${text}*", 500)
}
catch {
case e:Exception => {
println("Cosyak = " + e)
None
}
}
How can I deal with this?
The text was updated successfully, but these errors were encountered: