开发者社区> 问答> 正文

flink1.9.1用采用-d(分离模式提交)作业报错,但是不加-d是可以正常跑的什么情况?

请问大家: 我采用如下命令提交: flink run
-m yarn-cluster
-yn 3
-ys 3
-yjm 2048m
-ytm 2048m
-ynm flink_test
-d
-c net.realtime.app.FlinkTest ./hotmall-flink.jar 就会失败,报错信息如下: [AMRM Callback Handler Thread] ERROR org.apache.flink.yarn.YarnResourceManager - Fatal error occurred in ResourceManager. java.lang.NoSuchMethodError: org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest.newInstance(IFLjava/util/List;Ljava/util/List;Ljava/util/List;Lorg/apache/hadoop/yarn/api/records/ResourceBlacklistRequest;)Lorg/apache/hadoop/yarn/api/protocolrecords/AllocateRequest; at org.apache.hadoop.yarn.client.api.impl.AMRMClientImpl.allocate(AMRMClientImpl.java:279) at org.apache.hadoop.yarn.client.api.async.impl.AMRMClientAsyncImpl$HeartbeatThread.run(AMRMClientAsyncImpl.java:273) [AMRM Callback Handler Thread] ERROR org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Fatal error occurred in the cluster entrypoint. java.lang.NoSuchMethodError: org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest.newInstance(IFLjava/util/List;Ljava/util/List;Ljava/util/List;Lorg/apache/hadoop/yarn/api/records/ResourceBlacklistRequest;)Lorg/apache/hadoop/yarn/api/protocolrecords/AllocateRequest; at org.apache.hadoop.yarn.client.api.impl.AMRMClientImpl.allocate(AMRMClientImpl.java:279) at org.apache.hadoop.yarn.client.api.async.impl.AMRMClientAsyncImpl$HeartbeatThread.run(AMRMClientAsyncImpl.java:273) [flink-akka.actor.default-dispatcher-2] INFO org.apache.flink.yarn.YarnResourceManager - ResourceManager akka.tcp://flink@emr-worker-8.cluster-174460:33650/user/resourcemanager was granted leadership with fencing token 00000000000000000000000000000000 [BlobServer shutdown hook] INFO org.apache.flink.runtime.blob.BlobServer - Stopped BLOB server at 0.0.0.0:36247 http://apache-flink.147419.n8.nabble.com/file/t802/%E6%8D%95%E8%8E%B71111.png 但是我在提交命令时,不加-d,就可以正常提交运行;更奇怪的是,我运行另一个任务,加了-d参数,可以正常提交。 我这个提交失败的任务开始是用如下命令运行的: nohup flink run
-m yarn-cluster
-yn 3
-ys 3
-yjm 2048m
-ytm 2048m
-ynm flink_test
-c net.realtime.app.FlinkTest ./hotmall-flink.jar > /logs/flink.log 2>&1 & (图) 在这个任务挂掉之后,再用-d的方式重启就会出现我开始说的问题,很奇怪,有大佬知道为什么么? *来自志愿者整理的flink邮件归档

展开
收起
游客sadna6pkvqnz6 2021-12-07 17:24:43 1367 0
1 条回答
写回答
取消 提交回答
  • 像我之前说的那样,加 -d 和不加 -d 使用的是不同的模式启动作业的。从你的报错栈来看,应该是类冲突了。你可以看下这个文档[1] 看看能否帮助你 java.lang.NoSuchMethodError: org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest.newInstance(IFLjava/util/List;Ljava/util/List;Ljava/util/List;Lorg/apache/hadoop/yarn/api/records/ResourceBlacklistRequest;)Lorg/apache/hadoop/yarn/api/protocolrecords/AllocateRequest; at org.apache.hadoop.yarn.client.api.impl.AMRMClientImpl.allocate(AMRMClientImpl.java:279) at org.apache.hadoop.yarn.client.api.async.impl.AMRMClientAsyncImpl$HeartbeatThread.run(AMRMClientAsyncImpl.java:273)

    [1] https://ci.apache.org/projects/flink/flink-docs-release-1.9/monitoring/debugging_classloading.html*来自志愿者整理的flink

    2021-12-07 20:58:41
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Flink CDC Meetup PPT - 龚中强 立即下载
Flink CDC Meetup PPT - 王赫 立即下载
Flink CDC Meetup PPT - 覃立辉 立即下载