jmap Unable to open socket file解决


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产生过程。

 

posted @ 2019-05-29 14:40  vsop_479  阅读(12382)  评论(0编辑  收藏  举报