Frage

I am trying to open a local java app for profiling with VisualVM but it has suddenly stopped working since I last used it a week ago, I can see the programs in the applications box but if I try to open my program launched from the cmd line or any other java program like eclipse it will just hang with the status bar saying opening. If it try to select another VM to open while it is trying to open my own app, visualVM will lock up.

Note that I can open and profile the visualVM JVM but not any other,

I haven't changed any settings other than performing general OS updates including the kernel. I have made sure my /tmp/hsperfdata_myusername is accessable and I can see file numbers matching the process pid created in the folder when I launch visual VM, eclipse or my own java program from the command line. I tried launching my own program and visualvm as root and trying it but it made no difference. I have deleted my .visualvm folder to clear any issues but it did't work and the log file for visualvm does not mention any errors.

I'm runnning fedora 19 with java 7_u45-b18.

when I launch visual vm a port is opened TCP localhost6.localdomain6:35138 (LISTEN)

If I open my own app or eclipse and leave it for 10 minuites it will finally connect (used to be instantly ), however CPU profiling and GC commands are disabled which is what I want.

I know you need to specify JMX ports for remote connections but this is all local so I can't see why it has suddenly gone tits up!

Any Help would be most welcome.

War es hilfreich?

Lösung

Go to Run Configurations -> Arguments -> VM Arguments and add below argument if you want to profile local process: -Djava.rmi.server.hostname=localhost

Andere Tipps

One way to investigate your problem is to get the log of JVisualVM by passing JVM option to command jvisualvm

https://hoangx281283.wordpress.com/2014/04/16/getting-log-of-jvisualvm/

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top