【 使用环境 】生产环境 or 测试环境
【 OB or 其他组件 】
【 使用版本 】最新版
【问题描述】清晰明确描述问题 使用canal报错
【复现路径】问题出现前后相关操作
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):2024-04-26 11:21:41.800 [destination = example , address = /192.168.0.45:2881 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address /192.168.0.45:2881 has an error, retrying. caused by
com.alibaba.otter.canal.parse.exception.CanalParseException: command : ‘show master status’ has an error!
Caused by: java.io.IOException: ErrorPacket [errorNumber=1064, fieldCount=-1, message=You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near ‘master status’ at line 1, sqlState=42000, sqlStateMarker=#]
with command: show master status
at com.alibaba.otter.canal.parse.driver.mysql.MysqlQueryExecutor.query(MysqlQueryExecutor.java:61)
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.query(MysqlConnection.java:106)
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findEndPosition(MysqlEventParser.java:673)
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findEndPositionWithMasterIdAndTimestamp(MysqlEventParser.java:383)
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPositionInternal(MysqlEventParser.java:442)
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.findStartPosition(MysqlEventParser.java:360)
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$1.run(AbstractEventParser.java:186)
at java.lang.Thread.run(Thread.java:748)
ob没有show master status语法。
如何解决
https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000507565
缺少解析成 binlog 步骤,canal无法直接解析ob的clog。
ob_cluster → oblogreader → oblogmsg → canal_server → canal_client → mysql