开启reids集群失败

开启reids集群失败

[ERR] Node 192.168.242.128:6379 NOAUTH Authentication required.

原因分析:

1.修改配置文件的时候已经打开了redis,得重新启动redis才能成功
2.redis有密码的话,需要加密码


在这里插入图片描述

解决方案:

1.重新启动所有redis
2.redis-cli --cluster create --cluster-replicas 1 -a (密码) 192.168.242.128:6379 192.168.242.128:6380 192.168.242.128:6381 192.168.242.128:6389 192.168.242.128:6390 192.168.242.128:6391
在这里插入图片描述

[root@linux1 myredis]# cd /opt
[root@linux1 opt]# ls
redis-6.2.1  redis-6.2.1.tar.gz  rh  VMwareTools-10.0.5-3228253.tar.gz  vmware-tools-distrib
[root@linux1 opt]# cd redis-6.2.1
[root@linux1 redis-6.2.1]# ls
00-RELEASENOTES  CONTRIBUTING  INSTALL    README.md   runtest-cluster    sentinel.conf  TLS.md
BUGS             COPYING       Makefile   redis.conf  runtest-moduleapi  src            utils
CONDUCT          deps          MANIFESTO  runtest     runtest-sentinel   tests
[root@linux1 redis-6.2.1]# cd src

[root@linux1 src]# redis-cli --cluster create --cluster-replicas 1 -a (密码) 192.168.242.128:6379 192.168.242.128:6380 192.168.242.128:6381 192.168.242.128:6389 192.168.242.128:6390 192.168.242.128:6391

Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
>>> Performing hash slots allocation on 6 nodes...
Master[0] -> Slots 0 - 5460
Master[1] -> Slots 5461 - 10922
Master[2] -> Slots 10923 - 16383
Adding replica 192.168.242.128:6390 to 192.168.242.128:6379
Adding replica 192.168.242.128:6391 to 192.168.242.128:6380
Adding replica 192.168.242.128:6389 to 192.168.242.128:6381
>>> Trying to optimize slaves allocation for anti-affinity
[WARNING] Some slaves are in the same host as their master
M: 603bd5317cb2313c0153b07b2835fe7e5bbbf0ab 192.168.242.128:6379
   slots:[0-5460] (5461 slots) master
M: 2481b76adef8edb26d294a1924625046d88b3e6e 192.168.242.128:6380
   slots:[5461-10922] (5462 slots) master
M: cc0e16671c325a77d006b27e86d9ac4afb9e6cef 192.168.242.128:6381
   slots:[10923-16383] (5461 slots) master
S: 09f45b3748f0cf672842858c294d7fe13837b912 192.168.242.128:6389
   replicates 603bd5317cb2313c0153b07b2835fe7e5bbbf0ab
S: ee9f25571bc56cdb37aa5d6df6fba4d1abd54f10 192.168.242.128:6390
   replicates 2481b76adef8edb26d294a1924625046d88b3e6e
S: b1e2da9b6045b166d84149fba0247725a488772f 192.168.242.128:6391
   replicates cc0e16671c325a77d006b27e86d9ac4afb9e6cef
Can I set the above configuration? (type 'yes' to accept): ^C


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值