java - why jstack not working when the /tmp/.java_pid<num> socket file has been deleted -
usually, use jstack check if java process working normally. while found, when /tmp/java_pid<num>
(the num pid of java process) socket file has been deleted, jstack not work. this:
[xxx]$ jstack -l 5509 5509: unable open socket file: target process not responding or hotspot vm not loaded -f option can used when target process not responding
(ps. didn't want use "-f", there may other problems)
is there way change socket file location(not /tmp)? or generate socket file again when found not existed? did restart java process again, bad solution.
thanks!
/tmp/.java_pid
socket used hotspot dynamic attach mechanism. way how jstack
, other utilities communicate jvm.
you cannot change path - hardcoded in jvm source code. neither can force jvm regenerate it, because attach listener initialized once in hotspot lifetime.
jstack -f
works in quite different way.
in order check whether java process works fine, suggest using jmx remote.
Comments
Post a Comment