pid:Unable to open socket file: target process not responding or HotSport VM not loaded
The -F option can be used when the target process is not responding.
解決辦法:
切換到進程用戶 & cd 到進程用戶文件夾下。
第一次jmap,jstack后會在/tmp下創建socket文件,
centos 7,tmp下的文件會被systemd-tmpfiles --clean過期刪除(默認10天),刪除后就會報Unable to open socket file。
/usr/lib/tmpfiles.d/tmp.conf中添加 x /tmp/.java*,排除對java socket的刪除。
strace 查看Unable to open socket file產生過程。