MySQL Forums
Forum List  »  Replication

Replica won't connect to Master after server restart
Posted by: Derli Dias Campos Junior
Date: July 19, 2022 07:24AM

I'm pretty sure this happened to someone else out there, and I am sorry if this has already been answered, but I've looked over the internet to find if someone has gone through this.

Anyways,

My replica won't connect to its master throwing these error messages.



2022-07-18T18:16:34.241083Z 9 [ERROR] [MY-010584] [Repl] Slave SQL for channel '': Worker 1 failed executing transaction 'ANONYMOUS' at master log LD-PROP-bin.000008, end_log_pos 138018018; Could not execute Write_rows event on table mt4_demo.mt4_trades; Duplicate entry '99885083' for key 'mt4_trades.PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 138018018, Error_code: MY-001062



2022-07-18T18:16:34.242974Z 6 [ERROR] [MY-010586] [Repl] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'LD-PROP-bin.000008' position 138017521



2022-07-18T18:16:34.473406Z 5 [System] [MY-010562] [Repl] Slave I/O thread for channel '': connected to master 'replica_user@192.168.2.165:3306',replication started in log 'LD-PROP-bin.000008' at position 761410832



I've tried resetting the replica paramenter and then start it again, no luck..

This is the error message from the replica status:

Last_SQL_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction 'ANONYMOUS' at master log LD-PROP-bin.000008, end_log_pos 138018018. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.

after going to that mentioned table there, I found this:

Worker 1 failed executing transaction 'ANONYMOUS' at master log LD-PROP-bin.000008, end_log_pos 138018018; Could not execute Write_rows event on table mt4_demo.mt4_trades; Duplicate entry '99885083' for key 'mt4_trades.PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 138018018


Is this something I have to do on the master server or?

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

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.