arthas icon indicating copy to clipboard operation
arthas copied to clipboard

docker内服务cpu较高时,启动arthas报错:Unable to open socket file: target process not responding or HotSpot VM not loaded

Open jhx1024 opened this issue 9 months ago • 1 comments

背景: docker 内的某一个服务cpu高至600%+ ,服务未挂,但外部无法访问。

Image

Image

启动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监控时他是正常的

jhx1024 avatar Apr 17 '25 01:04 jhx1024

看起来是cpu负载太高了,没有办法处理arthas的请求 所以连接不上吧

sunheyi6 avatar Apr 19 '25 23:04 sunheyi6