You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by chaos <ji...@163.com> on 2021/01/20 09:29:35 UTC

flink1.12 on yarn per-job 运行问题

跑demo都能正常跑,但是跑自己的程序就出现任务一直处于created 状态。 
<http://apache-flink.147419.n8.nabble.com/file/t1279/Snipaste_2021-01-20_17-26-13.png>  

yarn 集群资源充足。

在flink的web 界面 Exceptions 里会看到

java.util.concurrent.CompletionException:
org.apache.flink.runtime.jobmanager.scheduler.NoResourceAvailableException:
Slot request bulk is not fulfillable! Could not allocate the required slot
within slot request timeout
	at
java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292)
	at
java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308)
	at
java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:593)
	at
java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
	at
java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at
java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
	at
org.apache.flink.runtime.scheduler.SharedSlot.cancelLogicalSlotRequest(SharedSlot.java:195)
	at
org.apache.flink.runtime.scheduler.SlotSharingExecutionSlotAllocator.cancelLogicalSlotRequest(SlotSharingExecutionSlotAllocator.java:147)
	at
org.apache.flink.runtime.scheduler.SharingPhysicalSlotRequestBulk.cancel(SharingPhysicalSlotRequestBulk.java:84)
	at
org.apache.flink.runtime.jobmaster.slotpool.PhysicalSlotRequestBulkWithTimestamp.cancel(PhysicalSlotRequestBulkWithTimestamp.java:66)
	at
org.apache.flink.runtime.jobmaster.slotpool.PhysicalSlotRequestBulkCheckerImpl.lambda$schedulePendingRequestBulkWithTimestampCheck$0(PhysicalSlotRequestBulkCheckerImpl.java:87)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRunAsync(AkkaRpcActor.java:404)
	at
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:197)
	at
org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkkaRpcActor.java:74)
	at
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:154)
	at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:26)
	at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:21)
	at scala.PartialFunction$class.applyOrElse(PartialFunction.scala:123)
	at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:21)
	at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:170)
	at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171)
	at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171)
	at akka.actor.Actor$class.aroundReceive(Actor.scala:517)
	at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:225)
	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:592)
	at akka.actor.ActorCell.invoke(ActorCell.scala:561)
	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:258)
	at akka.dispatch.Mailbox.run(Mailbox.scala:225)
	at akka.dispatch.Mailbox.exec(Mailbox.scala:235)
	at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at
akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
	at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
	at
akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by:
org.apache.flink.runtime.jobmanager.scheduler.NoResourceAvailableException:
Slot request bulk is not fulfillable! Could not allocate the required slot
within slot request timeout
	at
org.apache.flink.runtime.jobmaster.slotpool.PhysicalSlotRequestBulkCheckerImpl.lambda$schedulePendingRequestBulkWithTimestampCheck$0(PhysicalSlotRequestBulkCheckerImpl.java:84)
	... 24 more
Caused by: java.util.concurrent.TimeoutException: Timeout has occurred:
300000 ms
	... 25 more




--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.12 on yarn per-job 运行问题

Posted by chaos <ji...@163.com>.
问题已解决。
不是资源不足问题,应该是依赖冲突。
解决方式:将所有依赖手动上传至lib下,只打包代码。



--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.12 on yarn per-job 运行问题

Posted by chaos <ji...@163.com>.
感谢回复。
CDH 集群 160G, 64C,平时主要夜间跑离线任务,提交程序时没指定任何资源相关的配置



--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.12 on yarn per-job 运行问题

Posted by chaos <ji...@163.com>.
感谢回复,看日志好像没什么异常。日志已添加到附件。
Yarn Sesseion 模式运行时是没问题的, Per-job 和 Application Mode 就不行。



--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.12 on yarn per-job 运行问题

Posted by zhisheng <zh...@gmail.com>.
应该要提供一下 jm 的日志,麻烦检查一下 jm 里面的日志是否有异常的日志,我们遇到过类似的问题是因为包冲突导致的作业申请资源有问题,最后一直处于
created 状态

Best
zhisheng

花乞丐 <hu...@163.com> 于2021年1月21日周四 上午8:47写道:

> 贴一下提交程序的参数,以及你机器的配置,从上面看,是资源分配不够!
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/

Re: flink1.12 on yarn per-job 运行问题

Posted by 花乞丐 <hu...@163.com>.
贴一下提交程序的参数,以及你机器的配置,从上面看,是资源分配不够!



--
Sent from: http://apache-flink.147419.n8.nabble.com/