锐单电子商城 , 一站式电子元器件采购平台!
  • 电话:400-990-0325

配置redis集群报错Failed to send CLUSTER MEET command.

时间:2023-05-18 00:07:00 dd70f120三社二极管模块

配置redis集群报错Failed to send CLUSTER MEET command.

报错:

[root@redisserver src]# redis-cli --cluster create --cluster-replicas 1 192.168.10.200:6379 192.168.10.200:6380 192.168.10.200:6381 192.168.10.200:6388 192.168.10.200:6390 192.168.10.200:6391 >>> Performing hash slots allocation on 6 nodes... Master[0] -> Slots 0 - 5460 Master[1] -> Slots 5461 - 10922 Master[2] -> Slots 10923 - 16383 Adding replica 192.168.10.200:6390 to 192.168.10.200:6379 Adding replica 192.168.10.200:6391 to 192.168.10.200:6380 Adding replica 192.168.10.200:6388 to 192.168.10.200:6381 >>> Trying to optimize slaves allocation for anti-affinity [WARNING] Some slaves are in the same host as their master M: ee97088f94d62db0836daeb39ce23a84b201db21 192.168.10.200:6379    slots:[0-5460] (5461 slots) master M: 6c45f75e2a3b57223f0e74670d0c3356cacb4789 192.168.10.200:6380    slots:[5461-10922] (5462 slots) master M: 139fb7acbbb1900414e5d48d6b55a575af420353 192.168.10.200:6381    slots:[10923-16383] (5461 slots) master S: 927d09a3c3fd9aa0f9ff111bc6915bf36c7e86cc 192.168.10.200:6388    replicates ee97088f94d62db0836daeb39ce23a84b201db21 S: d16f120a2fd44435b09c4e696d6bf16c90b4a854 192.168.10.200:6390    replicates 6c45f75e2a3b57223f0e74670d0c3356cacb4789 S: 8459a006b1035bb2f62fed66a86bf9596d4ee6a4 192.168.10.200:6391    replicates 139fb7acbbb1900414e5d48d6b55a575af420353 Can I set the above configuration? (type 'yes' to accept): yes >>> Nodes configuration updated >>> Assign a different config epoch to each node >>> Sending CLUSTER MEET messages to join the cluster Failed to send CLUSTER MEET command.  

原因:

哨兵模式sentinel操作行了。。。

[root@redisserver src]# ps -ef | grep redis
root      19510   2530  0 5月08 pts/1   00:00:00 vi /etc/redis.conf
root      74542      1  0 5月12 ?       00:04:43 redis-sentinel *:26379 [sentinel]
root      85052      1  0 15:35 ?        00:00:04 redis-server *:6379 [cluster]
root      85058      1  0 15:35 ?        00:00:04 redis-server *:6380 [cluster]
root      85064      1  0 15:35 ?        00:00:04 redis-server *:6381 [cluster]
root      85070      1  0 15:35 ?        00:00:03 redis-server *:6388 [cluster]
root      85076      1  0 15:35 ?        00:00:03 redis-server *:6390 [cluster]
root      85082      1  0 15:35 ?        00:00:03 redis-server *:6391 [cluster]
root      85256   2530  0 15:52 pts/1    00:00:00 grep --color=auto redis

结果:

[root@redisserver src]# kill -9 74542
[root@redisserver src]# ps -ef | grep redis
root      19510   2530  0 5月08 pts/1   00:00:00 vi /etc/redis.conf
root      85052      1  0 15:35 ?        00:00:04 redis-server *:6379 [cluster]
root      85058      1  0 15:35 ?        00:00:04 redis-server *:6380 [cluster]
root      85064      1  0 15:35 ?        00:00:04 redis-server *:6381 [cluster]
root      85070      1  0 15:35 ?        00:00:03 redis-server *:6388 [cluster]
root      85076      1  0 15:35 ?        00:00:03 redis-server *:6390 [cluster]
root      85082      1  0 15:35 ?        00:00:03 redis-server *:6391 [cluster]
root      85275   2530  0 15:54 pts/1    00:00:00 grep --color=auto redis

[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
锐单商城拥有海量元器件数据手册IC替代型号,打造电子元器件IC百科大全!

相关文章