在使用阿里开源的canal时,example.log报以下错误
2018-04-12 21:53:45.278 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR c.a.o.canal.parse.inbound.mysql.dbsync.DirectLogFetcher - I/O error while reading from client socket java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = binlog truncated in the middle of event; consider out of disk space on master; the first event 'mysql-bin.000001' at 669, the last event read from '.mysql-bin.000001' at 669, the last byte read from '.mysql-bin.000001' at 688. at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:95) ~[canal.parse-1.0.24.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:122) [canal.parse-1.0.24.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:209) [canal.parse-1.0.24.jar:na] at java.lang.Thread.run(Unknown Source) [na:1.8.0_151] 2018-04-12 21:53:45.278 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - dump address /127.0.0.1:3306 has an error, retrying. caused by java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = binlog truncated in the middle of event; consider out of disk space on master; the first event 'mysql-bin.000001' at 669, the last event read from '.mysql-bin.000001' at 669, the last byte read from '.mysql-bin.000001' at 688. at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:95) ~[canal.parse-1.0.24.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:122) ~[canal.parse-1.0.24.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:209) ~[canal.parse-1.0.24.jar:na] at java.lang.Thread.run(Unknown Source) [na:1.8.0_151] 2018-04-12 21:53:45.280 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = binlog truncated in the middle of event; consider out of disk space on master; the first event 'mysql-bin.000001' at 669, the last event read from '.mysql-bin.000001' at 669, the last byte read from '.mysql-bin.000001' at 688. at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:95) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:122) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:209) at java.lang.Thread.run(Unknown Source) ] 2018-04-12 21:54:00.256 [destination = example , address = /127.0.0.1:3306 , EventParser] WARN c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - prepare to find start position just last position {"identity":{"slaveId":-1,"sourceAddress":{"address":"manager.shop.com","port":3306}},"postion":{"included":false,"journalName":"mysql-bin.000001","position":669,"serverId":1,"timestamp":1523526735000}} 2018-04-12 21:54:00.273 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR c.a.o.canal.parse.inbound.mysql.dbsync.DirectLogFetcher - I/O error while reading from client socket java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = binlog truncated in the middle of event; consider out of disk space on master; the first event 'mysql-bin.000001' at 669, the last event read from '.mysql-bin.000001' at 669, the last byte read from '.mysql-bin.000001' at 688. at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:95) ~[canal.parse-1.0.24.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:122) [canal.parse-1.0.24.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:209) [canal.parse-1.0.24.jar:na] at java.lang.Thread.run(Unknown Source) [na:1.8.0_151] 2018-04-12 21:54:00.274 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - dump address /127.0.0.1:3306 has an error, retrying. caused by java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = binlog truncated in the middle of event; consider out of disk space on master; the first event 'mysql-bin.000001' at 669, the last event read from '.mysql-bin.000001' at 669, the last byte read from '.mysql-bin.000001' at 688. at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:95) ~[canal.parse-1.0.24.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:122) ~[canal.parse-1.0.24.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:209) ~[canal.parse-1.0.24.jar:na] at java.lang.Thread.run(Unknown Source) [na:1.8.0_151] 2018-04-12 21:54:00.274 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = binlog truncated in the middle of event; consider out of disk space on master; the first event 'mysql-bin.000001' at 669, the last event read from '.mysql-bin.000001' at 669, the last byte read from '.mysql-bin.000001' at 688. at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:95) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:122) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:209) at java.lang.Thread.run(Unknown Source) ] 2018-04-12 21:54:01.797 [New I/O server worker #1-1] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to .*..*
解决方法:
删除canal/conf/下对应实例的meta.dat文件即可
https://blog.csdn.net/jingshenbusi/article/details/79920925