请教一个K8S上部署的flink集群的问题?-[阿里云_云淘科技]

请教一个K8S上部署的flink集群的问题?taskmanager运行一段时间pod就会error,报错日志是
2023-12-26 03:43:06,179 ERROR org.apache.flink.runtime.taskexecutor.TaskExecutor [] – Fatal error occurred in TaskExecutor akka.tcp://flink@100.73.193.232:6122/user/rpc/taskmanager_0.
org.apache.flink.util.FlinkException: The TaskExecutor’s registration at the ResourceManager akka.tcp://flink@100.65.6.181:6123/user/rpc/resourcemanager_0 has been rejected: Rejected TaskExecutor registration at the ResourceManger because: The ResourceManager does not recognize this TaskExecutor.
at org.apache.flink.runtime.taskexecutor.TaskExecutor$ResourceManagerRegistrationListener.onRegistrationRejection(TaskExecutor.java:2254) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutor$ResourceManagerRegistrationListener.onRegistrationRejection(TaskExecutor.java:2209) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutorToResourceManagerConnection.onRegistrationRejection(TaskExecutorToResourceManagerConnection.java:109) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutorToResourceManagerConnection.onRegistrationRejection(TaskExecutorToResourceManagerConnection.java:40) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.registration.RegisteredRpcConnection.lambda$createNewRegistration$0(RegisteredRpcConnection.java:269) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774) ~[?:1.8.0_312]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750) ~[?:1.8.0_312]
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456) ~[?:1.8.0_312]
at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRunAsync(AkkaRpcActor.java:440) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:208) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:158) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:26) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:21) [flink-dist_2.11-1.13.5.jar:1.13.5]
at scala.PartialFunction$class.applyOrElse(PartialFunction.scala:123) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:21) [flink-dist_2.11-1.13.5.jar:1.13.5]
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:170) [flink-dist_2.11-1.13.5.jar:1.13.5]
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) [flink-dist_2.11-1.13.5.jar:1.13.5]
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.actor.Actor$class.aroundReceive(Actor.scala:517) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:225) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:592) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.actor.ActorCell.invoke(ActorCell.scala:561) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:258) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.Mailbox.run(Mailbox.scala:225) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.Mailbox.exec(Mailbox.scala:235) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [flink-dist_2.11-1.13.5.jar:1.13.5]
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [flink-dist_2.11-1.13.5.jar:1.13.5]
2023-12-26 03:43:06,202 ERROR org.apache.flink.runtime.taskexecutor.TaskManagerRunner [] – Fatal error occurred while executing the TaskManager. Shutting it down…
org.apache.flink.util.FlinkException: The TaskExecutor’s registration at the ResourceManager akka.tcp://flink@100.65.6.181:6123/user/rpc/resourcemanager_0 has been rejected: Rejected TaskExecutor registration at the ResourceManger because: The ResourceManager does not recognize this TaskExecutor.
at org.apache.flink.runtime.taskexecutor.TaskExecutor$ResourceManagerRegistrationListener.onRegistrationRejection(TaskExecutor.java:2254) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutor$ResourceManagerRegistrationListener.onRegistrationRejection(TaskExecutor.java:2209) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutorToResourceManagerConnection.onRegistrationRejection(TaskExecutorToResourceManagerConnection.java:109) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.taskexecutor.TaskExecutorToResourceManagerConnection.onRegistrationRejection(TaskExecutorToResourceManagerConnection.java:40) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at org.apache.flink.runtime.registration.RegisteredRpcConnection.lambda$createNewRegistration$0(RegisteredRpcConnection.java:269) ~[flink-dist_2.11-1.13.5.jar:1.13.5]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774) ~[?:1.8.0_312]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750) ~[?:1.8.0_312]
然后jobmanager中没有报错,只是有拒绝的提示
flink–kubernetes-session-0-flink-cluster-5689c66d9c-92492.log:2023-12-26 03:43:06,114 WARN org.apache.flink.runtime.resourcemanager.active.ActiveResourceManager [] – Discard registration from TaskExecutor flink-cluster-taskmanager-2-4 at (akka.tcp://flink@100.73.193.219:6122/user/rpc/taskmanager_0) because the framework did not recognize it
每次出现这种错误,需要人工干预手动重启jobmanager才能解决,不然任务就不运行了。

以下为热心网友提供的参考意见

根据您提供的错误日志,问题可能是由于TaskManager在ResourceManager中无法识别导致的。为了解决这个问题,您可以尝试以下方法:

  1. 检查TaskManager和ResourceManager之间的网络连接是否正常。确保它们可以互相通信。

  2. 检查TaskManager的配置文件(如flink-conf.yaml),确保其中的taskmanager.rpc.addressresourcemanager.rpc.address设置正确。这些地址应该与ResourceManager的地址相匹配。

  3. 检查Kubernetes集群中的Service资源,确保它们的名称和标签与TaskManager和ResourceManager的配置相匹配。例如,TaskManager的Service名称应该是flink-cluster-taskmanager-,而ResourceManager的Service名称应该是flink-cluster-resourcemanager

  4. 如果问题仍然存在,您可以尝试升级Flink和Kubernetes集群到最新版本,以确保兼容性和稳定性。

  5. 如果以上方法都无法解决问题,您可以考虑在Flink社区或相关论坛寻求帮助,提供更多关于您的环境和配置的详细信息。

以下为热心网友提供的参考意见

重启了吧,因为某些原因重启了 然后没有注册到flink集群中 请教一个K8S上部署的flink集群的问题?-[阿里云_云淘科技]
https://blog.csdn.net/qq_21383435/article/details/123262747 ,此回答整理自钉群“【②群】Apache Flink China社区”

本文来自投稿,不代表新手站长_郑州云淘科技有限公司立场,如若转载,请注明出处:https://www.cnzhanzhang.com/19776.html

(0)
匿名
上一篇 2024年1月4日
下一篇 2024年1月4日

相关推荐

新手站长从“心”出发,感谢16年您始终不离不弃。