Redis Master is configured with a password for master-slave synchronization

Source: Internet
Author: User

1. If Master does not set the password, configure slaveof directly on the slave server to configure the following

#slaveof IP Port slaveof   221.224.85.186 6379 

Configuration OK let's look at the Redis logs to see if the synchronization is successful.

5014: S -JanTen: -:53.667* Connecting to MASTER221.224.85.186:63795014: S -JanTen: -:53.667* MASTER <->SLAVE Sync started5014: S -JanTen: -:53.700* Non blocking Connect forSYNC fired theEvent.5014: S -JanTen: -:53.734* Master replied to PING, replication canContinue...5014: S -JanTen: -:53.832*Partial resynchronization not possible (no cached Master)5014: S -JanTen: -:53.867* Full Resync fromMASTER:4D6221E370675F397C396C9222B1B60BFCEA1EFB:15014: S -JanTen: -:53.985* MASTER <-> SLAVE sync:receiving844bytes fromMaster5014: S -JanTen: -:53.985* MASTER <->SLAVE sync:flushing old data5014: S -JanTen: -:53.985* MASTER <-> SLAVE sync:loading DBinchMemory5014: S -JanTen: -:53.985* MASTER <-> SLAVE sync:finished with success
5014:s Jan 10:53:53.667 * Connecting to MASTER 221.224.85.186:6379
This is obtained from the above slave server log and we can see that the IP of the server connected to the master is 221.224.85.186

MASTER <-> SLAVE sync:finished with success
Seeing the output statement is success indicates that the synchronization was successful.

2.master set password in the case of synchronizing data, in fact, it is very simple, we just let slave can connect to master on it, we in the slave configuration file add a sentence can be.
123456

Ok.

Otherwise there might be a mistake.

4939: S -Jan the: -:20.450# MASTER aborted replication with an Error:noauth authentication required.4939: S -Jan the: -:21.291* Connecting to MASTER120.27.137.142:63794939: S -Jan the: -:21.292* MASTER <->SLAVE Sync started4939: S -Jan the: -:21.317* Non blocking Connect forSYNC fired theEvent.4939: S -Jan the: -:21.342* Master replied to PING, replication canContinue...4939: S -Jan the: -:21.368* (Non critical) Master does not understand replconf Listening-port:-Noauth authentication required.4939: S -Jan the: -:21.393* (Non critical) Master does not understand replconf CAPA:-Noauth authentication required.4939: S -Jan the: -:21.393*Partial resynchronization not possible (no cached Master)4939: S -Jan the: -:21.419# unexpected reply to PSYNC fromMaster:-Noauth authentication required.4939: S -Jan the: -:21.419*retrying with SYNC ...4939: S -Jan the: -:21.444# MASTER aborted replication with an Error:noauth authentication required.

Redis Master is configured with a password for master-slave synchronization

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.