[huangkejie@dubbo-provider-02 bin]$ ./redis-cli -p 7113 127.0.0.1:7113> get huangkejie (error) MOVED 68 192.168.186.129:7111 127.0.0.1:7113> get "huangkejie" (error) MOVED 68 192.168.186.129:7111 127.0.0.1:7113> set "huangkejie"
以上命令查找節點1的KEY,會拋(error) MOVED 68 192.168.186.129:7111,發現我用的命令缺乏了集羣的命令-c,既./redis-cli -c -p 7113。這樣就能解決節點2重定向到節點1中。redis
[huangkejie@dubbo-provider-02 bin]$ ./redis-cli -c -p 7113 127.0.0.1:7113> get huangkejie -> Redirected to slot [68] located at 192.168.186.129:7111 "huangkejie" 192.168.186.129:7111>