maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #05166
Re: Replication Problem
-
To:
Thomas Plant <thomas@plant.systems>
-
From:
Kristian Nielsen <knielsen@xxxxxxxxxxxxxxx>
-
Date:
Wed, 04 Jul 2018 17:37:38 +0200
-
Cc:
maria-discuss@xxxxxxxxxxxxxxxxxxx
-
In-reply-to:
<b411d7c1-7fa1-78ce-6e28-3973cea4f57e@plant.systems> (Thomas Plant's message of "Wed, 4 Jul 2018 12:03:26 +0200")
-
User-agent:
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
Thomas Plant <thomas@plant.systems> writes:
> Today I had time to look at the error, removed the duplicate ID from
> the table and started the slave thread again using 'start slave;'.
>
> But now I get another error:
>
> Last_IO_Error: Got fatal error 1236 from master when reading data from
> binary log: 'Error: connecting slave requested to start from GTID
> 0-2-2948175468, which is not in the master's binlog. Since the
> master's binlog contains GTIDs with higher sequence numbers, it
> probably means that the slave has diverged due to executing extra
> erroneous transactions'
So it seems you are using MariaDB Global Transaction ID with
MASTER_USE_GTID=current_pos, and you forgot to do the duplicate ID removal
under `SET sql_log_bin=0`.
The easiest solution is probably to CHANGE MASTER TO
MASTER_USE_GTID=slave_pos. This should make the slave ignore the local
transaction and just connect to the master using the last replicated
position.
(current_pos tells the MariaDB server that you expect any local transactions
on the slave to also be replicated to other servers, hence the error.
current_pos is appropriate for an earlier master that is turned into a
slave, but not for a slave where local "fixup" transactions ended up in the
binlog).
Hope this helps,
- Kristian.
References