我在 PC1 上启动了 Redis 集群,然后在 PC2 上连接它。当需要重定向到另一个集群节点时,它显示Redirected to slot [7785] located at 127.0.0.1
,但应该显示Redirected to slot [7785] located at [IP of PC1, like 192.168.1.20]
,然后显示错误。怎么了?我能做什么?
输出:
[admin@localhost ~]$ redis-cli -c -h 192.168.1.20 -p 30001
192.168.1.20:30001> get foo
-> Redirected to slot [12182] located at 127.0.0.1:30003
Could not connect to Redis at 127.0.0.1:30003: Connection refused
Could not connect to Redis at 127.0.0.1:30003: Connection refused
not connected>
Run Code Online (Sandbox Code Playgroud)
的输出redis-cli -h 192.168.1.20 -p 30001 cluster nodes
:
5f6d6f1319318233917aba92b6ab0e244b3260d7 127.0.0.1:30004 slave 4c7b046ecaeb2dc689cbad21ee3466fb43b48fb9 …
Run Code Online (Sandbox Code Playgroud)