I am currently trying to connect to one of our applications running in a kubernetes pod. JProfiler 13 introduced the ability to accomplish this quite easily by "Attatch to a running JVM -> on kubernetes pod".
However, after i select my pod & jvm that i want to profile, all views end up being empty with my mouse being a loading symbol when hovering over them. When enabling cpu profiling the words "expecting data, please wait" appear, but no data ever arrives.
Observations:
- The agent libraries are successfully unpacked in the pod filesystem
- The application i want to profile is not hung up, i can still use the webservices it provides.
- When detatching from the jvm again, i cannot reconnect to the jvm because "Only one Jprofiler GUI can be connected at the same time". Thus i have to restart my entire pod.
- jprofiler does seem to connect successfully to the jvm:
JProfiler> Java 8 detected.
JProfiler> 64-bit library (musl)
JProfiler> Listening locally on port: 40293.
JProfiler> Enabling native methods instrumentation.
JProfiler> Can retransform classes.
JProfiler> Can retransform any class.
JProfiler> Retransforming 16 base class files.
JProfiler> Base classes instrumented.
JProfiler> Native library initialized
JProfiler> Using sampling (5 ms)
JProfiler> Time measurement: elapsed time
JProfiler> CPU profiling enabled
JProfiler> Initializing configuration.
JProfiler> Retransforming 159 class files.
JProfiler> Configuration updated.
- In the jprofiler connection wizard, in the view "connect to a running JVM", i can choose to do a heap dump instead of actually connectiong to one, this works flawlessy.
Ideas:
- The root filesystem of my pod is configured to be readonly. For jprofiler to work this far I had to make some paths writable. /home/user (where my agent libraries are put), and /tmp/. Do i have to adjust more paths?
Any hints are appreciated, thank you.