Getting "Unable to open socket file" message when executing jstack / jmap / jcmd and unable to generate a thread dump / heap dump
Issue
-
Got the following
"Unable to open socket file: target process not responding or HotSpot VM not loaded"
when executingjstack
command and unable to generate a thread dump:[root@myhost /tmp]# jstack -l <JAVA_PID> <JAVA_PID>: Unable to open socket file: target process not responding or HotSpot VM not loaded The -F option can be used when the target process is not responding
-
Got the following
"Unable to open socket file: target process not responding or HotSpot VM not loaded"
when executingjmap
command and unable to generate a heap dump:[root@myhost /tmp]# jmap -dump:format=b,file=heap.hprof <JAVA_PID> <JAVA_PID>: Unable to open socket file: target process not responding or HotSpot VM not loaded The -F option can be used when the target process is not responding
-
Same error was thrown when executing
jcmd <JAVA_PID> GC.heap_dump -all=true FILENAME.hprof
- Got the above message when executing
jmap -histo:live <PID>
command.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- JDK
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.