版本
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
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.