arthas-boot.jar 或者 as.sh 的版本: 3.1.7arthas-boot的版本: :3 .1.7使用root账号运行arthas, tomcat 使用tomcat (tomcat:x:1001:1001::/opt/tomcat:/bin/nologin
)账号运行
[ERROR] Start arthas failed, exception stack trace:
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
at sun.tools.attach.LinuxVirtualMachine.
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:78)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:250)
at com.taobao.arthas.core.Arthas.attachAgent(Arthas.java:85)
at com.taobao.arthas.core.Arthas.
at com.taobao.arthas.core.Arthas.main(Arthas.java:123)
[ERROR] attach fail, targetPid: 28821
```
把异常信息贴到这里
[INFO] arthas-boot version: 3.1.7
[INFO] Found existing java process, please choose one and hit RETURN.
切换到同一个用户名,再操作。
试过了,不行,因为 tomcat 的用户设置为/bin/nologin
感谢:解决
cd /tmp && curl -O https://alibaba.github.io/arthas/arthas-boot.jar
ps aux | grep tomcat 找到PID
sudo -u tomcat -s /bin/bash -c 'java -jar /tmp/arthas-boot.jar PID'
Most helpful comment
感谢:解决
cd /tmp && curl -O https://alibaba.github.io/arthas/arthas-boot.jar
ps aux | grep tomcat 找到PID
sudo -u tomcat -s /bin/bash -c 'java -jar /tmp/arthas-boot.jar PID'