redis.clients.jedis.exceptions.JedisDataException: ERR Protocol error: expected '$', got '
at redis.clients.jedis.Protocol.processError(Protocol.java:59)
at redis.clients.jedis.Protocol.process(Protocol.java:66)
at redis.clients.jedis.Protocol.read(Protocol.java:131)
at redis.clients.jedis.Connection.getObjectMultiBulkReply(Connection.java:206)
at redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:88)
at redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:83)
at redis.clients.jedis.Jedis.subscribe(Jedis.java:1971)
(followed by)
redis.clients.jedis.exceptions.JedisConnectionException: It seems like server has closed the connection
at redis.clients.util.RedisInputStream.readLine(RedisInputStream.java:90)
at redis.clients.jedis.Protocol.processError(Protocol.java:58)
at redis.clients.jedis.Protocol.process(Protocol.java:66)
at redis.clients.jedis.Protocol.read(Protocol.java:131)
at redis.clients.jedis.Connection.getObjectMultiBulkReply(Connection.java:206)
at redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:88)
at redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:83)
at redis.clients.jedis.Jedis.subscribe(Jedis.java:1971)
I'm simply calling the subscribe function on a directly created Jedis instance. This only happens sporadically, though, and appears to have no correlation to anything I've done in code.
Things of note: I'm creating a Jedis object directly - not using the connection pool - because I know of no good way to subscribe to a channel through a JedisPool (and when attempted, I couldn't even get the JedisPool to connect to the instance itself).
Redis version: 2.4.15, though I've tried it on 2.2.15 and I can reproduce the same issue after literally terminating and starting the class again in the same sporadic fashion.
Jedis version: 2.1.0