[alibaba/arthas]arthas atttach失败

2024-08-05 424 views
1
环境信息
  • arthas-boot.jar 或者 as.sh 的版本: xxx
  • Arthas 版本: 3.5.0
  • 操作系统版本: xxx
  • 目标进程的JVM版本: 1.8
  • 执行arthas-boot的版本: 3.5.0
重现问题的步骤

java -jar arthas-boot.jar 1

期望的结果

attach成功

实际运行的结果

com. sum tools . attach Agent Initializ at ionException: Agent JAR loaded but agent failed to initial

at sun.tools . attach Hot SpotvirtualMachine . laa dAgent (Hot SpotVirtualMachine. ja wa :121)at com.taobao . arthas . core . Arthas . att achAgent (Arthas. jawa:119)

at com.taobao. arthas . core Arthas . (Arthas. java :26)

at com.taobao . arthas . core . Arthas rrein (Arthas. java 138)

[ERROR] Start arthas failed, exception stack trace:

[ERROR] attach fail, targetPid: 1

把异常信息贴到这里


com. sum tools . attach Agent Initializ at ionException: Agent JAR loaded but agent failed to initial

at sun.tools . attach Hot SpotvirtualMachine . laa dAgent (Hot SpotVirtualMachine. ja wa :121)at com.taobao . arthas . core . Arthas . att achAgent (Arthas. jawa:119)

at com.taobao. arthas . core Arthas . <jnit> (Arthas. java :26)

at com.taobao . arthas . core . Arthas rrein (Arthas. java 138)

[ERROR] Start arthas failed, exception stack trace:

[ERROR] attach fail, targetPid: 1

回答

7

是不是使用了tomcat的secruity安全启动?将这个参数删除再试试? start -security 我这边删除了这个参数之后,arthas可以正常使用,但是不知道有没有其他方式

5

执行

strace java -jar arthas-boot.jar 1 看看输出里,到底是因为什么原因