VisualVM “not supported for this JVM” on all local applications?

前端 未结 14 2318
故里飘歌
故里飘歌 2020-12-16 09:05

I have already spent a long time to load and test my application, now I need to profile it. But unluckily, the VisualVM always says \"not supported for this JVM\" on my loca

相关标签:
14条回答
  • 2020-12-16 09:41

    For me, the reason is that I have run the "jstatd" with a different user with the JVM process. I have a special user in the linux to start the JVM thread(it is a tomcat), but I start the jstatd process with root. If you use root to run jps, you cannot see any information of the JVM threads belonging to other users. That is the trouble. I killed the "jstatd" process started by root, su to the owner of the JVM process, and restart the "jstatd" process and everything wokrs fine now.

    0 讨论(0)
  • 2020-12-16 09:42

    An issue that I just found, thanks to the hint from @user3356656, is that if you start the program while your machine is on one IP, and then try to connect while it is on a different IP, it will fail.

    0 讨论(0)
  • 2020-12-16 09:42

    I can reproduce next behaviour. I have a java application with right-click menu item to open jvisualvm. I'm running this java application as standalone setup from a bat file. It means I modify %path% and other needed environment variables like JDK accordingly to form my environment. The BAT that starts application is marked running as non-admin. Environment points to a 64-bit JDK. Then I start other java application as admin. VM lives from the to same 64-bit JDK-source. Then I start jvisualvm from first app with the right click ie.as non-admin. I can see the app in jvisualvm ‘Applications list’ but clickin ‘System properties’ gives error. Message is “Not supported for this JVM”. JVM arguments are exposed.

    Solution is like in some other previous comments: Starting my right-click jvisualvm-starter as admin I can see also "system properties" . Certainly if JDKs would be 32-bit and other 64-bit it would not work. been there.

    I thought this notion needs to be added here.

    0 讨论(0)
  • 2020-12-16 09:43

    VisualVM needs to be run with the same JVM - at least Java 6 with the same 32-bit/64-bit size - as the program to be profiled. (You also need to be the same user, but then this message does not apply).

    I would be triple-check that it was the exact same JVM in your situation.

    0 讨论(0)
  • 2020-12-16 09:43

    I also met this issue. My case is that on linux, I started tomcat with tomcat_user but I run jvisualvm with root user. It works after I start tomcat with root user.

    0 讨论(0)
  • 2020-12-16 09:44

    As you can see, you are running VisualVM on 32bit JVM

    You don't need to unistall 32bit JVM. Just tell VisualVM to use tour 64bit JVM.

    If you want to change it permanently, you can edit

    in visualvm_13\etc\visualvm.conf and specify the path of jvm here

    0 讨论(0)
提交回复
热议问题