Flink本地部署报错 Could not resolve ResourceManager address ,提交job,显示taskmanagers等均为0

  • Post author:
  • Post category:其他


报错

...
org.apache.flink.runtime.taskexecutor.exceptions.RegistrationTimeoutException: Could not register at the ResourceManager within the specified maximum registration duration 300000 ms. This indicates a problem with this instance. Terminating now.
        at org.apache.flink.runtime.taskexecutor.TaskExecutor.registrationTimeout(TaskExecutor.java:1037)
        at org.apache.flink.runtime.taskexecutor.TaskExecutor.lambda$startRegistrationTimeout$3(TaskExecutor.java:1023)
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRunAsync(AkkaRpcActor.java:332)
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:158)
        at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.onReceive(AkkaRpcActor.java:142)
        at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:165)
        at akka.actor.Actor$class.aroundReceive(Actor.scala:502)
        at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:95)
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
        at akka.actor.ActorCell.invoke(ActorCell.scala:495)
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
        at akka.dispatch.Mailbox.run(Mailbox.scala:224)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        ...

查了一些资料, 有改 localhost的, 有 在flink-conf.yaml 添加 taskmanager.host:localhost的, 不过都没解决, 查看了 flink 的 log 日志如上所示, 发现 resourcemanager 问题,无法分配slot之类的问题。

后来 将 jdk 更新才解决。

jdk 更改为 jdk 8u252。 本来用的jdk9。

将IDEA端编写程序用的jdk 与 linux端的 jdk 皆改为 jdk8u252版本(1.8.0_252)。

之后,taskmanagers不再为0 。出现 1,4,4。

在这里插入图片描述



版权声明:本文为liuhehe123原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。