Flink:TaskManager无法连接到JobManager -无法解析资源管理器地址

hmae6n7t  于 2023-02-01  发布在  Apache
关注(0)|答案(1)|浏览(740)

我正在使用ApacheFlinkKubernetes操作符在应用程序集群设置上部署一个独立作业。
我使用Flink官方文档-Link设置了以下文件

  1. jobmanager-application-non-ha.yaml
  2. taskmanager-job-deployment.yaml
  3. flink-configuration-configmap.yaml
  4. jobmanager-service.yaml
    我没有更改这些文件中的任何配置,并且尝试使用Apache Flink操作符从Flink示例运行一个简单的WordCount示例。
    运行kubectl命令设置作业管理器和任务管理器后,作业管理器进入NotReady状态,而任务管理器进入CrashLoopBackOff循环。
NAME                                         READY   STATUS             RESTARTS        AGE
flink-jobmanager-28k4b                       1/2     NotReady           2 (4m24s ago)   16m
flink-kubernetes-operator-6585dddd97-9hjp4   2/2     Running            0               10d
flink-taskmanager-6bb88468d7-ggx8t           1/2     CrashLoopBackOff   9 (2m21s ago)   15m

作业管理器日志如下

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:86) ~[flink-dist-1.16.0.jar:1.16.0]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
    at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
    at org.apache.flink.runtime.rpc.akka.AkkaRpcActor.lambda$handleRunAsync$4(AkkaRpcActor.java:453) ~[flink-rpc-akka_be40712e-8b2e-47cd-baaf-f0149cf2604d.jar:1.16.0]
    at org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:68) ~[flink-rpc-akka_be40712e-8b2e-47cd-baaf-f0149cf2604d.jar:1.16.0]

任务管理器似乎无法连接到作业管理器

2023-01-28 19:21:47,647 INFO  org.apache.flink.runtime.taskexecutor.TaskExecutor           [] - Connecting to ResourceManager akka.tcp://flink@flink-jobmanager:6123/user/rpc/resourcemanager_*(00000000000000000000000000000000).
2023-01-28 19:21:57,766 INFO  org.apache.flink.runtime.taskexecutor.TaskExecutor           [] - Could not resolve ResourceManager address akka.tcp://flink@flink-jobmanager:6123/user/rpc/resourcemanager_*, retrying in 10000 ms: Could not connect to rpc endpoint under address akka.tcp://flink@flink-jobmanager:6123/user/rpc/resourcemanager_*.
2023-01-28 19:22:08,036 INFO  akka.remote.transport.ProtocolStateActor                     [] - No response from remote for outbound association. Associate timed out after [20000 ms].
2023-01-28 19:22:08,057 WARN  akka.remote.ReliableDeliverySupervisor                       [] - Association with remote system [akka.tcp://flink@flink-jobmanager:6123] has failed, address is now gated for [50] ms. Reason: [Association failed with [akka.tcp://flink@flink-jobmanager:6123]] Caused by: [No response from remote for outbound association. Associate timed out after [20000 ms].]
2023-01-28 19:22:08,069 INFO  org.apache.flink.runtime.taskexecutor.TaskExecutor           [] - Could not resolve ResourceManager address akka.tcp://flink@flink-jobmanager:6123/user/rpc/resourcemanager_*, retrying in 10000 ms: Could not connect to rpc endpoint under address akka.tcp://flink@flink-jobmanager:6123/user/rpc/resourcemanager_*.
2023-01-28 19:22:08,308 WARN  akka.remote.transport.netty.NettyTransport                   [] - Remote connection to [null] failed with org.jboss.netty.channel.ConnectTimeoutException: connection timed out: flink-jobmanager/100.127.18.9:6123

yaml看起来像这样

flink-conf.yaml: |+
    jobmanager.rpc.address: flink-jobmanager
    taskmanager.numberOfTaskSlots: 2
    blob.server.port: 6124
    jobmanager.rpc.port: 6123
    taskmanager.rpc.port: 6122
    queryable-state.proxy.ports: 6125
    jobmanager.memory.process.size: 1600m
    taskmanager.memory.process.size: 1728m
    parallelism.default: 2

下面是pom.xml的外观-Link

pkln4tw6

pkln4tw61#

您在名称空间中部署了Kubernetes Operator,但没有创建Operator所需的CRD,而是尝试创建一个独立的Flink Kubernetes集群。
Flink Operator使部署Flink作业变得更加容易,您只需要部署Operator本身和FlinkDeployment/FlinkSessionJob CRD。之后,Operator将管理您的部署。
请将此文档用于Kubernetes运算符:Link

相关问题