From 64009ee03fed251ca4f4d3259ae07a2eee7e25ba Mon Sep 17 00:00:00 2001 From: hengyunabc Date: Thu, 14 Jan 2021 15:37:34 +0800 Subject: [PATCH] update faq --- site/src/site/sphinx/en/faq.md | 7 +++++++ site/src/site/sphinx/faq.md | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/site/src/site/sphinx/en/faq.md b/site/src/site/sphinx/en/faq.md index cb9f8beb5..907231bb5 100644 --- a/site/src/site/sphinx/en/faq.md +++ b/site/src/site/sphinx/en/faq.md @@ -8,6 +8,13 @@ [https://github.com/alibaba/arthas/issues/44](https://github.com/alibaba/arthas/issues/44) +#### com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded + +1. Check whether the current user and the target java process are consistent. If they are inconsistent, switch to the same user. JVM can only attach java processes under the same user. +2. Try to use `jstack -l $pid`. If the process does not respond, it means that the process may freeze and fail to respond to the JVM attach signal. So Arthas based on the attach mechanism cannot work. Try to use `jmap` heapdump to analyze. +3. Try to attach arthas-demo in [quick-start](quick-start.md). + + ##### Can commands such as trace/watch enhance the classes in jdk? By default, classes beginning with `java.` are filtered out, but they can be turned on: diff --git a/site/src/site/sphinx/faq.md b/site/src/site/sphinx/faq.md index 4462e545d..5484de71d 100644 --- a/site/src/site/sphinx/faq.md +++ b/site/src/site/sphinx/faq.md @@ -9,6 +9,11 @@ [https://github.com/alibaba/arthas/issues/44](https://github.com/alibaba/arthas/issues/44) +#### com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded + +1. 检查当前用户和目标java进程是否一致。如果不一致,则切换到同一用户。JVM只能attach同样用户下的java 进程。 +2. 尝试使用 `jstack -l $pid`,如果进程没有反应,则说明进程可能假死,无法响应JVM attach信号。所以同样基于attach机制的Arthas无法工作。尝试使用`jmap` heapdump后分析。 +3. 尝试按[quick-start](quick-start.md)里的方式attach arthas-demo。 ##### trace/watch等命令能否增强jdk里的类? 默认情况下会过滤掉`java.`开头的类,但可以通过参数开启。