gpt4 book ai didi

redis 集群重新分片 [ERR] 调用 MIGRATE : ERR Syntax error

转载 作者:可可西里 更新时间:2023-11-01 11:12:55 28 4
gpt4 key购买 nike

当我重新分片redis集群时,我遇到了一个问题。
redis集群信息和问题详情如下:

obasa04:/usr/redis-4.0.2/src # redis-trib.rb info 10.239.65.82:10000 
10.239.65.82:10000 (90c088ff...) -> 4 keys | 6974 slots | 1 slaves.
10.239.65.82:10004@20004 (a219daf5...) -> 7 keys | 5462 slots | 1 slaves.
10.239.65.82:10002@20002 (951e4654...) -> 3 keys | 3948 slots | 1 slaves.
[OK] 14 keys in 3 masters.
0.00 keys per slot on average.
obasa04:/usr/redis-4.0.2/src # redis-trib.rb reshard 10.239.65.82:10000
>>> Performing Cluster Check (using node 10.239.65.82:10000)
M: 90c088ff8fca8e5cbf4e901bbff571b0427a306d 10.239.65.82:10000
slots:0-5460,10923-12435 (6974 slots) master
1 additional replica(s)
M: a219daf5ebf86f2bb4cd7e4dab9926b9570d0654 10.239.65.82:10004@20004
slots:5461-10922 (5462 slots) master
1 additional replica(s)
S: f60d0c4059aae4d46882952b701ed2ab3161bbd5 10.239.65.82:10001@20001
slots: (0 slots) slave
replicates a219daf5ebf86f2bb4cd7e4dab9926b9570d0654
M: 951e46545733d2ab4159b95f9d69ad1bdf85f0b3 10.239.65.82:10002@20002
slots:12436-16383 (3948 slots) master
1 additional replica(s)
S: bb2221fd2599f541a51cddbd41a27954d842c1a3 10.239.65.82:10005@20005
slots: (0 slots) slave
replicates 951e46545733d2ab4159b95f9d69ad1bdf85f0b3
S: d7c53081deb5e61d180124db1f9541a373c6d32a 10.239.65.82:10003@20003
slots: (0 slots) slave
replicates 90c088ff8fca8e5cbf4e901bbff571b0427a306d
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
How many slots do you want to move (from 1 to 16384)? 10
What is the receiving node ID? 90c088ff8fca8e5cbf4e901bbff571b0427a306d
Please enter all the source node IDs.
Type 'all' to use all the nodes as source nodes for the hash slots.
Type 'done' once you entered all the source nodes IDs.
Source node #1:all

Ready to move 10 slots.
Source nodes:
M: a219daf5ebf86f2bb4cd7e4dab9926b9570d0654 10.239.65.82:10004@20004
slots:5461-10922 (5462 slots) master
1 additional replica(s)
M: 951e46545733d2ab4159b95f9d69ad1bdf85f0b3 10.239.65.82:10002@20002
slots:12436-16383 (3948 slots) master
1 additional replica(s)
Destination node:
M: 90c088ff8fca8e5cbf4e901bbff571b0427a306d 10.239.65.82:10000
slots:0-5460,10923-12435 (6974 slots) master
1 additional replica(s)
Resharding plan:
Moving slot 5461 from a219daf5ebf86f2bb4cd7e4dab9926b9570d0654
Moving slot 5462 from a219daf5ebf86f2bb4cd7e4dab9926b9570d0654
Moving slot 5463 from a219daf5ebf86f2bb4cd7e4dab9926b9570d0654
Moving slot 5464 from a219daf5ebf86f2bb4cd7e4dab9926b9570d0654
Moving slot 5465 from a219daf5ebf86f2bb4cd7e4dab9926b9570d0654
Moving slot 5466 from a219daf5ebf86f2bb4cd7e4dab9926b9570d0654
Moving slot 12436 from 951e46545733d2ab4159b95f9d69ad1bdf85f0b3
Moving slot 12437 from 951e46545733d2ab4159b95f9d69ad1bdf85f0b3
Moving slot 12438 from 951e46545733d2ab4159b95f9d69ad1bdf85f0b3
Moving slot 12439 from 951e46545733d2ab4159b95f9d69ad1bdf85f0b3
Do you want to proceed with the proposed reshard plan (yes/no)? yes
Moving slot 5461 from 10.239.65.82:10004@20004 to 10.239.65.82:10000:
Moving slot 5462 from 10.239.65.82:10004@20004 to 10.239.65.82:10000:
Moving slot 5463 from 10.239.65.82:10004@20004 to 10.239.65.82:10000:
Moving slot 5464 from 10.239.65.82:10004@20004 to 10.239.65.82:10000:
Moving slot 5465 from 10.239.65.82:10004@20004 to 10.239.65.82:10000:
Moving slot 5466 from 10.239.65.82:10004@20004 to 10.239.65.82:10000:
Moving slot 12436 from 10.239.65.82:10002@20002 to 10.239.65.82:10000:
[ERR] Calling MIGRATE: ERR Syntax error, try CLIENT (LIST | KILL | GETNAME | SETNAME | PAUSE | REPLY)

这张图片可能很容易阅读
errorImg1 errorImg2

我想知道为什么其他空槽可以从 10.239.65.82:10004@20004 迁移到 10.239.65.82:10000。但是 slot 12439 不是空的迁移错误?

之后,我检查集群状态并显示:

obasa04:/usr/redis-4.0.2/src # redis-trib.rb check 10.239.65.82:10000 
>>> Performing Cluster Check (using node 10.239.65.82:10000)
M: 90c088ff8fca8e5cbf4e901bbff571b0427a306d 10.239.65.82:10000
slots:0-5466,10923-12435 (6980 slots) master
1 additional replica(s)
M: a219daf5ebf86f2bb4cd7e4dab9926b9570d0654 10.239.65.82:10004@20004
slots:5467-10922 (5456 slots) master
1 additional replica(s)
S: f60d0c4059aae4d46882952b701ed2ab3161bbd5 10.239.65.82:10001@20001
slots: (0 slots) slave
replicates a219daf5ebf86f2bb4cd7e4dab9926b9570d0654
M: 951e46545733d2ab4159b95f9d69ad1bdf85f0b3 10.239.65.82:10002@20002
slots:12436-16383 (3948 slots) master
1 additional replica(s)
S: bb2221fd2599f541a51cddbd41a27954d842c1a3 10.239.65.82:10005@20005
slots: (0 slots) slave
replicates 951e46545733d2ab4159b95f9d69ad1bdf85f0b3
S: d7c53081deb5e61d180124db1f9541a373c6d32a 10.239.65.82:10003@20003
slots: (0 slots) slave
replicates 90c088ff8fca8e5cbf4e901bbff571b0427a306d
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
[WARNING] Node 10.239.65.82:10000 has slots in importing state (12436).
[WARNING] Node 10.239.65.82:10002@20002 has slots in migrating state (12436).
[WARNING] The following slots are open: 12436
>>> Check slots coverage...
[OK] All 16384 slots covered.

有没有其他方法可以解决这个问题?
我的redis是4.0.2,ruby是2.4.2p198
非常感谢!!

最佳答案

尝试:

redis.rb v4.0.1 downgrade to v3.3.3

https://github.com/antirez/redis/issues/4272

关于redis 集群重新分片 [ERR] 调用 MIGRATE : ERR Syntax error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47774093/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com