Closed j0ni closed 8 years ago
So a little investigation reveals that the handle1
function on line 277 of message_queue.clj
is receiving an exception in place of poll-reply
. I added some debugging and tested it locally.
2014-Jun-03 22:23:48 +0000 oden DEBUG [taoensso.carmine.message-queue] - Got poll-reply clojure.lang.ExceptionInfo: ERR unknown command 'EVALSHA' {:prefix :err}
I'm guessing this version of redis (Version: 2:2.2.12-1build1 on ubuntu 12.04.4 in this case) doesn't support that command. I'll see if I can find a more up-to-date version.
Yeah, upgrading to redis 2.8.9 took care of this.
I guess this issue should now be re-titled "Redis error-handling broken in message queue" or something :)
Hi J,
Happy you got this sorted out. Thanks for the report (and sorry for the delay replying, have been travelling). Will take a look at improving the error message here, may need a couple weeks till I'm back from vacation.
Cheers! :-)
Just fixed on dev branch.
@ptaoussanis Hi! So, is exception described in the initial post the intended behavior of the queue worker when Redis returns error string as a result of the Lua script?
Right now poll-reply
here would be an ExceptionInfo
in case Redis returns error for the command, because wcar
doesn't throw errors when multiple commands are passed (related test, multiple command result parsing). For example, if Redis exhausts all allocated memory poll-reply
would be an ExceptionInfo
with following cause ERR Error running script (call to f_c09905edc7fdcc40f471cef5920114821719103b): -OOM command not allowed when used memory > 'maxmemory'.
, but handle1
would try to destructure it as vector leading to the initially described exception.
In any case, worker can't really work if memory is exhausted, but thrown exception could probably be a bit more helpful. Moreover, there're probably more cases when Redis returns error for the worker's Lua script, and showing actual Redis exception could really help in debugging the problem.
@gsnewmark Hi Ivan, thanks for the report. Will try take a look at this w/in the next week.
@gsnewmark Will be fixed with v2.13.0 - appreciate the detailed report, was helpful. Cheers :-)
@ptaoussanis great, thanks!
Hi
I'm perplexed by this and would appreciate your help deciphering the error below.
I've wrapped the handler setup and the handler function itself in try/catch code, like this:
but I only see the error above. This all works in my local dev environment - this is in an ubuntu 12.04.2 VM. Same JDK version (1.8) and the same uberjar. I've verified that I can connect using redis-cli to localhost without any credentials, on the default port.
Any ideas?