Pankaj
Pankaj

Reputation: 21

Remote debugging Flink local cluster

I want to deploy my jobs on a local Flink cluster during development (i.e. JobManager and TaskManager running on my development laptop), and use remote debugging. I tried adding "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" to the flink-conf.yaml file. Since job and task manager are running on the same machine, the task manager throws exception stating that the socket is already in use and terminates. Is there any way I can get this running.

Upvotes: 0

Views: 1529

Answers (1)

David Anderson
David Anderson

Reputation: 43419

You are probably setting env.java.opts, which affects all JVMs started by Flink. Since the jobmanager gets started first, it grabs the port before the taskmanager is started.

You can use env.java.opts.taskmanager to pass parameters only for taskmanager JVMs.

Upvotes: 1

Related Questions