You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a bit of effort I'm able to connect visualVM to a java process running on kubernets, by forwarding the jmx port and using a configuration like below for starting my java process
And then I tried forwarding that port similar to above. And then I try to right click Local and addJStatD from the menu. But suprise, it doesn't work.
So I went down a rabbit hole trying to figure out why it didn't work. And I read elsewhere it did not work because jstatd really opens up 3 ports when it starts. And supposedly there were hacks to resolve this.
So I took the latest hack and built a release for it (long story). https://github.com/apple-corps/alt-jstatsd-build-image . Now I could try to run this hack'd jstatd binary and set and forward all the ports hoping that VVM would connect. And did it work, it did not :(
The problem with jstatd opening additional random port for communication is already addresses in JDK. See https://bugs.openjdk.org/browse/JDK-8196729 . So with this fix, it should be possible to use jstatd in kubernetes.
With a bit of effort I'm able to connect visualVM to a java process running on kubernets, by forwarding the jmx port and using a configuration like below for starting my java process
Then I port forward 9010 to my localhost via kubectl and add
localhost:9010
as a JMX host in VVM and Magic , it works!Underneath
Local
, my k8s PID appears with visual statistics!However, I really wanted to use VVM to observe GC stats on the device. So I added the VGC plugin. But I get the
Not supported for this JVM
whenSo I started
jstatd
on the server likeAnd then I tried forwarding that port similar to above. And then I try to right click Local and addJStatD from the menu. But suprise, it doesn't work.
So I went down a rabbit hole trying to figure out why it didn't work. And I read elsewhere it did not work because jstatd really opens up 3 ports when it starts. And supposedly there were hacks to resolve this.
So I took the latest hack and built a release for it (long story). https://github.com/apple-corps/alt-jstatsd-build-image . Now I could try to run this hack'd jstatd binary and set and forward all the ports hoping that VVM would connect. And did it work, it did not :(
For completeness sake, here's how I ran the hack
And then through the logging I did see the following below in the jstatd log created by logCalls.
Regardless I guess I'm explaining my ignorance on why it doesn't work.
Describe the solution you'd like
If I'm able to connect to VVM via JMX as above, I'd similarly like to get the VGC stats.
The text was updated successfully, but these errors were encountered: