【Redis主从复制】从节点服务端启动提示:MASTER aborted replication with an error: NOAUTH Authentication required

从节点服务端启动提示:
9100:S 13 May 2020 18:10:46.302 * Connecting to MASTER 127.0.0.1:6379
9100:S 13 May 2020 18:10:46.302 * MASTER <-> REPLICA sync started
9100:S 13 May 2020 18:10:46.302 * Non blocking connect for SYNC fired the event.
9100:S 13 May 2020 18:10:46.302 * Master replied to PING, replication can continue…
9100:S 13 May 2020 18:10:46.302 * (Non critical) Master does not understand REPLCONF listening-port: -NOAUTH Authentication required.
9100:S 13 May 2020 18:10:46.302 * (Non critical) Master does not understand REPLCONF capa: -NOAUTH Authentication required.
9100:S 13 May 2020 18:10:46.302 * Partial resynchronization not possible (no cached master)
9100:S 13 May 2020 18:10:46.302 # Unexpected reply to PSYNC from master: -NOAUTH Authentication required.
9100:S 13 May 2020 18:10:46.302 * Retrying with SYNC…
9100:S 13 May 2020 18:10:46.302 # MASTER aborted replication with an error: NOAUTH Authentication required.

对于Rdis集群,如果设置了requirepass密码,则一定要设置masterauth密码,否则从节点无法正常工作。实际上“/ect/redis/redis.conf”配置文件里有说明:
replicaof
287
288 # If the master is password protected (using the “requirepass” configuration
289 # directive below) it is possible to tell the replica to authenticate before
290 # starting the replication synchronization process, otherwise the master will
291 # refuse the replica request.
292 #
293 # masterauth

在此给 masterauth 123456 添加密码就OK了!

然后,用设置好的密码方式启动从节点服务:redis-server --port 6300 --slaveof 127.0.0.1 6379 –masterauth 123456

启动成功!!!

从客户端连接服务端,查看是否同步数据成功!

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值