:wave: I am using flink in my dev environment with...
# troubleshooting
j
👋 I am using flink in my dev environment with Docker Compose and running into difficult getting the task manager container successfully registered with the job manager. I began with the exact docker-compose configuration found in the docs:
Copy code
version: "2.2"
services:
  jobmanager:
    image: flink:latest
    ports:
      - "8081:8081"
    command: jobmanager
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: jobmanager        

  taskmanager:
    image: flink:latest
    depends_on:
      - jobmanager
    command: taskmanager
    scale: 1
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: jobmanager
        taskmanager.numberOfTaskSlots: 2
Which works! 👏 🍺 🌈 But for my purposes, I would like to rename the
jobmanager
and
taskmanager
docker services to be less general:
flink_jobmanager
&
flink_taskmanager
, respectively. I’ve discovered this breaks the setup, and I’m struggling to fix it. More details in the 🧵 👇
With the updated service names, the task manager has the following exception:
flink_taskmanager-1  | Caused by: java.lang.Exception: Could not retrieve InetSocketAddress from Pekko URL pekko.tcp://flink@flink_jobmanager:6123/user/rpc/resourcemanager_*
My first thought was to also update the flink_task_manager ‘s jobmanager.rpc.address to flink_jobmanager so it would resolve to the flink_job_manager container in the network. But that results in this:
Copy code
flink_taskmanager-1  | Caused by: java.lang.Exception: Could not retrieve InetSocketAddress from Pekko URL pekko.tcp://flink@flink_jobmanager:6123/user/rpc/resourcemanager_*
flink_taskmanager-1  |  at org.apache.flink.runtime.rpc.pekko.PekkoUtils.getInetSocketAddressFromRpcURL(PekkoUtils.java:567) ~[?:?]
If anyone has insight or a good next step for reading/debugging, I’d appreciate it!
g
I know it’s not very helpful but if Kubernetes is also an option I highly recommend the Flink Kubernetes Operator: https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/
j
It would be because of
_
that makes a mess. When I changed into
-
, it works fine for me. Here is the compose file.
Copy code
version: "2.2"
services:
  flink-jobmanager:
    image: flink:latest
    ports:
      - "8081:8081"
    command: jobmanager
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: flink-jobmanager
  flink-taskmanager:
    image: flink:latest
    depends_on:
      - flink-jobmanager
    command: taskmanager
    scale: 1
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: flink-jobmanager
        taskmanager.numberOfTaskSlots: 2
j
That does work! Thanks…wow. I didn’t even think to consider
_
being an issue (I don’t know why it would be). But I’m happy to use a
-
and move on!
👍 1
j
I guess it is because underscore is not accepted in a URL.
😌 1
m
Flink job deployment makes sense but honnestly the session deployment seems weired, unless for producing pocs I dont see how it is useful , you cant use configmap or secrets on the deployment of the session job so you will need to create a jar with all your configs to be able to use it