mysql-binlog-connector-java
mysql-binlog-connector-java copied to clipboard
KeepAlive and Connect both have exception
I have modified BinlogClient.java code to trace issue. below are the exception I'm getting. In this case is possible to connect again? I'm using version - v_0_13_0. I'm getting such exception while mysql cluster is going on with data migrations for some tables. :
INFO: Trying to restore lost connection to x.x.x.x:1234 Jun 22, 2019 10:04:14 AM com.github.shyiko.mysql.binlog.BinaryLogClient disconnectChannel WARNING: Stack trace java.lang.Exception: Stack trace at com.github.shyiko.mysql.binlog.BinaryLogClient.disconnectChannel(BinaryLogClient.java:1157) at com.github.shyiko.mysql.binlog.BinaryLogClient.terminateConnect(BinaryLogClient.java:1143) at com.github.shyiko.mysql.binlog.BinaryLogClient.access$900(BinaryLogClient.java:88) at com.github.shyiko.mysql.binlog.BinaryLogClient$5.run(BinaryLogClient.java:746) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
Jun 22, 2019 10:04:15 AM com.github.shyiko.mysql.binlog.BinaryLogClient listenForEventPackets WARNING: Stack trace2 java.io.EOFException at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:897) at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:559) at com.zoho.mysqlbackup.producer.KafkaBinLogReader.connect(KafkaBinLogReader.java:1317) at com.zoho.mysqlbackup.producer.KafkaBinLogReader.readBinLog(KafkaBinLogReader.java:299) at com.zoho.mysqlbackup.producer.KafkaBinLogReader.run(KafkaBinLogReader.java:266)
After setting heartbeat instead of default com_ping with keepAlive thread, things are working perfectly.