canal Received error packet: errno = 1064, sqlstate = HY000 errmsg = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\x04' at line 1

46scxncf  于 3个月前  发布在  Mysql
关注(0)|答案(3)|浏览(132)

2023-09-30 10:10:31.384 [main] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for 1-sync_table-instance
2023-09-30 10:10:31.401 [main] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table filter : ^canal-test..$
2023-09-30 10:10:31.401 [main] WARN c.a.o.canal.parse.inbound.mysql.dbsync.LogEventConvert - --> init table black filter : ^mysql.slave_.
$
2023-09-30 10:10:31.409 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful....
2023-09-30 10:10:31.527 [destination = sync_table-instance , address = /127.0.0.1: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
2023-09-30 10:10:31.528 [destination = sync_table-instance , address = /127.0.0.1:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just show master status
2023-09-30 10:10:31.554 [destination = sync_table-instance , 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 = 1064, sqlstate = HY000 errmsg = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\x04' at line 1
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102) ~[canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.seek(MysqlConnection.java:150) [canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findAsPerTimestampInSpecificLogFile(MysqlEventParser.java:767) [canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findEndPositionWithMasterIdAndTimestamp(MysqlEventParser.java:384) [canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPositionInternal(MysqlEventParser.java:439) [canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPosition(MysqlEventParser.java:358) [canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$1.run(AbstractEventParser.java:191) [canal.parse-1.1.7-SNAPSHOT.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
2023-09-30 10:10:31.559 [destination = sync_table-instance , address = /127.0.0.1:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - ERROR ## findAsPerTimestampInSpecificLogFile has an error
java.io.IOException: Received error packet: errno = 1064, sqlstate = HY000 errmsg = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\x04' at line 1
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102) ~[canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.seek(MysqlConnection.java:150) ~[canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findAsPerTimestampInSpecificLogFile(MysqlEventParser.java:767) [canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findEndPositionWithMasterIdAndTimestamp(MysqlEventParser.java:384) [canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPositionInternal(MysqlEventParser.java:439) [canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPosition(MysqlEventParser.java:358) [canal.parse-1.1.7-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$1.run(AbstractEventParser.java:191) [canal.parse-1.1.7-SNAPSHOT.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
2023-09-30 10:10:31.560 [destination = sync_table-instance , address = /127.0.0.1:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address /127.0.0.1:3306 has an error, retrying. caused by
com.alibaba.otter.canal.parse.exception.PositionNotFoundException: can't find start position for sync_table-instance
2023-09-30 10:10:31.563 [destination = sync_table-instance , address = /127.0.0.1:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:sync_table-instance[com.alibaba.otter.canal.parse.exception.PositionNotFoundException: can't find start position for sync_table-instance

从上面的报错信息来看:Received error packet: errno = 1064, sqlstate = HY000 errmsg = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\x04' at line 1

jutyujz0

jutyujz01#

你这mysql是啥版本?另外show master status看下内容

jdg4fx2g

jdg4fx2g2#

你这mysql是啥版本?另外show master status看下内容

确认了,应该是我们对mysql进行了二次开发,canal是不是不支持二次开发的mysql? @agapple

iyzzxitl

iyzzxitl3#

二次开发的mysql需要兼容下现有行为,比如:show master status、show binlog events等,否则canal无法正常使用

相关问题