赞
踩
Caused by: java.lang.NoSuchMethodError: org.apache.flink.api.common.functions.RuntimeContext.getMetricGroup()Lorg/apache/flink/metrics/groups/OperatorMetricGroup;
...
at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:34) ~[flink-dist_2.11-1.13.2.jar:1.13.2]
at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102) ~[flink-dist_2.11-1.13.2.jar:1.13.2]
at org.apache.flink.streaming.api.operators.ProcessOperator.open(ProcessOperator.java:56) ~[flink-dist_2.11-1.13.2.jar:1.13.2]
...
Flink版本问题,从1.13.2升级到1.14.6,问题解决~
WARN org.apache.flink.runtime.taskmanager.Task [] - Source: binlog_cdc_input -> input_count_function -> assign_timestamp_watermark -> delete_no_support_kind -> filter_row_column (3/10)#0 (88e9b7b3cd854aec006ec88441da84f2) switched from INITIALIZING to FAILED with failure cause: java.lang.IllegalArgumentException: Subtask ID 2 is out of server id range 1, please adjust the server id range to make the number of server id larger than the source parallelism.
at com.ververica.cdc.connectors.mysql.source.config.ServerIdRange.getServerId(ServerIdRange.java:56)
at com.ververica.cdc.connectors.mysql.source.config.MySqlSourceConfigFactory.createConfig(MySqlSourceConfigFactory.java:326)
at com.ververica.cdc.connectors.mysql.source.config.MySqlSourceConfigFactory.createConfig(MySqlSourceConfigFactory.java:288)
at com.ververica.cdc.connectors.mysql.source.MySqlSource.createReader(MySqlSource.java:135)
at org.apache.flink.streaming.api.operators.SourceOperator.initReader(SourceOperator.java:268)
at org.apache.flink.streaming.runtime.tasks.SourceOperatorStreamTask.init(SourceOperatorStreamTask.java:70)
at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:674)
at org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:651)
at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958)
at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927)
at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575)
at java.lang.Thread.run(Thread.java:750)
是因为给cdc设置的serverId范围过小,导致多个并行度没有足够的serverId分配,导致启动失败!
Flink版本1.14.6
Caused by: org.apache.flink.util.StateMigrationException: For heap backends, the new state serializer (org.apache.flink.api.common.typeutils.base.ListSerializer@7b317ea3) must not be incompatible with the old state serializer (org.apache.flink.api.common.typeutils.base.ListSerializer@1ba526b7). at org.apache.flink.runtime.state.heap.HeapKeyedStateBackend.tryRegisterStateTable(HeapKeyedStateBackend.java:211) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.runtime.state.heap.HeapKeyedStateBackend.createInternalState(HeapKeyedStateBackend.java:276) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.runtime.state.KeyedStateFactory.createInternalState(KeyedStateFactory.java:47) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.runtime.state.ttl.TtlStateFactory.createStateAndWrapWithTtlIfEnabled(TtlStateFactory.java:73) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.runtime.state.AbstractKeyedStateBackend.getOrCreateKeyedState(AbstractKeyedStateBackend.java:302) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.getOrCreateKeyedState(StreamOperatorStateHandler.java:316) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.streaming.api.operators.AbstractStreamOperator.getOrCreateKeyedState(AbstractStreamOperator.java:471) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.streaming.runtime.operators.windowing.WindowOperator.open(WindowOperator.java:243) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.initializeStateAndOpenOperators(RegularOperatorChain.java:110) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates(StreamTask.java:708) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.call(StreamTaskActionExecutor.java:55) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:684) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:651) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575) ~[flink-dist_2.11-1.14.6.jar:1.14.6] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_345]
Flink版本1.18.0
CDC版本:3.0.1
后台报错信息:
Caused by: java.lang.NoSuchMethodError: org.apache.commons.math3.stat.descriptive.rank.Percentile.withNaNStrategy(Lorg/apache/commons/math3/stat/ranking/NaNStrategy;)Lorg/apache/commons/math3/stat/descriptive/rank/Percentile;
主要原因:commons-math3
版本3.1.1不包含withNaNStrategy
方法
解决办法:升级commons-math3
包版本,如果已经存在已经则将原先依赖剔除
<!--剔除其他应用包中的math3依赖-->
<exclusions>
<exclusion>
<artifactId>commons-math3</artifactId>
<groupId>org.apache.commons</groupId>
</exclusion>
</exclusions>
<!--增加math3依赖-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.6.1</version>
</dependency>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。