rredis icon indicating copy to clipboard operation
rredis copied to clipboard

"Error in readBin(con, raw(), 1000000L) : negative length vectors are not allowed" issued incorrectly

Open telenskyt opened this issue 10 years ago • 1 comments

I got this response from redisKeys

$ redisKeys("*") Error in readBin(con, raw(), 1000000L) : negative length vectors are not allowed

According to https://github.com/bwlewis/doRedis/issues/4, this error message should be issued when exceeding the data size limit. But this is definitely not the case of redisKeys. There was probably some error around the connection, because after I connected again, I got the correct response with no error:

$ redisConnect('myserver') $ redisKeys("*") [1] "jobs:1.alive.1" "x" "jobs:counter" "jobs:1.start.3" "jobs:1.alive.3" [6] "jobs" "jobs:1" "jobs:1.start.1" "jobs:workers" "jobs:1.env"

So there should probably be a different error message issued in this case.

telenskyt avatar Sep 21 '14 10:09 telenskyt

Yes, this error message appears in situation when there is a problem with server connection. I tried to stop the server and then call redisConnect, and I got the same response:

redisConnect(host = "my_server")
# Error:  Error in readBin(con, raw(), 1000000L): negative length vectors are not allowed

So probably something like "Error connecting the server 'my_server'" should be reported instead of this unreadable and confusing error message.

telenskyt avatar Sep 25 '14 14:09 telenskyt