iredis icon indicating copy to clipboard operation
iredis copied to clipboard

how to connect to the redis cluster?

Open endlessc opened this issue 3 years ago • 3 comments

how to connect to the redis cluster? I try to connect to the cluster, run the command ,the iredis prompt "(error) ERROR Authentication required." Thanks!!!

endlessc avatar Mar 26 '21 06:03 endlessc

Hi the way of connecting a cluster is the same as a singe redis node.

You see this message is because your cluster has password protection, you need AUTH command to provide password, or start iredis with iredis -a <your password>.

laixintao avatar Apr 01 '21 09:04 laixintao

image I try provide password,but it still ERROR

yuvenhol avatar Aug 05 '22 09:08 yuvenhol

hi @yuvenhol thanks, it should be a bug.

You already connected to redis-server, but it's in the cluster mode, and the key you hgetall is not in the node you connected but in another node, so redis-server returns a "MOVED" response.

iredis should follow the "MOVED" response to find the key in another node, however, there is a bug in code which didn't use password when reissue the command.

fixed in https://github.com/laixintao/iredis/pull/443 , can you try to install iredis from this branch see if it resolves your issue? thanks.

laixintao avatar Aug 05 '22 16:08 laixintao