iredis
iredis copied to clipboard
how to connect to the redis cluster?
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!!!
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>
.
I try provide password,but it still ERROR
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.