canal同步mysql数据时报错:
2019-08-23 18:17:10.504 [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/127.0.0.1:3306 has an error, retrying. caused by
com.alibaba.otter.canal.parse.exception.CanalParseException: com.alibaba.otter.canal.parse.exception.CanalParseException: parse row data failed.
Caused by: com.alibaba.otter.canal.parse.exception.CanalParseException: parse row data failed.
Caused by: com.googlecode.aviator.exception.ExpressionRuntimeException: Execute expression error
at com.googlecode.aviator.ClassExpression.execute(ClassExpression.java:59) ~[aviator-2.2.1.jar:na]
at com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter.filter(AviaterRegexFilter.java:74) ~[canal.filter-1.1.4-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parseRowsEventForTableMeta(LogEventConvert.java:447) ~[canal.parse-1.1.4-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parseRowsEvent(LogEventConvert.java:496) ~[canal.parse-1.1.4-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parseRowsEvent(LogEventConvert.java:487) ~[canal.parse-1.1.4-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parse(LogEventConvert.java:125) ~[canal.parse-1.1.4-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert.parse(LogEventConvert.java:67) ~[canal.parse-1.1.4-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser.parseAndProfilingIfNecessary(AbstractEventParser.java:409) ~[canal.parse-1.1.4-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3$1.sink(AbstractEventParser.java:209) ~[canal.parse-1.1.4-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:178) ~[canal.parse-1.1.4-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:271) ~[canal.parse-1.1.4-SNAPSHOT.jar:na]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_211]
Caused by: com.google.common.collect.ComputationException: java.lang.RuntimeException: org.apache.oro.text.regex.MalformedPatternException: Nested repetitions *?+ in expression
at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:889) ~[guava-18.0.jar:na]
at com.alibaba.otter.canal.filter.PatternUtils.getPattern(PatternUtils.java:34) ~[canal.filter-1.1.4-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.filter.aviater.RegexFunction.call(RegexFunction.java:24) ~[canal.filter-1.1.4-SNAPSHOT.jar:na]
at Script_1566554918917_0.execute0(Unknown Source) ~[na:na]
at com.googlecode.aviator.ClassExpression.execute(ClassExpression.java:53) ~[aviator-2.2.1.jar:na]
... 11 common frames omitted
Caused by: java.lang.RuntimeException: org.apache.oro.text.regex.MalformedPatternException: Nested repetitions *?+ in expression
at com.alibaba.otter.canal.filter.PatternUtils$1.apply(PatternUtils.java:28) ~[canal.filter-1.1.4-SNAPSHOT.jar:na]
at com.alibaba.otter.canal.filter.PatternUtils$1.apply(PatternUtils.java:18) ~[canal.filter-1.1.4-SNAPSHOT.jar:na]
at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:356) ~[guava-18.0.jar:na]
at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:182) ~[guava-18.0.jar:na]
at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:151) ~[guava-18.0.jar:na]
at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:67) ~[guava-18.0.jar:na]
at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:885) ~[guava-18.0.jar:na]
... 15 common frames omitted
Caused by: org.apache.oro.text.regex.MalformedPatternException: Nested repetitions *?+ in expression
at org.apache.oro.text.regex.Perl5Compiler.__parseBranch(Unknown Source) ~[oro-2.0.8.jar:na]
at org.apache.oro.text.regex.Perl5Compiler.__parseAlternation(Unknown Source) ~[oro-2.0.8.jar:na]
at org.apache.oro.text.regex.Perl5Compiler.__parseExpression(Unknown Source) ~[oro-2.0.8.jar:na]
at org.apache.oro.text.regex.Perl5Compiler.compile(Unknown Source) ~[oro-2.0.8.jar:na]
at org.apache.oro.text.regex.Perl5Compiler.compile(Unknown Source) ~[oro-2.0.8.jar:na]
at com.alibaba.otter.canal.filter.PatternUtils$1.apply(PatternUtils.java:23) ~[canal.filter-1.1.4-SNAPSHOT.jar:na]
... 21 common frames omitted
仔细检查了下所有配置发现确实是表达式写错了。
connector.connect();
//connector.subscribe(".*\\..*");
connector.subscribe("houseresource\\..*,visitor\\..**");
//connector.subscribe(appConfig.getSubscribeFilter());
connector.rollback();
long emptyCount = 1l;
connector.subscribe("houseresource\\..*,visitor\\..**");多了一个*