开发者社区> 问答> 正文

canal 在二进制日志索引文件中找不到第一个日志文件名

canal版本: 1.1.4 client: go mysql: 8.0.19 环境:docker

日志

2020-04-12 22:14:50.958 [New I/O server worker #1-2] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to ... 2020-04-12 22:14:50.959 [New I/O server worker #1-2] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^...$ 2020-04-12 22:14:51.785 [destination = example , address = mysql/172.100.0.20: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 2020-04-12 22:14:51.786 [destination = example , address = mysql/172.100.0.20:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position mysql-bin.000111 # è ·å å °å å ªæ ¹æ °å­ :4060:null 2020-04-12 22:14:51.786 [destination = example , address = mysql/172.100.0.20:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> find start position successfully, EntryPosition[included=false,journalName=mysql-bin.000111 # è ·å å °å å ªæ ¹æ °å­ ,position=4060,serverId=,gtid=,timestamp=] cost : 1ms , the next step is binlog dump 2020-04-12 22:14:51.791 [destination = example , address = mysql/172.100.0.20: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.4.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:235) [canal.parse-1.1.4.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:265) [canal.parse-1.1.4.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181] 2020-04-12 22:14:51.792 [destination = example , address = mysql/172.100.0.20:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address mysql/172.100.0.20: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.4.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:235) ~[canal.parse-1.1.4.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:265) ~[canal.parse-1.1.4.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181] 2020-04-12 22:14:51.793 [destination = example , address = mysql/172.100.0.20:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[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:235) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:265) at java.lang.Thread.run(Thread.java:748) ]

通查sql语句

show master status;

拿到 file position后修改 instance.properties 文件

canal.instance.master.journal.name=mysql-bin.000113 canal.instance.master.position=155

保存后重启canal server,运行客户端,写入数据库客户端无任何反应,看日志文件又是上面的错误,请问这种情况应该如何解决呢?

原提问者GitHub用户codedart2018

展开
收起
Java工程师 2023-05-03 10:41:48 112 0
1 条回答
写回答
取消 提交回答
  • 我刚查看了zookeeper里的信息,将zookeeper里的记录删除了,canal就自动获取新的binlog地址了。

    原回答者GitHub用户kangning1

    2023-05-04 14:45:35
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PostgresChina2018_赖思超_PostgreSQL10_hash索引的WAL日志修改版final 立即下载
Kubernetes下日志实时采集、存储与计算实践 立即下载
日志数据采集与分析对接 立即下载