MySQL Forums
Forum List  »  Replication

ERROR 1794 (HY000) / multisourced slave
Posted by: Gary Ku
Date: August 12, 2020 03:20AM

Hi Everyone,

We faced the issue related to replication.
We have the topology to have one slave and two master in our system. And make the slave for the same database from two master DB.
Follow the replication guild, we configured on slave DB and try to test by following:
1. master1 create table A on database X and confirmed the table A available on slave DB
2. master2 create table B on database x and confirmed the table B available on slabe DB

Those are all expected as what we figured out. However, if we restart mysql on slave DB (systemctl restart mysqld). There is error when we try to start slave and it can't recover at all. There are some information which we meet and need you help to share your suggestion to resolve.
-----------------------------------------------
1. Try to start slave but get error (confirmed we have configured the server id)
mysql> start slave for channel "master1";
ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.

2. show the error log as following:
2020-08-12T16:10:26.123530+08:00 0 [ERROR] Slave: This slave was a multisourced slave previously which is supported only by both TABLE based master info and relay log info repositories. Found one or both of the info repos to be type FILE. Set both repos to type TABLE.
2020-08-12T16:10:26.123568+08:00 0 [ERROR] Failed to create or recover replication info repositories.

3. Also confirmed we configure the following table already:
mysql> set global master_info_repository = 'TABLE';
mysql> set global relay_log_info_repository = 'TABLE';

4. mysql version also confirmed as 5.7.23 (two master and slave all the same version)

5. show slave status but get the Empty set return.

6 change master setting(I think there is no problem because I check the replication result by former test)
change master to master_host = 'labdb1', master_user = 'rep', master_password = '1qaz@WSX', master_log_file = 'mysql-bin.000001', master_log_pos = 101997070 for channel "master1";
change master to master_host = 'labdb2', master_user = 'rep', master_password = '1qaz@WSX', master_log_file = 'mysql-bin.043890', master_log_pos = 154 for channel "master2";

7. my.cnf sertting (share related replication part)
#Replication
log_bin = mysql-bin
server-id=3
log_slave_updates = ON
gtid_mode = off
enforce_gtid_consistency = false

According to the error message, is the cause related to multisourced slave? Is it not suitable on this scenario?

Thanks in advanced.

Options: ReplyQuote


Subject
Views
Written By
Posted
ERROR 1794 (HY000) / multisourced slave
244
August 12, 2020 03:20AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.