Flink启动报错
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,问题解决~文章来源:https://www.toymoban.com/news/detail-792807.html
使用Flink-mysql-cdc启动报错
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分配,导致启动失败!文章来源地址https://www.toymoban.com/news/detail-792807.html
到了这里,关于Flink常见异常&解决办法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!