Writing to Master:unknow error in Redis master-slave configuration under Windows

Source: Internet
Author: User

Exception: Sending command to Master in replication handshake:-writing to Master:unknown error;

Solution to the conclusion:

The IP address written from the slaveof of the database is the same as the bind first parameter of the primary database;

Resolution process:

First, when I am in an operating system for the WIN10 64-bit computer Redis master-slave configuration, the above error occurred, dead or alive connection, then configured as follows;

1, (Master) configuration redis.windows.conf

(1) Bind 127.0.0.1 172.16.XX. XX (This computer IP)

(2) Port 6379

2, (slave1) configuration redis.windows6380.conf

(1) Bind 127.0.0.1 172.16.XX. XX (This computer IP)

(2) Port 6380

(3) slaveof 172.16.XX. XX (This computer IP) 6379

3, (slave2) configuration redis.windows6381.conf

(1) Bind 127.0.0.1 172.16.XX. XX (This computer IP)

(2) Port 6381

(3) slaveof 172.16.XX. XX (This computer IP) 6379

4, and then successively started

Redis.server.exe redis.windows.conf

Redis.server.exe redis.windows6380.conf

Redis.server.exe redis.windows6381.conf

5. Report the above exception

One of the errors is:connecting to MASTER 172.16.xx.xx:6379

Second, find out the cause of the error

1, according to the error message can be seen, from the database configuration is no problem, it is connected to our write the main database IP and port

2, the problem is in the main database;

(1) The IP address is right;

(2) I tried to close all the firewalls, still not connected;

3, later I think it is not the cause of bind

I changed two from the database of the slaveof from 172.16.xx.xx 6379 to 127.0.0.1 6379, even on the!

I think that the slaveof from the database is the same as the bind first parameter of the primary database!

4. Proven Ideas

(1) I changed the bind of the main database to 172.16.xx.xx

(2) Two slaveof converted from database to 172.16.xx.xx 6379

(3) Successful connection;

Iii. Redis master-slave configuration with two windows system computers

0, shut down the firewall

1. master database

(1) Bind 0.0.0.0

2. From the database

(2) IP port of slaveof primary database

3. Successful connection

Writing to Master:unknow error in Redis master-slave configuration under Windows

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.