在上一篇Redis高级篇-8 Redis哨兵通知Java代码客户端我们学习Redis分片集群搭建的时候,set a 1,redis-cli 没有使用-c命令的时候,异常了。提示MOVED 15495 在7003上,当我们在连接命令中加入-c,然后再set a 1的时候,就成功了。提示Redirected to slot [15495] located at 7003.如下图:被重定向到了7003上...
-> Redirected to slot [8455] located at 192.168.88.52:6379 OK 192.168.88.52:6379> set teacher plj -> Redirected to slot [12541] located at 192.168.88.53:6379 OK 192.168.88.53:6379> set class NSD -> Redirected to slot [741] located at 192.168.88.51:6379 OK 192.168.88.51:6379> 1. 2. ...
-> Redirected to slot [4341] located at 192.168.155.117:6379 (integer) 1 192.168.155.117:6379> set a b -> Redirected to slot [15495] located at 192.168.155.112:6379 OK 192.168.155.112:6379> SADD set1 redis -> Redirected to slot [3037] located at 192.168.155.117:6379 (integer) 1 192.16...
10.1.1.13:8001> set hh1 hh1 -> Redirected to slot [5691] located at 10.1.1.13:8002 OK 10.1.1.13:8002> set hh2 hh2 OK 10.1.1.13:8002> set hh3 hh3 -> Redirected to slot [13945] located at 10.1.1.13:8003 OK 10.1.1.13:8003> set hh4 hh4 -> Redirected to slot [1694] located ...
从上面命令看到key为site算出的slot为9421,落在7200节点上,所以有Redirected to slot [9421] located at 127.0.0.1:7200,集群会自动进行跳转。因此客户端可以连接任何一个节点来进行数据的存取。 通过cluster nodes可查看集群的节点信息 127.0.0.1:7200> cluster nodes ...
[root@192 cluster]#redis-cli -a 111111 -p 6381 -c ###连接时添加-c优化路由Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.127.0.0.1:6381> set k1 v1#set成功-> Redirected to slot [12706] located at 192.168.1.13:6385OK ...
新建三个key,根据crc16算法分配到各个slot上 172.16.101.54:6379> set key1 value1 -> Redirected to slot [9189] located at 172.16.101.55:6379 OK 172.16.101.55:6379> set key2 value2 OK 172.16.101.54:6379> set key3 value3 OK 1. 2.
-> Redirected to slot [3037] located at 192.168.155.117:6379 (integer) 1 192.168.155.117:6379> [root@liabio ~]# [root@liabio ~]# redis-cli -a test123 --cluster check 192.168.155.117:6379 Warning: Using a password with '-a' or '-u' option on the command line interface may not be...
简介: Redis集群报错cluster_state:fail,如何解决并重新恢复集群(IP问题/ slot未完全分配问题) 报错127.0.0.1:6379> set name tom ---》测试在redis集群中存数据时报错 -> Redirected to slot [5798] located at 192.168.3.2:6379 (error) CLUSTERDOWN The cluster is down ...