赞
踩
今天想学习下redis的hash类型的命令,突然发现报错了,新增不了key,查看cluster node状态都是connected,瞬间崩溃!!!各种查看案例!!!!!终于解决了!!!!!
处理过程如下:
1. 登录redis集群,新增key报错如下(error) CLUSTERDOWN The cluster is down
[root@beef01 beef]# redis-cli -c -p 7002
127.0.0.1:7002> auth your_passwd
OK
127.0.0.1:7002> HSET myhash field1 "Hello"
(error) CLUSTERDOWN The cluster is down
2. 查看集群状态
127.0.0.1:7002> cluster nodes
27f7d0fe32caaf27b46049ad31adcc6d334468a6 192.168.184.128:7002@17002 myself,master - 0 1629443971000 2 connected 10923-16383 [8312-<-c25e8a64f9d144577e6767794f06d93556f6964f]
c25e8a64f9d144577e6767794f06d93556f6964f 192.168.184.129:7001@17001 slave 017d1891462abe9bcbab78756159a5f88d91e6c3 0 1629443970436 7 connected
017d1891462abe9bcbab78756159a5f88d91e6c3 192.168.184.128:7003@17003 master - 0 1629443971462 7 connected 5461-8311 8313-10922
82b9681b032f4d02f519824e88d2094ea288547d 192.168.184.128:7001@17001 master - 0 1629443970000 1 connected 0-5460
246ffb2fc8da91c539e2f8dfa332024edc04a508 192.168.184.129:7002@17002 slave 27f7d0fe32caaf27b46049ad31adcc6d334468a6 0 1629443972487 5 connected
b7d264ae3fffd3a9936990fdc914995138a4d385 192.168.184.129:7003@17003 slave 82b9681b032f4d02f519824e88d2094ea288547d 0 1629443973512 6 connected
127.0.0.1:7002> CLUSTER INFO
cluster_state:fail
cluster_slots_assigned:16383
cluster_slots_ok:16383
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:7
cluster_my_epoch:2
cluster_stats_messages_ping_sent:14132
cluster_stats_messages_pong_sent:14819
cluster_stats_messages_sent:28951
cluster_stats_messages_ping_received:14819
cluster_stats_messages_pong_received:13727
cluster_stats_messages_received:28546
127.0.0.1:7002>
3. 查看slot发现,怎么丢失了一个8312?为什么丢失还需要确认原因!!!
新增slots 8312后,集群状态正常
127.0.0.1:7002> cluster addslots 8312
OK
127.0.0.1:7002> CLUSTER INFO
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:16384
cluster_slots_pfail:0
cluster_slots_fail:0
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:7
cluster_my_epoch:2
cluster_stats_messages_ping_sent:14230
cluster_stats_messages_pong_sent:14925
cluster_stats_messages_sent:29155
cluster_stats_messages_ping_received:14925
cluster_stats_messages_pong_received:13825
cluster_stats_messages_update_received:5
cluster_stats_messages_received:28755
127.0.0.1:7002>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。