[alibaba/arthas]arthas支持jdk17吗?

2024-07-17 338 views
4
环境信息
  • arthas-boot.jar 或者 as.sh 的版本: 3.6.9
  • Arthas 版本: 3.6.9
  • 操作系统版本: xxx
  • 目标进程的JVM版本: jdk 17.0.4
  • 执行arthas-boot的版本: xxx
重现问题的步骤

java -jar arthas-boot.jar

期望的结果

正常启动

实际运行的结果

实际运行结果,最好有详细的日志,异常栈。尽量贴文本。


把异常信息贴到这里
Picked up JAVA_TOOL_OPTIONS: 
Error: Unable to initialize main class com.taobao.arthas.core.Arthas
Caused by: java.lang.NoClassDefFoundError: com/sun/tools/attach/AgentLoadException
onnect to telnet server error: 127.0.0.1 3658
java.net.ConnectException: Connection refused
    at java.base/sun.nio.ch.Net.pollConnect(Native Method)
    at java.base/sun.nio.ch.Net.pollConnectNow(Unknown Source)
    at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(Unknown Source)
    at java.base/sun.nio.ch.NioSocketImpl.connect(Unknown Source)
    at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
    at java.base/java.net.Socket.connect(Unknown Source)
    at org.apache.commons.net.SocketClient.connect(SocketClient.java:188)
    at org.apache.commons.net.SocketClient.connect(SocketClient.java:209)
    at com.taobao.arthas.client.TelnetConsole.process(TelnetConsole.java:306)
    at com.taobao.arthas.client.TelnetConsole.main(TelnetConsole.java:166)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at com.taobao.arthas.boot.Bootstrap.main(Bootstrap.java:633)
Usage: arthas-client [--help] [-c <value>] [-f <value>] [-w <value>] [-t
       <value>] [-h <value>] [target-ip] [port]

回答

3

image 遇到了同样的问题,期待回复

4

@freezcg arthas 支持 jdk17 ,你的问题是可能用了自己打包的 jdk ,里面没有打包 attach 相关的module。