redis 集群搭建求助 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
sparkssssssss
V2EX    Redis

redis 集群搭建求助

  •  
  •   sparkssssssss 2021-07-01 10:03:07 +08:00 1634 次点击
    这是一个创建于 1629 天前的主题,其中的信息可能已经有所发展或是发生改变。
    版本 Redis server v=4.0.14 sha=00000000:0 malloc=jemalloc-4.0.3 bits=64 build=25108fc8c0aa24db 用三台机器搭建一个测试 redis 集群 192.168.11.225 192.168.11.226 192.168.11.227 关闭了 selinux,关闭了 firewall,开放了+10000 的端口,现在就卡在了如下的地方, >>> Creating cluster >>> Performing hash slots allocation on 6 nodes... Using 3 masters: 192.168.11.225:6379 192.168.11.226:6379 192.168.11.227:6379 Adding replica 192.168.11.226:6380 to 192.168.11.225:6379 Adding replica 192.168.11.227:6380 to 192.168.11.226:6379 Adding replica 192.168.11.225:6380 to 192.168.11.227:6379 M: c695368eeb6ca56856eb40497888486edd1c011a 192.168.11.225:6379 slots:0-5460 (5461 slots) master M: 3105b30565cc2bcff62d8816f2439417d388249e 192.168.11.226:6379 slots:5461-10922 (5462 slots) master M: b7dadc6fae9b582e5180f659a6f29e662de21cc8 192.168.11.227:6379 slots:10923-16383 (5461 slots) master S: 0627db6989cdfe0f839e6a0ed4fb9edee8f85e92 192.168.11.225:6380 replicates b7dadc6fae9b582e5180f659a6f29e662de21cc8 S: 10d90234c741b4b60666501a4c64e72353cc2902 192.168.11.226:6380 replicates c695368eeb6ca56856eb40497888486edd1c011a S: 02cfac1a71c202ee0c0dabc3b7fd58076663074c 192.168.11.227:6380 replicates 3105b30565cc2bcff62d8816f2439417d388249e 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 Waiting for the cluster to join.............................................................................................^C./redis-trib.rb:653:in `sleep': Interrupt from ./redis-trib.rb:653:in `wait_cluster_join' from ./redis-trib.rb:1436:in `create_cluster_cmd' from ./redis-trib.rb:1830:in `<main>' 

    以下为配置文件样本,其他机器类似

    port 6379 daemonize yes protected-mode no bind 192.168.11.225 pidfile /var/run/redis_cm.pid logfile /usr/local/redis/log/redis_cm.log dir /usr/local/redis/data_m/ appendonly yes cluster-enabled yes cluster-node-timeout 15000 cluster-config-file /usr/local/redis/etc/nodes_6379.conf loglevel debug 
    第 1 条附言    2021-07-02 10:03:42 +08:00
    最终发现,某一台的版本不一致导致的,结案
    thet
        1
    thet  
       2021-07-01 10:26:58 +08:00
    cluster info 和 cluster nodes 看看集群状态,看起了 CLUSTER MEET 那一步就卡住了
    sparkssssssss
        2
    /div> sparkssssssss  
    OP
       2021-07-01 11:18:15 +08:00
    ```
    192.168.11.225:6379> CLUSTER nodes
    c695368eeb6ca56856eb40497888486edd1c011a 192.168.11.225:6379 myself,master - 0 0 1 connected 0-5460
    0627db6989cdfe0f839e6a0ed4fb9edee8f85e92 192.168.11.225:6380 master - 0 1625109373893 4 connected
    192.168.11.225:6379> CLUSTER info
    cluster_state:fail
    cluster_slots_assigned:5461
    cluster_slots_ok:5461
    cluster_slots_pfail:0
    cluster_slots_fail:0
    cluster_known_nodes:2
    cluster_size:1
    cluster_current_epoch:4
    cluster_my_epoch:1
    cluster_stats_messages_sent:9009
    cluster_stats_messages_received:9013

    192.168.11.226:6379> CLUSTER nodes
    3105b30565cc2bcff62d8816f2439417d388249e :6379@16379 myself,master - 0 0 2 connected 5461-10922
    192.168.11.226:6379> CLUSTER info
    cluster_state:fail
    cluster_slots_assigned:5462
    cluster_slots_ok:5462
    cluster_slots_pfail:0
    cluster_slots_fail:0
    cluster_known_nodes:1
    cluster_size:1
    cluster_current_epoch:2
    cluster_my_epoch:2
    cluster_stats_messages_meet_sent:1
    cluster_stats_messages_sent:1
    cluster_stats_messages_received:0


    11.225 6379 的日志如下
    199519:M 01 Jul 11:17:35.182 . --- Processing packet of type 1, 2208 bytes
    199519:M 01 Jul 11:17:35.182 . pong packet received: 0x7fd2be5a0c00
    199519:M 01 Jul 11:17:36.185 . Pinging node 0627db6989cdfe0f839e6a0ed4fb9edee8f85e92
    199519:M 01 Jul 11:17:36.185 . --- Processing packet of type 1, 2208 bytes
    199519:M 01 Jul 11:17:36.186 . pong packet received: 0x7fd2be5a0c00
    199519:M 01 Jul 11:17:36.981 . --- Processing packet of type 0, 2208 bytes
    199519:M 01 Jul 11:17:36.981 . Ping packet received: (nil)
    199519:M 01 Jul 11:17:36.981 . ping packet received: (nil)
    199519:M 01 Jul 11:17:37.191 . Pinging node 0627db6989cdfe0f839e6a0ed4fb9edee8f85e92
    199519:M 01 Jul 11:17:37.191 . --- Processing packet of type 1, 2208 bytes
    199519:M 01 Jul 11:17:37.191 . pong packet received: 0x7fd2be5a0c00
    199519:M 01 Jul 11:17:37.985 . --- Processing packet of type 0, 2208 bytes
    199519:M 01 Jul 11:17:37.985 . Ping packet received: (nil)
    199519:M 01 Jul 11:17:37.986 . ping packet received: (nil)
    199519:M 01 Jul 11:17:38.194 . Pinging node 0627db6989cdfe0f839e6a0ed4fb9edee8f85e92
    199519:M 01 Jul 11:17:38.194 . --- Processing packet of type 1, 2208 bytes
    199519:M 01 Jul 11:17:38.194 . pong packet received: 0x7fd2be5a0c00
    199519:M 01 Jul 11:17:38.986 . --- Processing packet of type 0, 2208 bytes
    199519:M 01 Jul 11:17:38.986 . Ping packet received: (nil)
    199519:M 01 Jul 11:17:38.987 . ping packet received: (nil)
    199519:M 01 Jul 11:17:39.195 . Pinging node 0627db6989cdfe0f839e6a0ed4fb9edee8f85e92
    199519:M 01 Jul 11:17:39.196 . --- Processing packet of type 1, 2208 bytes
    199519:M 01 Jul 11:17:39.196 . pong packet received: 0x7fd2be5a0c00
    199519:M 01 Jul 11:17:39.297 - 0 clients connected (0 slaves), 1173864 bytes in use

    ```
    sparkssssssss
        3
    sparkssssssss  
    OP
       2021-07-02 10:03:52 +08:00
    最终发现,某一台的版本不一致导致的,结案
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     4342 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 33ms UTC 10:06 PVG 18:06 LAX 02:06 JFK 05:06
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86