我按照官方网站上显示的方式配置文件,但启动失败。示例日志如下:
2023-04-18 11:17:29.972 [destination = example , 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 java.lang.NullPointerException: null at com.alibaba.druid.sql.visitor.SQLASTOutputVisitor.visit(SQLASTOutputVisitor.java:5397) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.ast.statement.SQLCheck.accept0(SQLCheck.java:47) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:48) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.visitor.SQLASTOutputVisitor.printTableElements(SQLASTOutputVisitor.java:3530) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.visitor.SQLASTOutputVisitor.visit(SQLASTOutputVisitor.java:9568) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlCreateTableStatement.accept0(MySqlCreateTableStatement.java:133) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlCreateTableStatement.accept0(MySqlCreateTableStatement.java:93) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:48) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.ast.SQLObjectImpl.output(SQLObjectImpl.java:89) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.druid.sql.ast.SQLObjectImpl.output(SQLObjectImpl.java:74) ~[druid-1.2.11.jar:1.2.11] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.MemoryTableMeta.snapshot(MemoryTableMeta.java:151) ~[canal.parse-1.1.6.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.applySnapshotToDB(DatabaseTableMeta.java:303) ~[canal.parse-1.1.6.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.rollback(DatabaseTableMeta.java:176) ~[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(Unknown Source) [na:1.8.0_221] 2023-04-18 11:17:29.972 [destination = example , address = /127.0.0.1:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:example[java.lang.NullPointerException at com.alibaba.druid.sql.visitor.SQLASTOutputVisitor.visit(SQLASTOutputVisitor.java:5397) at com.alibaba.druid.sql.ast.statement.SQLCheck.accept0(SQLCheck.java:47) at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:48) at com.alibaba.druid.sql.visitor.SQLASTOutputVisitor.printTableElements(SQLASTOutputVisitor.java:3530) at com.alibaba.druid.sql.visitor.SQLASTOutputVisitor.visit(SQLASTOutputVisitor.java:9568) at com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlCreateTableStatement.accept0(MySqlCreateTableStatement.java:133) at com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlCreateTableStatement.accept0(MySqlCreateTableStatement.java:93) at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:48) at com.alibaba.druid.sql.ast.SQLObjectImpl.output(SQLObjectImpl.java:89) at com.alibaba.druid.sql.ast.SQLObjectImpl.output(SQLObjectImpl.java:74) at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.MemoryTableMeta.snapshot(MemoryTableMeta.java:151) at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.applySnapshotToDB(DatabaseTableMeta.java:303) at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.rollback(DatabaseTableMeta.java:176) at com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.processTableMeta(AbstractMysqlEventParser.java:142) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$1.run(AbstractEventParser.java:197) at java.lang.Thread.run(Unknown Source) ] what is wrong? how can i make it correct? canal-deployer-1.1.6 mysql-8.0.31
原提问者GitHub用户Caily
参考这个解决了,值得注意的是,在conf文件夹下,canal.properties、以及example文件夹下的instance.properties都要改
https://github.com/alibaba/canal/issues/4159#issue-1221808270
原回答者GitHub用户CailynH
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。