Skip to content

Commit 2f5ab94

Browse files
committed
update faq.md
1 parent 57d8b62 commit 2f5ab94

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

site/docs/doc/faq.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,28 @@
88

99
日志文件路径: `~/logs/arthas/arthas.log`
1010

11+
12+
### telnet: connect to address 127.0.0.1: Connection refused
13+
14+
1. 检查日志 `~/logs/arthas/arthas.log`
15+
2. 检查`as.sh`/`arthas-boot.jar` 的启动参数,是否指定了特定的`port`
16+
3.`netstat` 检查`LISTEN 3658` 端口的进程,确认它是`java`进程,并且是想要诊断的进程
17+
4. 如果`LISTEN 3658` 端口的进程不是 `java` 进程,则`3658`端口已经被占用。需要在`as.sh`/`arthas-boot.jar` 的启动参数指定其它端口。
18+
5. 确认进程和端口后,尝试用`telnet 127.0.0.1 3658`去连接
19+
20+
21+
本质上`arthas`会在应用java进程内启动一个`tcp server`,然后使用`telnet`去连接它。
22+
23+
1. 可能端口不匹配
24+
2. 可能进程本身已经挂起,不能接受新连接
25+
26+
27+
如果Arthas 日志里有 `Arthas server already bind.`
28+
29+
1. 说明`Arthas server`曾经启动过,检查目标进程打开的文件描述符。如果是`linux`环境,可以去 `/proc/$pid/fd` 下面,使用`ls -alh | grep arthas`,检查进程是否已加载`arthas`相关的 jar 包。
30+
2. 如果没有,那么可能已启动`arthas`的是其它进程,也可能应用已经重启过了。
31+
32+
1133
### Arthas attach 之后对原进程性能有多大的影响
1234

1335
[https://github.com/alibaba/arthas/issues/44](https://github.com/alibaba/arthas/issues/44)

site/docs/en/doc/faq.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,25 @@ For questions that are not in this list, please search in issues. [https://githu
88

99
Log file path: `~/logs/arthas/arthas.log`
1010

11+
12+
### telnet: connect to address 127.0.0.1: Connection refused
13+
14+
1. Check the log `~/logs/arthas/arthas.log`
15+
2. Check the startup parameters of `as.sh`/`arthas-boot.jar`, whether a specific `port` is specified
16+
3. Use `netstat` to check the process of `LISTEN 3658` port, confirm it is a `java` process, and it is the process you want to diagnose
17+
4. If the process of `LISTEN 3658` port is not a `java` process, then the `3658` port is already occupied. You need to specify other ports in the startup parameters of `as.sh`/`arthas-boot.jar`.
18+
5. After confirming the process and port, try to connect with `telnet 127.0.0.1 3658`
19+
20+
Essentially, `arthas` will start a `tcp server` within the application java process, and then use `telnet` to connect to it.
21+
22+
1. The port may not match
23+
2. The process itself may have been suspended and cannot accept new connections
24+
25+
If there is `Arthas server already bind.` in the Arthas log
26+
27+
1. It means that the `Arthas server` has been started before, check the file descriptors opened by the target process. If it is a `linux` environment, you can go to `/proc/$pid/fd`, use `ls -alh | grep arthas` to check whether the process has loaded the `arthas` related jar package.
28+
2. If not, it may be that other processes have started `arthas`, or the application has been restarted.
29+
1130
### How much impact does Arthas attach have on the performance of the original process?
1231

1332
[https://github.com/alibaba/arthas/issues/44](https://github.com/alibaba/arthas/issues/44)

0 commit comments

Comments
 (0)