Jon Kelley
02/14/2024, 9:22 PMapache/flink:1.18.1 in kubernetes have most things in place. But when the flink-taskmanager tries to talk to jobmanager it gets Could not resolve ResourceManager address pekko.tcp://flink@flink-jobmanager:6123/user/rpc/resourcemanager_*, retrying in 10000 ms: Could not connect to rpc endpoint under address pekko.tcp://flink@flink-jobmanager:6123/user/rpc/resourcemanager_*.
The jobmanager is available to fask-taskmanager because I can curl jobmanager from taskmanager, example:
flink-taskmanager-56474f6655-gpsk5:/opt/flink$ curl flink-jobmanager:8081
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
I check the logs of flink-taskmanager
it gets these configs and binds to 0.0.0.06123
2024-02-14 21:10:04,047 INFO org.apache.flink.configuration.GlobalConfiguration [] - Loading configuration property: jobmanager.rpc.address, flink-jobmanager
2024-02-14 21:10:04,048 INFO org.apache.flink.configuration.GlobalConfiguration [] - Loading configuration property: rest.address, flink-jobmanager
2024-02-14 21:41:55,870 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcServiceUtils [] - Trying to start actor system, external address flink-jobmanager:6123, bind address 0.0.0.0:6123.
Later in logs of taskmanager, I see it is receives then drops messages from jobmanager:
2024-02-14 21:17:35,592 ERROR akka.remote.EndpointWriter [] - dropping message [class akka.actor.ActorSelectionMessage] for non-local recipient [Actor[pekko.tcp://flink@flink-jobmanager:6123/]] arriving at [pekko.tcp://flink@flink-jobmanager:6123] inbound addresses are [akka.tcp://flink@flink-jobmanager:6123]
How can I configure taskmanager to accept connections from an external jobmanager pod? Appears like it blocks non localhost connections?Tim Wolfe
02/24/2024, 8:42 PMjobmanager.rpc.address configuration in your TaskManager's configuration points to the correct JobManager service name within Kubernetes. It appears that your configuration is correct, but you might be facing an issue related to Akka's remote communication setup.
The error message you're seeing suggests that the TaskManager is unable to establish an RPC connection with the JobManager due to an Akka configuration issue. The use of pekko.tcp in the error message indicates a possible misconfiguration in the Akka setup.
Here are a few steps you can take to troubleshoot and resolve the issue:
1. Verify Network Policies: Ensure that Kubernetes network policies (if any are in place) allow traffic between the TaskManager and JobManager pods on the required ports.
2. Check Service Discovery: Confirm that the flink-jobmanager Kubernetes service is correctly configured to route traffic to the JobManager pod, and that DNS resolution is working as expected within the cluster.
3. Akka Configuration: The akka.remote configuration in Flink might need to be adjusted to allow for communication between different hosts. This can involve setting the akka.remote.netty.tcp.hostname and akka.remote.netty.tcp.port properties to ensure that Akka listens on the correct interface and port.
4. Logs and Diagnostics: Review the logs of both the JobManager and TaskManager for any additional error messages or warnings that could provide more context on the communication issue.
5. Documentation and Examples: Revisit the Flink documentation and any Kubernetes deployment examples provided by the Flink community to ensure that your configuration aligns with best practices.Maxim Senin
03/25/2024, 5:40 PMSachin Gupta
04/03/2024, 5:06 PMJon Kelley
04/03/2024, 5:08 PM