Skip to content
Menu
(◍ ´꒳` ◍)

  • Blog
  • Front Page
(◍ ´꒳` ◍)

Docker进阶:redis集群3主3从005实战哈希槽分布式

By erhu on 2023年9月23日2023年9月23日

(error) ERR unknown command redis-cli, with args beginning with: --cluster, check, 119.29.17.67:7001,
127.0.0.1:7001> exit
root@VM-0-16-centos:/data# redis-cli –cluster check 119.29.17.67:7001
119.29.17.67:7001 (e8b84390…) -> 0 keys | 5461 slots | 1 slaves.
182.61.40.160:7004 (b13f417e…) -> 0 keys | 5462 slots | 1 slaves.
119.29.17.67:7002 (f82fdcff…) -> 0 keys | 5461 slots | 1 slaves.
[OK] 0 keys in 3 masters.
0.00 keys per slot on average.

Performing Cluster Check (using node 119.29.17.67:7001)
M: e8b84390a14df617e7bf732f5ea13cdb621719a5 119.29.17.67:7001
slots:[0-5460] (5461 slots) master
1 additional replica(s)
S: d00826dab49649331fcec2aec471cc554b7baac8 182.61.40.160:7006
slots: (0 slots) slave
replicates e8b84390a14df617e7bf732f5ea13cdb621719a5
S: 25edd779e16f7d94e2fce77a1d6eb91347066902 119.29.17.67:7003
slots: (0 slots) slave
replicates b13f417e5c6785af87488d52c1fb742703960366
M: b13f417e5c6785af87488d52c1fb742703960366 182.61.40.160:7004
slots:[5461-10922] (5462 slots) master
1 additional replica(s)
S: a13ce20e71d8813c078cf7fe5a87d799e58d583e 182.61.40.160:7005
slots: (0 slots) slave
replicates f82fdcff3fe2ca9c47758ef8f4d322de5cf22656
M: f82fdcff3fe2ca9c47758ef8f4d322de5cf22656 119.29.17.67:7002
slots:[10923-16383] (5461 slots) master
1 additional replica(s)
[OK] All nodes agree about slots configuration.
Check for open slots…
Check slots coverage…
[OK] All 16384 slots covered.

root@VM-0-16-centos:/data# redis-cli –cluster add-node 182.61.40.160:7007 182.61.40.160:7008 119.29.17.67:7001
[ERR] Wrong number of arguments for specified –cluster sub command
root@VM-0-16-centos:/data# redis-cli –cluster add-node 182.61.40.160:7007 119.29.17.67:7001
Adding node 182.61.40.160:7007 to cluster 119.29.17.67:7001
Performing Cluster Check (using node 119.29.17.67:7001)
M: e8b84390a14df617e7bf732f5ea13cdb621719a5 119.29.17.67:7001
slots:[0-5460] (5461 slots) master
1 additional replica(s)
S: d00826dab49649331fcec2aec471cc554b7baac8 182.61.40.160:7006
slots: (0 slots) slave
replicates e8b84390a14df617e7bf732f5ea13cdb621719a5
S: 25edd779e16f7d94e2fce77a1d6eb91347066902 119.29.17.67:7003
slots: (0 slots) slave
replicates b13f417e5c6785af87488d52c1fb742703960366
M: b13f417e5c6785af87488d52c1fb742703960366 182.61.40.160:7004
slots:[5461-10922] (5462 slots) master
1 additional replica(s)
S: a13ce20e71d8813c078cf7fe5a87d799e58d583e 182.61.40.160:7005
slots: (0 slots) slave
replicates f82fdcff3fe2ca9c47758ef8f4d322de5cf22656
M: f82fdcff3fe2ca9c47758ef8f4d322de5cf22656 119.29.17.67:7002
slots:[10923-16383] (5461 slots) master
1 additional replica(s)
[OK] All nodes agree about slots configuration.
Check for open slots…
Check slots coverage…
[OK] All 16384 slots covered.
Send CLUSTER MEET to node 182.61.40.160:7007 to make it join the cluster.
[OK] New node added correctly.
root@VM-0-16-centos:/data# redis-cli –cluster add-node 182.61.40.160:7008 119.29.17.67:7001
Adding node 182.61.40.160:7008 to cluster 119.29.17.67:7001
Performing Cluster Check (using node 119.29.17.67:7001)
M: e8b84390a14df617e7bf732f5ea13cdb621719a5 119.29.17.67:7001
slots:[0-5460] (5461 slots) master
1 additional replica(s)
M: 975d27d7de10b67b41249b877b9a5fec6f18bf6a 182.61.40.160:7007
slots: (0 slots) master
S: d00826dab49649331fcec2aec471cc554b7baac8 182.61.40.160:7006
slots: (0 slots) slave
replicates e8b84390a14df617e7bf732f5ea13cdb621719a5
S: 25edd779e16f7d94e2fce77a1d6eb91347066902 119.29.17.67:7003
slots: (0 slots) slave
replicates b13f417e5c6785af87488d52c1fb742703960366
M: b13f417e5c6785af87488d52c1fb742703960366 182.61.40.160:7004
slots:[5461-10922] (5462 slots) master
1 additional replica(s)
S: a13ce20e71d8813c078cf7fe5a87d799e58d583e 182.61.40.160:7005
slots: (0 slots) slave
replicates f82fdcff3fe2ca9c47758ef8f4d322de5cf22656
M: f82fdcff3fe2ca9c47758ef8f4d322de5cf22656 119.29.17.67:7002
slots:[10923-16383] (5461 slots) master
1 additional replica(s)
[OK] All nodes agree about slots configuration.
Check for open slots…
Check slots coverage…
[OK] All 16384 slots covered.
Send CLUSTER MEET to node 182.61.40.160:7008 to make it join the cluster.
[OK] New node added correctly.

redis-cli –cluster reshard ip:7001

redis-cli –cluster check ip:7001

redis-cli –cluster del-node ip:7001 容器id

Category: 鸿蒙

文章导航

Docker进阶:redis集群3主3从003实战哈希槽分布式
补充–哈希槽分区

Related Posts

鸿蒙48URI 介绍

10月 8, 2021
Read More

鸿蒙43启动 Service Ability

10月 6, 2021
Read More

承认平庸-iptables规则部署-显示匹配-多端口匹配-09

3月 2, 2023
Read More

发表回复 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

近期文章

  • 实施002
  • 实施SQL001
  • 泛微oa001-字段
  • 硬件前端-海康威视摄像头
  • 使用Docker搭建Weblogic服务001

近期评论

    归档

    • 2023年10月
    • 2023年9月
    • 2023年8月
    • 2023年5月
    • 2023年4月
    • 2023年3月
    • 2021年11月
    • 2021年10月
    • 2021年9月
    • 2021年8月
    • 2021年5月

    分类

    • C
    • docker
    • iptable
    • ISIS
    • java
    • k8s
    • liunx
    • OpenCV py
    • ospf
    • solr
    • zabbix
    • 劳动法
    • 周杰伦
    • 格林法则
    • 等保
    • 鸿蒙

    其他操作

    • 登录
    • 条目feed
    • 评论feed
    • WordPress.org
    ©2025 (◍ ´꒳` ◍) | WordPress Theme by Superb WordPress Themes