2017-12-12 6 views
0

redisクラスタを再構築すると問題が発生します。
Redisのクラスタ情報と以下のように問題の詳細を表示:redis cluster reshard [ERR]呼び出しMIGRATE:ERR構文エラー

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:[email protected] (a219daf5...) -> 7 keys | 5462 slots | 1 slaves. 
10.239.65.82:[email protected] (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:[email protected] 
    slots:5461-10922 (5462 slots) master 
    1 additional replica(s) 
S: f60d0c4059aae4d46882952b701ed2ab3161bbd5 10.239.65.82:[email protected] 
    slots: (0 slots) slave 
    replicates a219daf5ebf86f2bb4cd7e4dab9926b9570d0654 
M: 951e46545733d2ab4159b95f9d69ad1bdf85f0b3 10.239.65.82:[email protected] 
    slots:12436-16383 (3948 slots) master 
    1 additional replica(s) 
S: bb2221fd2599f541a51cddbd41a27954d842c1a3 10.239.65.82:[email protected] 
    slots: (0 slots) slave 
    replicates 951e46545733d2ab4159b95f9d69ad1bdf85f0b3 
S: d7c53081deb5e61d180124db1f9541a373c6d32a 10.239.65.82:[email protected] 
    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:[email protected] 
    slots:5461-10922 (5462 slots) master 
    1 additional replica(s) 
    M: 951e46545733d2ab4159b95f9d69ad1bdf85f0b3 10.239.65.82:[email protected] 
    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:[email protected] to 10.239.65.82:10000: 
Moving slot 5462 from 10.239.65.82:[email protected] to 10.239.65.82:10000: 
Moving slot 5463 from 10.239.65.82:[email protected] to 10.239.65.82:10000: 
Moving slot 5464 from 10.239.65.82:[email protected] to 10.239.65.82:10000: 
Moving slot 5465 from 10.239.65.82:[email protected] to 10.239.65.82:10000: 
Moving slot 5466 from 10.239.65.82:[email protected] to 10.239.65.82:10000: 
Moving slot 12436 from 10.239.65.82:[email protected] 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:[email protected]~10.239.65.82:10000。しかし、空ではないスロット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:[email protected] 
    slots:5467-10922 (5456 slots) master 
    1 additional replica(s) 
S: f60d0c4059aae4d46882952b701ed2ab3161bbd5 10.239.65.82:[email protected] 
    slots: (0 slots) slave 
    replicates a219daf5ebf86f2bb4cd7e4dab9926b9570d0654 
M: 951e46545733d2ab4159b95f9d69ad1bdf85f0b3 10.239.65.82:[email protected] 
    slots:12436-16383 (3948 slots) master 
    1 additional replica(s) 
S: bb2221fd2599f541a51cddbd41a27954d842c1a3 10.239.65.82:[email protected] 
    slots: (0 slots) slave 
    replicates 951e46545733d2ab4159b95f9d69ad1bdf85f0b3 
S: d7c53081deb5e61d180124db1f9541a373c6d32a 10.239.65.82:[email protected] 
    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:[email protected] 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
ありがとうございます!

答えて

0

試してみてください。

redis.rb v4.0.1 downgrade to v3.3.3 

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

+0

私はV3.2.0にRedisのとredis.rbの両方をダウングレードしようとすると、それは完璧に動作します!どうもありがとうございます! – SaberSword

関連する問題