开发者社区> 问答> 正文

canal如何拉取阿里云RDS OSS binlog?

canal version: v1.1.4, v1.1.5 RDS: MySQL 5.7

配置文件变更部分:

canal.properties canal.zkServers = zookeeper.XXXXXX.com:2181

instance.properties canal.instance.master.address=XXXX.mysql.rds.aliyuncs.com:3331 canal.instance.master.journal.name=mysql-bin.000018 canal.instance.master.timestamp=1589784982000 canal.instance.rds.accesskey=LTAI4FrRZfXXXXXXXX5zgxYD canal.instance.rds.secretkey=NLjSMlFDydyxPIXXXXXXXXXXzvpBq2 canal.instance.rds.instanceId=rm-bp19qXXXXXXXXklfc # RDS的实例ID canal.instance.dbUsername=canal canal.instance.dbPassword=canalXXXXXXXX

昨天进行验证,手动停止canal服务,把binlog上传到OSS上面。

按照官方文档进行操作,想从指定binlog开始拉取,但是启动报错找不到binlog。

我用关键字在issue进行查询,按照issue里面的方式指定binlog和position,或者指定binlog和timestamp,均提示以下错误。 2020-05-19 11:28:30.952 [destination = example , address = XXXX.mysql.rds.aliyuncs.com/172.16.243.204:3331 , 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.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:235) [canal.parse-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:265) [canal.parse-1.1.5-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102] 2020-05-19 11:28:30.952 [destination = example , address = XXXX.mysql.rds.aliyuncs.com/172.16.243.204:3331 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address XXXX.mysql.rds.aliyuncs.com/172.16.243.204:3331 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.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:235) ~[canal.parse-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:265) ~[canal.parse-1.1.5-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102] 2020-05-19 11:28:30.952 [destination = example , address = XXXX.mysql.rds.aliyuncs.com/172.16.243.204:3331 , 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:745) ]

提问165.png

请问一下,我该如何处理,才能从指定点位进行数据拉取?谢谢大家的答复。

原提问者GitHub用户PostgreSQL1989

展开
收起
Java工程师 2023-05-03 10:20:12 159 0
1 条回答
写回答
取消 提交回答
  • 指定一下时间戳,不要指定位点

    原回答者GitHub用户agapple

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

相关电子书

更多
搭建电商项目架构连接MySQL 立即下载
搭建4层电商项目架构,实战连接MySQL 立即下载
PolarDB MySQL引擎重磅功能及产品能力盛大发布 立即下载

相关镜像