7

when I use jVisualVM, I see two local processes: VisualVM itself and the process I am interested in let's call it ProcessX. When I doubleClick the VisualVM process, everything works fine. When I doubleclick ProcessX, the application is stuck and doesn't correspond anymore. I use eclipse to run my java application, and I have a stand-alone version of jVisualVM on a Windows x64 box. I run jVisualVM from "C:\Program Files\Java\jdk1.7.0_51\bin". Setting the Proxy to "No Proxy" in the VisualVM menu didn't help me either

Community
  • 1
  • 1
Vjeetje
  • 5,314
  • 5
  • 35
  • 57

2 Answers2

9

There can often be a DNS resolution issue if the process you're trying to connect to using VisualVM is running on localhost. If that's the case, try adding the following system property to the process you're trying to connect to:

 -Djava.rmi.server.hostname=localhost

See also: https://stackoverflow.com/a/6782309/80144 and Has anyone ever got a remote JMX JConsole to work?

Community
  • 1
  • 1
Lyle
  • 3,724
  • 3
  • 25
  • 25
0

I had absolutely the same problem and I hope my solution will help someone else.

The problem and solution: My system is x64, but I ran Intellij Idea file "idea.exe" (this is default exe file. And it's for x32 system) and I ran Java app from IDE. jVisualVM couldn't connect to it, because I installed x64 jdk. When I realize my mistake and run idea64.exe - the problem was resolved. I can open any java process that I run from IDE.

So if you have x64 system - download and run proper version of eclipse.

Kiryl
  • 171
  • 1
  • 1
  • 3