Hi, I want to run `apache/flink:1.18.1` in kubern...
# troubleshooting
j
Hi, I want to run
apache/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:
Copy code
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
Copy code
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:
Copy code
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?
t
To enable the TaskManager to accept connections from the JobManager in Kubernetes, you need to ensure that the
jobmanager.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.
m
@Jon Kelley Did you solve it?
s
We are also facing same issue @Jon Kelley did you find the solution for the issue
j
We decided to not migrate to Flink because of our issues, due to the lack of clarity around k8s we went a different direction.