环境信息
canal version master--1.1.3-SNAPSHOT
mysql version 5.6.28-cdb2016-log
问题描述
canal.properties 配置的HA canal.zkServers =10.50.8.6:2181 canal.instance.global.spring.xml = classpath:spring/default-instance.xml
example的instance.properties配置为 canal.instance.gtidon=true
canal.instance.master.address=127.0.0.1:3306 canal.instance.master.journal.name= canal.instance.master.position= canal.instance.master.timestamp= canal.instance.master.gtid=61724ebf-67d8-11e8-82af-6c92bf5dc258:1-4652108982, b6eb3e25-975a-11e5-a87b-0241b539c4e5:242-58439:58442-115485, cc5b5f77-91a6-11e5-834b-02b39697b809:357187369-381556259:383857565-384113697
canal.instance.defaultDatabaseName =shop canal.instance.filter.regex=... 其他都是默认设置
启动报下面错误。
2018-12-14 14:23:08.104 [destination = example , address = 127.0.0.1:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ---> find start position successfully, EntryPosition[included=false,journalName=mysql-bin.001462,position=24358459,serverId=90255,gtid=,timestamp=1544765205000] cost : 420ms , the next step is binlog dump 2018-12-14 14:24:14.922 [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 = The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires. at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102) ~[classes/:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:253) [classes/:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:250) [classes/:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
原提问者GitHub用户gsfeng179
show variables like '%gtid%',看一下对应的gtid_purge的值
原回答者GitHub用户agapple
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。