Debugging a running Kubernetes POD

Questions about YourKit Java Profiler
Locked
dlux
Posts: 1
Joined: Tue Sep 10, 2024 7:46 pm

Debugging a running Kubernetes POD

Post by dlux »

Hi,

I am evaluating YourKit and have a java app running in a kubernetes POD (Linux x86_84). It's a very bare bones container running JDK 21:

Code: Select all

daemon@pod:/tmp/1$ /opt/java/openjdk/bin/java --version
openjdk 17.0.12 2024-07-16
OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode, sharing)
How can I debug it from my Mac laptop? I DO NOT want to restart the already running Java VM.

I tried the following, but stuck in all cases:
* Port forward the JMX port from the pod to the laptop and add it as a remote application in YourKit: it connects and does not report any error, but it says that no application is available.
* downloaded the Docker agent .so file to the POD, but I did not find a way to attach it to a running JVM.
* downloaded the whole YourKit binary, extracted it, but profiler.sh complains that there is no DISPLAY variable set.

Any ideas?
Vladimir Kondratyev
Posts: 1654
Joined: Tue Aug 10, 2004 7:52 pm

Re: Debugging a running Kubernetes POD

Post by Vladimir Kondratyev »

Please run your JVM with profiler agent : https://www.yourkit.com/docs/java-profi ... /agent.jsp
or use YourKit Connection Broker https://www.yourkit.com/docs/java-profi ... broker.jsp

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Locked