开发者社区> 问答> 正文

使用canal 有报错

报错信息:

2016-03-25 17:56:48.605 [destination = mysql_56688 , address = /127.0.0.1:56688 , EventParser] WARN c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - prepare to find start position /data/mysql_data/data/mysql-bin.000001:4: 2016-03-25 17:56:48.607 [destination = mysql_56688 , address = /127.0.0.1:56688 , 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:95) ~[canal.parse-1.0.21.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:113) [canal.parse-1.0.21.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:209) [canal.parse-1.0.21.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79] 2016-03-25 17:56:48.607 [destination = mysql_56688 , address = /127.0.0.1:56688 , EventParser] ERROR c.a.otter.canal.parse.inbound.mysql.MysqlEventParser - dump address /127.0.0.1:56688 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:95) ~[canal.parse-1.0.21.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:113) ~[canal.parse-1.0.21.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:209) ~[canal.parse-1.0.21.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79] 2016-03-25 17:56:48.607 [destination = mysql_56688 , address = /127.0.0.1:56688 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:mysql_56688[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:95) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:113) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:209) at java.lang.Thread.run(Thread.java:745)

MySQL:

5.6.25 canal: 1.0.21 instance.properties: canal.instance.mysql.slaveId = 3 canal.instance.master.address = 127.0.0.1:56688 canal.instance.master.journal.name = /data/mysql_data/data/mysql-bin.000001 canal.instance.master.position = 4

首先MySQL配置和文件权限都检查过了,没啥问题,这个是因为bin log目录不在常规目录引起的吗?

原提问者GitHub用户totmann

展开
收起
绿子直子 2023-05-09 16:02:18 114 0
1 条回答
写回答
取消 提交回答
  • Could not find first log file name in binary log index file at. 估计手工清理过binlog日志,没重置mysql binlog index信息,google一大把这问题解决方案

    canal会自行做重试,清理下canal记录的历史位点信息

    原回答者GitHub用户agapple

    2023-05-10 11:02:09
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载