arthas
arthas copied to clipboard
docker内服务cpu较高时,启动arthas报错:Unable to open socket file: target process not responding or HotSpot VM not loaded
背景: docker 内的某一个服务cpu高至600%+ ,服务未挂,但外部无法访问。
启动arthas进行监控时报错信息如下: [INFO] JAVA_HOME: /usr/local/openjdk-8/jre [INFO] arthas-boot version: 4.0.5 [INFO] Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
- [1]: 1 /sss.jar
1
[INFO] Start download arthas from remote server: https://arthas.aliyun.com/download/4.0.5?mirror=aliyun
[INFO] Download arthas success.
[INFO] arthas home: /root/.arthas/lib/4.0.5/arthas
[INFO] Try to attach process 1
Picked up JAVA_TOOL_OPTIONS:
[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.
(LinuxVirtualMachine.java:106) 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:102) at com.taobao.arthas.core.Arthas. (Arthas.java:27) at com.taobao.arthas.core.Arthas.main(Arthas.java:161) [ERROR] attach fail, targetPid: 1 但是当我把服务重启之后,cpu恢复正常状态时,启动arthas监控时他是正常的
看起来是cpu负载太高了,没有办法处理arthas的请求 所以连接不上吧