redis创建集群报错can‘t connect to node 192.168.163.203
生活随笔
收集整理的這篇文章主要介紹了
redis创建集群报错can‘t connect to node 192.168.163.203
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
【README】
創建集群報錯 can't connect to node 192.168.163.203??
[root@centos201 ~]# /usr/local/redis-cluster/bin/redis-trib.rb create --replicas 0 192.168.163.201:6379 192.168.163.202:6379 192.168.163.203:6379 >>> Creating cluster Connecting to node 192.168.163.201:6379: OK Connecting to node 192.168.163.202:6379: OK Connecting to node 192.168.163.203:6379: [ERR] Sorry, can't connect to node 192.168.163.203:6379【1】解決方法
切換到 203機器,關閉其防火墻;
systemctl stop firewalld.service? ??
?
【2】再次創建redis集群
--replicas 參數為0 ,表示0個副本,即所有節點全部是 master?
[root@centos201 ~]# /usr/local/redis-cluster/bin/redis-trib.rb create --replicas 0 192.168.163.201:6379 192.168.163.202:6379 192.168.163.203:6379 >>> Creating cluster Connecting to node 192.168.163.201:6379: OK Connecting to node 192.168.163.202:6379: OK Connecting to node 192.168.163.203:6379: OK >>> Performing hash slots allocation on 3 nodes... Using 3 masters: 192.168.163.201:6379 192.168.163.202:6379 192.168.163.203:6379 M: 5571f088f9d8798dd0c2e973ced830c2cd8033a2 192.168.163.201:6379slots:0-5460 (5461 slots) master M: 99a3516a03612dba4b73c32e7e1e03ff1145a660 192.168.163.202:6379slots:5461-10922 (5462 slots) master M: 5c0ea563b464e58dd8dc9722cdfcb97a85c44714 192.168.163.203:6379slots:10923-16383 (5461 slots) master 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. >>> Performing Cluster Check (using node 192.168.163.201:6379) M: 5571f088f9d8798dd0c2e973ced830c2cd8033a2 192.168.163.201:6379slots:0-5460 (5461 slots) master M: 99a3516a03612dba4b73c32e7e1e03ff1145a660 192.168.163.202:6379slots:5461-10922 (5462 slots) master M: 5c0ea563b464e58dd8dc9722cdfcb97a85c44714 192.168.163.203:6379slots:10923-16383 (5461 slots) master [OK] All nodes agree about slots configuration. >>> Check for open slots... >>> Check slots coverage... [OK] All 16384 slots covered.bingo !?
創建redis集群成功 !?
?
?
總結
以上是生活随笔為你收集整理的redis创建集群报错can‘t connect to node 192.168.163.203的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 怎么提交网页(怎么提交网页文件)
- 下一篇: redis集群添加节点报错Either