I'm trying to profile tomcat server with visualvm.
In sampler tab I get
Memory sampling: Not available. Failed to read objects in target application. Check the logfile for details (use Help | About | Logfile).
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
Caused: java.io.IOException: Unable to open socket file: target process not responding or HotSpot VM not loaded
This problem occured after upgrade form jdk6 update 22 to update24.
In update 22 solution was using the same user to run visualvm and tomcat, but in update 24 it does not solve the problem.
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
jvisualvm (on unix/linux) uses a local file to establish communication to the process. i think the attach api tries to generate a file in the current dir of the process or the temp directory. i've had connection problems when the permissions on the these directories were problematic. i can't necessarily say what is "required" because it was kind of trial and error, but (assuming you are running both processes as the same user) i'd check out the filesystems next for permission problems.