java.lang.NullPointerException: Cannot read the array length because "arg" is null at redis.clients.jedis.Protocol.sendCommand(Protocol.java:99) at redis.clients.jedis.Protocol.sendCommand(Protocol.java:84) at redis.clients.jedis.Connection.sendCommand(Connection.java:127) at redis.clients.jedis.BinaryClient.set(BinaryClient.java:110) at queue.RedisErrorTest.main(RedisErrorTest.java:17)
redis.clients.jedis.exceptions.JedisDataException: ERR Protocol error: invalid bulk length at redis.clients.jedis.Protocol.processError(Protocol.java:127) at redis.clients.jedis.Protocol.process(Protocol.java:161) at redis.clients.jedis.Protocol.read(Protocol.java:215) at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340) at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:239) at redis.clients.jedis.Jedis.set(Jedis.java:121) at queue.RedisErrorTest.main(RedisErrorTest.java:22)
此时当前连接已经不能正常响应了,后续再 jedis.get("hello") 就会报错:
1 2 3 4 5 6 7 8 9 10
redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream. at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:199) at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40) at redis.clients.jedis.Protocol.process(Protocol.java:151) at redis.clients.jedis.Protocol.read(Protocol.java:215) at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340) at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:259) at redis.clients.jedis.Connection.getBulkReply(Connection.java:248) at redis.clients.jedis.Jedis.get(Jedis.java:153) at queue.RedisErrorTest.main(RedisErrorTest.java:27)