canal读取binlog,一旦canal异常挂掉或者重启,会遇到很多坑,主要是元数据一致性问题,常见问题如下:
问题一:canal重启后与运行停止前的位点信息不匹配
[destination = 02reserve , address = /10.130.208.242:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address /10.130.208.242:3306 has an error, retrying. caused by
java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Client requested master to start replication from position > file size; the first event 'mysql-bin.000091' at 797647452, the last event read from '/data/mysql/mysql-bin.000091' at 4, the last byte read from '/data/mysql/mysql-bin.000091' at 4.
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102) ~[canal.parse-1.1.5-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnectio