Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I experienced this same issue. </p> <p>Exception in thread "main" com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded</p> <p>The solution was found doing some heavy googling.</p> <p>First answer came <a href="http://www.jvmmonitor.org/doc/index.html">http://www.jvmmonitor.org/doc/index.html</a> . Appears there is a bug:</p> <blockquote> <p>If you see the additional message "Unable to open socket file: target process not responding or Hotspot VM not loaded", either your application didn't respond creating a socket file like /tmp/.java_pid1234 (e.g. due to hangup, file system permission), or JVM Monitor was not able to find the created socket file (e.g. due to the bug 7009828).</p> </blockquote> <p>Then after some more searching I found a conversation on github for another tool which had the same symptom "Unable to open socket file" (https://github.com/rhuss/jolokia/issues/34):</p> <blockquote> <p>jgreen: Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded </p> <p>jgreen: right I have it working but only when lauching as the exact same user as activemq. root does not work</p> </blockquote> <p>This last piece was the solution. The only way this .attach call would be successful was through running the java code that calls attach as the <strong>same</strong> user as the one who owned the process running the jvm. In my case it was the activemq user.</p> <pre><code>System.out.println("HEAP: " + ManagementFactory.getMemoryMXBean().getHeapMemoryUsage()); HEAP: init = 27127296(26491K) used = 3974200(3881K) committed = 26345472(25728K) max = 675086336(659264K) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload