alibaba / canal

阿里巴巴 MySQL binlog 增量订阅&消费组件
Apache License 2.0
28.54k stars 7.62k forks source link

canal再将tsdb由本地h2更换为mysql后,启动时总有一个报错,但是功能没有影响,需要大佬看看原因 #5264

Open zhifan917 opened 2 months ago

zhifan917 commented 2 months ago

canal:1.1.6 配置

table meta tsdb info

canal.instance.tsdb.enable = true

canal.instance.tsdb.enable = false

canal.instance.tsdb.dir = ${canal.file.data.dir:../conf}/${canal.instance.destination:}

canal.instance.tsdb.url = jdbc:h2:${canal.instance.tsdb.dir}/h2;CACHE_SIZE=1000;MODE=MYSQL;

canal.instance.tsdb.url=jdbc:mysql://st1-test-tmysql-st-vip.six.com:3306/canal_tsdb?useUnicode=true&characterEncoding=UTF-8&useSSL=false canal.instance.tsdb.dbUsername = canal canal.instance.tsdb.dbPassword = canal canal.instance.tsdb.spring.xml = classpath:spring/tsdb/mysql-tsdb.xml

报错内容: 2024-09-03 09:37:16.308 [pool-4-thread-1] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table black filter : 2024-09-03 09:37:16.316 [pool-4-thread-1] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful.... 2024-09-03 09:37:16.343 [destination = base-instance , address = st1-hp3-tmysql-st-vip.six.com/10.220.9.137:3306 , EventParser] WARN c.a.o.c.p.inboun d.mysql.rds.RdsBinlogEventParserProxy - ---> begin to find start position, it will be long time for reset or first position 2024-09-03 09:37:16.346 [destination = base-instance , address = st1-hp3-tmysql-st-vip.six.com/10.220.9.137:3306 , EventParser] WARN c.a.o.c.p.inboun d.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just last position {"identity":{"slaveId":-1,"sourceAddress":{"address":"st1-hp3-tmysql-st-vip.six.com","port":3306}},"postion":{"gtid":"","included":false,"journalName ":"mysql-bin.000017","position":127816983,"serverId":864415,"timestamp":1725327329000}} 2024-09-03 09:37:16.393 [destination = base-instance , address = st1-hp3-tmysql-st-vip.six.com/10.220.9.137:3306 , EventParser] WARN c.a.otter.canal. parse.inbound.mysql.tsdb.MemoryTableMeta - parse faield : /p=dmc,o=100014245514,i=cfe6ad48/ ALTER DATABASE canal_tsdb DEFAULT CHARACTER SET = utf8 DEFAULT COLLATE = utf8_general_ci com.alibaba.druid.sql.parser.ParserException: not supported.pos 100, line 1, column 94, token DEFAULT at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:615) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:580) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:601) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.repository.SchemaRepository.console(SchemaRepository.java:463) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.MemoryTableMeta.apply(MemoryTableMeta.java:84) ~[canal.parse-1.1.6.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.applyHistoryOnMemory(DatabaseTableMeta.java:467) [canal.parse-1.1.6.jar: na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.rollback(DatabaseTableMeta.java:168) [canal.parse-1.1.6.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.processTableMeta(AbstractMysqlEventParser.java:142) [canal.parse-1.1.6 .jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$1.run(AbstractEventParser.java:197) [canal.parse-1.1.6.jar:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40] 2024-09-03 09:37:16.393 [destination = base-instance , address = st1-hp3-tmysql-st-vip.six.com/10.220.9.137:3306 , EventParser] WARN c.a.o.c.p.inboun d.mysql.rds.RdsBinlogEventParserProxy - ---> find start position successfully, EntryPosition[included=false,journalName=mysql-bin.000017,position=1278 16983,serverId=864415,gtid=,timestamp=1725327329000] cost : 50ms , the next step is binlog dump

zhifan917 commented 2 months ago

需要大佬,看看这个warning报错的原因是什么?每次启动都会报这个错误

agapple commented 2 months ago

一条ddl不支持解析,可以忽略

zhifan917 commented 2 months ago

一条ddl不支持解析,可以忽略

而且这个ddl是我们将tsdb由本地的h2改为mysql后,按照官方要求先建的canal_tsdb的库表语句的,相当于实际不影响业务哈,后续哪个版本有优化吗,我是1.1.6版本 大佬

zhifan917 commented 2 months ago

后续哪个版本针对 tsdb原始建表语句导致ddl无法解析引起的报错有优化吗?大佬,真诚求解