Hi, I'm in a situation whereby replication between...
# ask-community-for-troubleshooting
d
Hi, I'm in a situation whereby replication between MySQL and Kafka has stopped. Is there a way to restart this? On the UI, it says that last sync was 2 hours ago (though set at every 5 minutes) but other than that there's no visible error. Below is what I think is a relevant log:
Copy code
2022-06-26 06:19:40 source > 2022-06-26 06:19:39 INFO i.a.i.s.m.MySqlCdcStateHandler(saveState):41 - debezium state: {"mysql_db_history":"{\"source\":{\"server\":\"database_prod\"},\"position\":{\"file\":\"mysql-bin.001125\",\"pos\":
2022-06-26 06:19:40 source > 2022-06-26 06:19:39 WARN i.a.i.b.IntegrationRunner(watchForOrphanThreads):239 - The main thread is exiting while children non-daemon threads from a connector are still active.
2022-06-26 06:19:40 source > Ideally, this situation should not happen...
2022-06-26 06:19:40 source > Please check with maintainers if the connector or library code should safely clean up its threads before quitting instead.
2022-06-26 06:19:40 source > The main thread is: main (RUNNABLE)
2022-06-26 06:19:40 source >  Thread stacktrace: java.base/java.lang.Thread.getStackTrace(Thread.java:1610)

2022-06-26 06:04:31 source > 2022-06-26 06:04:30 INFO i.a.i.s.m.MySqlCdcTargetPosition(reachedTargetPosition):83 - Signalling close because record's binlog file : mysql-bin.001130 , position : 66010983 is after target file : mysql-bin.001130 , target position : 66010115
2022-06-26 06:04:31 source > 2022-06-26 06:04:30 INFO i.d.e.EmbeddedEngine(stop):996 - Stopping the embedded engine
2022-06-26 06:04:31 source > 2022-06-26 06:04:30 INFO i.d.e.EmbeddedEngine(stop):1004 - Waiting for PT5M for connector to stop
2022-06-26 06:06:00 source > Jun 26, 2022 6:06:00 AM com.github.shyiko.mysql.binlog.BinaryLogClient$5 run
2022-06-26 06:06:00 source > INFO: Trying to restore lost connection to 199.299.199.199:3306
D'oh! I cancelled the current sync and started a new one. Looks like replication is back again. Still wondering why it happened in the first place and if there's a way it will autorecover, though.