2015-12-11 1 views
2

Je veux installer Redis cluster avec 6 nœuds (nœud1, nœud2, nœud3, nœud4, nœud5, nœud6), qui a 3 maîtres et 3 esclaves. Chaque nœud a ce fichier de configurationERR Slot xxx est déjà occupé (Redis :: CommandError)

de redis.conf

port 6379 
cluster-enabled yes 
cluster-config-file nodes.conf 
cluster-node-timeout 10000 
appendonly yes 

Je reçois erreur lors de la création du cluster. Créer commande:

redis-trib.rb create --replicas 1 node1:6379 node2:6379 node3:6379 node4:6379 node5:6379 node6:6379 

Erreur:

>>> Creating cluster 
Connecting to node node1:6379: OK 
Connecting to node node2:6379: OK 
Connecting to node node3:6379: OK 
Connecting to node node4:6379: OK 
Connecting to node node5:6379: OK 
Connecting to node node6:6379: OK 
>>> Performing hash slots allocation on 6 nodes... 
Using 3 masters: 
node6:6379 
node5:6379 
node4:6379 
Adding replica node3:6379 to node6:6379 
Adding replica node2:6379 to node5:6379 
Adding replica node1:6379 to node4:6379 
S: 1f13819038ba983bb8355f54cb8cec19d2b29e01 node1:6379 
    replicates 534745088c8b403b81d7e48a22d2e317fb420a38 
S: 711461862393664b46d73db6561631f40de29561 node2:6379 
    replicates f503fe6fd52c73e446267795111ae6ea95495829 
S: 204fa4e23b08e2c6ad80b0aca271fc380bc6885d node3:6379 
    replicates fe6a8e88afdb2796c09fcc873b37ba90c2ba6d79 
M: 534745088c8b403b81d7e48a22d2e317fb420a38 node4:6379 
    slots:10923-16383 (5461 slots) master 
M: f503fe6fd52c73e446267795111ae6ea95495829 node5:6379 
    slots:5461-10922 (5462 slots) master 
M: fe6a8e88afdb2796c09fcc873b37ba90c2ba6d79 node6:6379 
    slots:0-5460,6918 (5462 slots) master 
Can I set the above configuration? (type 'yes' to accept): yes 
/var/lib/gems/1.8/gems/redis-3.2.2/lib/redis/client.rb:114:in `call': ERR Slot 16011 is already busy (Redis::CommandError) 
    from /var/lib/gems/1.8/gems/redis-3.2.2/lib/redis.rb:2646:in `method_missing' 
    from /var/lib/gems/1.8/gems/redis-3.2.2/lib/redis.rb:57:in `synchronize' 
    from /usr/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize' 
    from /var/lib/gems/1.8/gems/redis-3.2.2/lib/redis.rb:57:in `synchronize' 
    from /var/lib/gems/1.8/gems/redis-3.2.2/lib/redis.rb:2645:in `method_missing' 
    from /home/hadoop/projects/ramin/redis-3.0.5/src/redis-trib.rb:205:in `flush_node_config' 
    from /home/hadoop/projects/ramin/redis-3.0.5/src/redis-trib.rb:667:in `flush_nodes_config' 
    from /home/hadoop/projects/ramin/redis-3.0.5/src/redis-trib.rb:666:in `each' 
    from /home/hadoop/projects/ramin/redis-3.0.5/src/redis-trib.rb:666:in `flush_nodes_config' 
    from /home/hadoop/projects/ramin/redis-3.0.5/src/redis-trib.rb:1007:in `create_cluster_cmd' 
    from /home/hadoop/projects/ramin/redis-3.0.5/src/redis-trib.rb:1388:in `send' 
    from /home/hadoop/projects/ramin/redis-3.0.5/src/redis-trib.rb:1388 

J'ai aussi fait ces derniers, mais aussi eu même message d'erreur

  1. adresse ip utiliser au lieu de nom d'hôte
  2. supprimer nodes.conf dans chaque noeud
+4

Avez-vous essayé d'émettre un [FLUSHALL] (http://redis.io/commands/flushall), puis [CLUSTER RESET SOFT] (http://redis.io/commands/cluster-reset)? – thepirat000

+1

@ thepirat000 merci, fonctionne correctement et j'ai également changé le nom d'hôte à l'adresse IP –

Répondre

7

Comment @ dit thepirat000 (dans tous les nœuds FLUSHALL puis CLUSTER RESET SOFT) j'ai également changé le nom d'hôte en adresse IP