VisualVM: CPU/Memory profiler stuck at "Connecting to the target JVM..."
Asked Answered
S

2

42

I have recently reinstalled Windows and I am using JDK 1.8 u91 with the built-in VisualVM. I have checked my proxy settings to ensure that they are all off, both in Windows proxy settings and within the proxy settings of VisualVM.

I have also tried reinstalling JDK, restarting computer, reinstalling Windows. I only have one JDK installed and the classpath is set to the JDK's bin folder in Windows.

All features besides CPU and memory profiling work in VisualVM. My application is ran from IntelliJ, but I have also tried running applications regularly from command line and VisualVM cannot connect to those either.

I have also tried downloading VisualVM off http://visualvm.java.net which also does not work.

I have no plugins installed.

Why does it hang? Is this is a bug introduced with the new JDK?

Shotten answered 4/6, 2016 at 16:55 Comment(2)
Seriously oracle can you please fix this -.-Belicia
Same problem here: Windows 10 Pro, JDK-8.102 64.Recrystallize
T
55

See this bug report - VISUALVM-637

Solution: start JVisualVM using below command :

jvisualvm.exe -J-Dorg.netbeans.profiler.separateConsole=true

I've checked this (and it works !) at Windows 10 X64 with java version "1.8.0_102"

Thicken answered 30/9, 2016 at 3:51 Comment(7)
This worked for me after hours of trying all other options and combos of those other option. thanks ievgenLunik
made it work for me too, using jvisualvm of JDK 1.8.0_92 on Windows 7Imide
this is working for me. I use visualvm.exe from the plugin in IntelliJ. I added the argument above into the \jdk1.8.0_121\lib\visualvm\etc\visualvm.conf file. Thanks for this.Lunik
Worked for me too. Windows 10 with the x63 version of jdk1.8.0_102.Treviso
Worked for me, too. I started my Spring Boot app in IntelliJ as normal, opened an Admin CMD prompt and executed jvisualvm.exe -J-Dorg.netbeans.profiler.separateConsole=true and all is good.Resurrectionist
Doing jvisualvm.exe -J-Dorg.netbeans.profiler.separateConsole=true solved the problem as stated, but I then ran into the error referred to in #26835151 ; see that link for the solution.Tungus
Sorry but the link to the bug report leads to a dead end. Can you provide another source or a brief description of this bug?Goodoh
W
4

Try starting the (local) application to observe with additional:

-Djava.rmi.server.hostname=localhost
Weakling answered 23/9, 2016 at 14:52 Comment(1)
This was sufficient to let me connect with Java 14 on Linux.Nealneala

© 2022 - 2024 — McMap. All rights reserved.