i have change my jvm to oraclejdk1.8 and the problem still exists.
when run sh -x as.sh
i got
++ ps -p 24110 -o user=
+ local target_user=root
+ '[' root '!=' root ']'
+ echo 'Calculating attach execution time...'
Calculating attach execution time...
+ attach_jvm 3.0.4
+ local arthas_version=3.0.4
+ local arthas_lib_dir=/root/.arthas/lib/3.0.4/arthas
+ echo 'Attaching to 24110 using version 3.0.4...'
Attaching to 24110 using version 3.0.4...
+ '[' 127.0.0.1 = 127.0.0.1 ']'
+ [[ 3.0.4 > 3.0 ]]
+ /usr/lib/jvm/oracle-jdk-1.8.0_181/bin/java -Djava.awt.headless=true -Xbootclasspath/a:/usr/lib/jvm/oracle-jdk-1.8.0_181/lib/tools.jar -jar /root/.arthas/lib/3.0.4/arthas/arthas-core.jar -pid 24110 -target-ip 127.0.0.1 -telnet-port 3658 -http-port 8563 -core /root/.arthas/lib/3.0.4/arthas/arthas-core.jar -agent /root/.arthas/lib/3.0.4/arthas/arthas-agent.jar
Start arthas failed, exception stack trace:
java.lang.InternalError: instrument library is missing in target VM
at sun.tools.attach.HotSpotVirtualMachine.loadAgent(HotSpotVirtualMachine.java:105)
at com.taobao.arthas.core.Arthas.attachAgent(Arthas.java:84)
at com.taobao.arthas.core.Arthas.(Arthas.java:25)
at com.taobao.arthas.core.Arthas.main(Arthas.java:96)
Caused by: com.sun.tools.attach.AgentLoadException: Failed to load agent library
at sun.tools.attach.LinuxVirtualMachine.execute(LinuxVirtualMachine.java:224)
at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(HotSpotVirtualMachine.java:58)
at sun.tools.attach.HotSpotVirtualMachine.loadAgentLibrary(HotSpotVirtualMachine.java:79)
at sun.tools.attach.HotSpotVirtualMachine.loadAgent(HotSpotVirtualMachine.java:103)
... 3 more
+ exit 1
+ '[' 1 -ne 0 ']'
+ exit_on_err 1 'attach to target jvm (24110) failed, check /root/logs/arthas/arthas.log or stderr of target jvm for any exceptions.'
+ [[ ! -z attach to target jvm (24110) failed, check /root/logs/arthas/arthas.log or stderr of target jvm for any exceptions. ]]
+ echo 'attach to target jvm (24110) failed, check /root/logs/arthas/arthas.log or stderr of target jvm for any exceptions.'
attach to target jvm (24110) failed, check /root/logs/arthas/arthas.log or stderr of target jvm for any exceptions.
+ exit 1