Open tarikogut opened 6 years ago
Unfortunately, txredisapi doesn't work well with Redis Cluster yet. Pull Requests are welcomed :)
MOVED mean redirect to ip port then repeat command how to do it ?
I'm personally have no experience with Redis Cluster yet (i'm only using Sentinel for failover for now). So I don't have the full picture of how Redis Cluster actually works.
You may try to implement something like we did in TxMongo:
https://github.com/twisted/txmongo/blob/master/txmongo/connection.py#L174
See retryNextHost
. It replaces host
and port
attributes of self.connector
to make it reconnect to different address.
Unfortunately, I have no time right now to dive into Redis Cluster and investigate it myself :(
can i fix ???
Sure, that would be great. You can clone this repository and try to fix it yourself.
Feb 07 14:00:21 DEVSRV-JASMIN02 jasmind[7291]: File "/usr/lib/python2.7/site-packages/jasmin/vendor/txredisapi.py", line 400, in handle_reply Feb 07 14:00:21 DEVSRV-JASMIN02 jasmind[7291]: raise r Feb 07 14:00:21 DEVSRV-JASMIN02 jasmind[7291]: jasmin.vendor.txredisapi.ResponseError: MOVED 9203 10.12.5.66:6379 Feb 07 14:00:21 DEVSRV-JASMIN02 jasmind[7291]: Unhandled error in Deferred: Feb 07 14:00:21 DEVSRV-JASMIN02 jasmind[7291]: Traceback (most recent call last): Feb 07 14:00:21 DEVSRV-JASMIN02 jasmind[7291]: File "/usr/lib/python2.7/site-packages/jasmin/vendor/txredisapi.py", line 395, in replyReceived Feb 07 14:00:21 DEVSRV-JASMIN02 jasmind[7291]: self.replyQueue.put(reply) Feb 07 14:00:21 DEVSRV-JASMIN02 jasmind[7291]: File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 1515, in put Feb 07 14:00:21 DEVSRV-JASMIN02 jasmind[7291]: self.waiting.pop(0).callback(obj) Feb 07 14:00:21 DEVSRV-JASMIN02 jasmind[7291]: File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 393, in callback