alibaba / arthas

Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas
https://arthas.aliyun.com/
Apache License 2.0
35.64k stars 7.49k forks source link

arthas atttach失败 #2370

Closed zqw961025 closed 1 year ago

zqw961025 commented 1 year ago

环境信息

重现问题的步骤

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
Steven-Russell commented 1 year ago

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

kimmking commented 1 year ago

执行

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