REdis MASTER aborted replication NOAUTH Authentication required

栏目: 数据库 · 发布时间: 6年前

对于 REdis 集群,如果设置了requirepass,

则一定要设置masterauth,否则从节点无法正常工作,查看从节点日志可以看到哪下内容:

19213:S 22 Apr 2019 10:52:17.389 * Connecting to MASTER 1.6.18.16:2181

19213:S 22 Apr 2019 10:52:17.389 * MASTER<-> REPLICA sync started

19213:S 22 Apr 2019 10:52:17.389 * Non blocking connect for SYNC fired the event.

19213:S 22 Apr 2019 10:52:17.390 * Master replied to PING, replication can continue...

19213:S 22 Apr 2019 10:52:17.390 * (Non critical) Master does not understand REPLCONF listening-port: -NOAUTH Authentication required.

19213:S 22 Apr 2019 10:52:17.390 * (Non critical) Master does not understand REPLCONF capa: -NOAUTH Authentication required.

19213:S 22 Apr 2019 10:52:17.390 * Partial resynchronization not possible (no cached master)

19213:S 22 Apr 2019 10:52:17.390 # Unexpected reply to PSYNC from master: -NOAUTH Authentication required.

19213:S 22 Apr 2019 10:52:17.390 * Retrying with SYNC...

19213:S 22 Apr 2019 10:52:17.390 # MASTER aborted replication with an error: NOAUTH Authentication required.

正常时的日志如下:

37706:S 22 Apr 2019 10:59:13.125 * Connecting to MASTER 1.6.18.16:2181

37706:S 22 Apr 2019 10:59:13.125 * MASTER<-> REPLICA sync started

37706:S 22 Apr 2019 10:59:13.125 * Non blocking connect for SYNC fired the event.

37706:S 22 Apr 2019 10:59:13.125 * Master replied to PING, replication can continue...

37706:S 22 Apr 2019 10:59:13.125 * Trying a partial resynchronization (request d2aeb271d9f4974e71487e5dac86e6e8c70c025e:1).

37706:S 22 Apr 2019 10:59:13.126 * Full resync from master: 884f5964d7eff95277ecb6d594ff4dd78b7eb900:0

37706:S 22 Apr 2019 10:59:13.126 * Discarding previously cached master state.

37706:S 22 Apr 2019 10:59:13.165 * MASTER<-> REPLICA sync: receiving 175 bytes from master

37706:S 22 Apr 2019 10:59:13.165 * MASTER<-> REPLICA sync: Flushing old data

37706:S 22 Apr 2019 10:59:13.165 * MASTER<-> REPLICA sync: Loading DB in memory

37706:S 22 Apr 2019 10:59:13.165 * MASTER<-> REPLICA sync: Finished with success

37706:S 22 Apr 2019 10:59:13.165 * Background append only file rewriting started by pid 37729

实际上redis.conf有明确说明:

# If the master is password protected (using the "requirepass" configuration

# directive below) it is possible to tell the replica to authenticate before

# starting the replication synchronization process, otherwise the master will

# refuse the replica request.

#

# masterauth


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

引爆社群

引爆社群

唐兴通 / 机械工业出版社华章科技 / 2015-3 / 49

科技延伸媒介,移动互联网技术催生了微信等各种新的媒体;媒介更新人文,新媒介让互联网重回社群时代;人文重塑商业规则,社群时代的商业模式与法则究竟是怎样的?我们应该如何去适应和应对?本书提出的“新4C法则”为此给出了解决方案。关于如何运用这个法则,本书给出了详尽的阐述。但是,要利用好这个法则,需要我们对它有深入的理解。 场景(Context):移动互联网时代场景为王,所有基于移动互联网的产品和服......一起来看看 《引爆社群》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具