通过下发命令的方式启动arthas,启动进程卡住不动
- Dominant language
- Java
- Stars
- 37.6k
- Forks
- 7.6k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 4
Description
- [ ] 我已经在 [issues](https://github.com/alibaba/arthas/issues) 里搜索,没有重复的issue。
### 环境信息
* `arthas-boot.jar` 或者 `as.sh` 的版本: 4.0.5
* Arthas 版本: 4.0.5
* 操作系统版本: linux
* 目标进程的JVM版本: openjdk version "1.8.0_412"
* 执行`arthas-boot`的版本: 4.0.5
### 重现问题的步骤
1. 命令通道平台,下发执行脚本命令
2. 执行nohup java -jar arthas-boot.jar --username xxx --password xxx --target-ip 0.0.0.0 --attach-only pid
3. ps auxf
### 期望的结果
正常启动,并监听8563等端口,可通过http api的方式交互
### 实际运行的结果

jstatck -F pid

定位到代码是卡在这里com.taobao.arthas.client.TelnetConsole

来自com.taobao.arthas.boot.Bootstrap.findProcessByTelnetClient方法的调用

我把这一句注释了,让它返回-1,就能正常下发arthas命令执行了。
命令下发的方式,就卡在这里,直接上机运行 java -jar arthas-boot.jar --username xxx --password xxx --target-ip 0.0.0.0 --attach-only pid 反而不会卡住。不知道为什么
Contributor guide
Research direction
Start with com.taobao.arthas.boot.Bootstrap.findProcessByTelnetClient and the com.taobao.arthas.client.TelnetConsole location identified in the report. Reproduce the nohup arthas-boot.jar command through the command platform and directly on the host, then compare the startup behavior. Done means the process starts and listens on the expected ports without commenting out the method call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, linux
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100