arthas icon indicating copy to clipboard operation
arthas copied to clipboard

多个JVM进程时,attach目标错误

Open yangxy81118 opened this issue 7 years ago • 2 comments

  • [ ] 我已经在 issues 里搜索,没有重复的issue。

环境信息

  • Arthas 版本: 3.0.5
  • 操作系统版本: centos7 64位
  • 目标进程的JVM版本: jdk 1.8.0_65
  • 执行arthas-boot的版本: 3.0.5.2

重现问题的步骤

  1. 部署多个jvm
  2. attach其中一个
  3. 再attach另一个,但会始终attach到之前的那个
  4. 杀掉总是绑上的那一个之后,再选择其他的绑,可以成功
  5. 但是一旦成功以后,再切换别的,又会出现同样的错误,重复2-3的动作

期望的结果

绑定到正确的进程 [INFO] arthas-boot version: 3.0.5.2 [INFO] arthas home: /home/llt/.arthas/lib/3.0.5/arthas [INFO] Try to attach process 27190 [INFO] Attach process 27190 success. [INFO] arthas-client connect 127.0.0.1 3658 ,---. ,------. ,--------.,--. ,--. ,---. ,---.
/ O \ | .--. ''--. .--'| '--' | / O \ ' .-'
| .-. || '--'.' | | | .--. || .-. |. -.
| | | || |\ \ | | | | | || | | |.-' |
--' --'--' '--' --' --' --'--' --'`-----'

wiki: https://alibaba.github.io/arthas version: 3.0.5 pid: 27190 time: 2019-01-03 09:55:17

实际运行的结果

[INFO] arthas-boot version: 3.0.5.2 [INFO] arthas home: /home/llt/.arthas/lib/3.0.5/arthas [INFO] Try to attach process 27190 [INFO] Attach process 27190 success. [INFO] arthas-client connect 127.0.0.1 3658 ,---. ,------. ,--------.,--. ,--. ,---. ,---.
/ O \ | .--. ''--. .--'| '--' | / O \ ' .-'
| .-. || '--'.' | | | .--. || .-. |. -.
| | | || |\ \ | | | | | || | | |.-' |
--' --'--' '--' --' --' --'--' --'`-----'

wiki: https://alibaba.github.io/arthas version: 3.0.5 pid: 27353 time: 2019-01-03 09:55:17

yangxy81118 avatar Jan 03 '19 01:01 yangxy81118

退出时候,执行shutdown命令

wuyi5630 avatar Jan 03 '19 07:01 wuyi5630

参考这个: https://github.com/alibaba/arthas/issues/98

hengyunabc avatar Jan 03 '19 08:01 hengyunabc