REdis MASTER aborted replication NOAUTH Authentication required

對於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 <master-password>
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章