canal解析binlog异常 ,meta.dat中记录的binlog日志文件不存在

2019-03-01 11:19:18.341 [destination = ldb , address = /172.19.33.26:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - —> begin to find start position, it will be long time for reset or first position
2019-03-01 11:19:18.341 [destination = ldb , address = /172.19.33.26:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just last position
{“identity”:{“slaveId”:-1,“sourceAddress”:{“address”:“172.19.33.26”,“port”:3306}},“postion”:{“gtid”:"",“included”:false,“journalName”:“mysql-bin.004810”,“position”:2672997,“serverId”:1132686613,“timestamp”:1550904812000}}
2019-03-01 11:19:18.365 [destination = ldb , address = /172.19.33.26:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - —> find start position successfully, EntryPosition[included=false,journalName=mysql-bin.004810,position=2672997,serverId=1132686613,gtid=,timestamp=1550904812000] cost : 23ms , the next step is binlog dump
2019-03-01 11:19:19.739 [destination = ldb , address = /172.19.33.26: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 = Could not find first log file name in binary log index file
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102) ~[canal.parse-1.1.3-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:233) [canal.parse-1.1.3-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:257) [canal.parse-1.1.3-SNAPSHOT.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
2019-03-01 11:19:19.739 [destination = ldb , address = /172.19.33.26:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address /172.19.33.26:3306 has an error, retrying. caused by
java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Could not find first log file name in binary log index file
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102) ~[canal.parse-1.1.3-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:233) ~[canal.parse-1.1.3-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:257) ~[canal.parse-1.1.3-SNAPSHOT.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
2019-03-01 11:19:19.739 [destination = ldb , address = /172.19.33.26:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:ldb[java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Could not find first log file name in binary log index file
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102)
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:233)
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:257)
at java.lang.Thread.run(Thread.java:748)
]

原因:canal服务器停机几天后重启(mysql服务器一直正常运行),canal再次启动时,从meta.dat获取binlog位置,但此时获取到的binlog信息在mysql中已经被删除了,因此启动失败。

解决方案:将instance.properties文件所在目录中的meta.dat文件删除,然后重启,问题解决。

你可能感兴趣的:(canal解析binlog异常 ,meta.dat中记录的binlog日志文件不存在)