Why isn't VisualVM showing all the normal tabs

2020-02-24 09:01发布

Usually I see all these tabs in VisualVM for locally running Java programs:

enter image description here

However, I have one local program which is currently only showing me Overview and Monitor (even though it usually shows all those shown above):

enter image description here

Also interesting is that VisualVM itself doesn't present the Profile tab:

enter image description here

All three of the programs shown are running with the same JVM with the same Java Home.

What controls which tabs are shown for a particular program? How can I get them all back for my program showing just Overview and Monitor?

I have Visual VM 1.3.5 (latest at this date) and JDK 1.7.0_17.

7条回答
爱情/是我丢掉的垃圾
2楼-- · 2020-02-24 09:29

You might need to enable jmx ports on your app. Try adding these switches to your VM and see if the tabs appear again:

-Dcom.sun.management.jmxremote.port=6789 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false

查看更多
Emotional °昔
3楼-- · 2020-02-24 09:29

Check that proxy is disabled if you are running VisualVM for local application

查看更多
叛逆
4楼-- · 2020-02-24 09:32

I just remove ~/.visualvm and rerun, See https://java.net/jira/browse/VISUALVM-598

查看更多
萌系小妹纸
5楼-- · 2020-02-24 09:41

I had a similar problem with missing profiler tab in VisualVM. I'm using Oracle JDK 1.8 and want to profile web application running on Tomcat 8 (JPA, Spring, Hibernate, Vaadin, etc).

I tried all above-mentioned solutions and many others found on the internet, but unfortunately, none of them solved missing profiler tab issue.

So I switched to Java Mission Control profiling tool (JMC + Flight Recorder) which is a part of standard Oracle JDK (from JDK 1.7 update 40) and it works great.

查看更多
闹够了就滚
6楼-- · 2020-02-24 09:42

In my case, the issue was the usage of wrong JDK version. My App was running on jdk1.7.0_80, VisualVm running with jdk1.8.0_162. Replacing the APP JDK version from 1.7.0_79 to 1.7.0_80 fixes the problem.

查看更多
你好瞎i
7楼-- · 2020-02-24 09:48

I found that this was the issue of usage of wrong JDK version. In my case my application was running on 64bit JDK and I started VisualVM from 32bit JDK. After starting VisualVM from the same JDK on which my application is running, everything was fine. Hope it will help you.

查看更多
登录 后发表回答