Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attach tomcat进程失败 #2966

Open
1 task done
SilenceXXX1 opened this issue Nov 27, 2024 · 0 comments
Open
1 task done

attach tomcat进程失败 #2966

SilenceXXX1 opened this issue Nov 27, 2024 · 0 comments

Comments

@SilenceXXX1
Copy link

SilenceXXX1 commented Nov 27, 2024

  • 我已经在 issues 里搜索,没有重复的issue。

环境信息

  • Arthas 版本: 4.0.2
  • 操作系统版本: Linux host-10-19-185-50 4.19.90-24.4.v2101.ky10.x86_64 GNU/Linux
  • 目标进程的JVM版本: openjdk11

重现问题的步骤

执行命令连接 tomcat应用 java -jar arthas-boot.jar 1213551

期望的结果

请问导致这个错误的原因是什么?除了重启tomcat外,有其他的解决办法吗?

实际运行的结果

1、无法成功连接到tomcat进程,之前也出现过重启tomcat后一般就可以正常连接,但是长时间运行tomcat后,就会出现问题。
2、arthas报错后,检查tomcat中的应用运行情况并无问题,可以正常访问web应用。
3、tomcat已运行了8天,tomcat内有11个web应用,内存约4GB,线程数量约1700
4、tomcat jvmArg -Xss512k -XX:MaxDirectMemorySize=64M -XX:CICompilerCount=2 -XX:G1ReservePercent=10 -XX:InitiatingHeapOccupancyPercent=70 -Dio.netty.maxDirectMemory=16777216 -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:12887

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

[INFO] JAVA_HOME: /xxx/openjdk11linux64.1
[INFO] arthas-boot version: 4.0.2
[INFO] arthas home: /root/arthas
[INFO] Try to attach process 1213551
Picked up JAVA_TOOL_OPTIONS: 
[ERROR] Start arthas failed, exception stack trace: 
com.sun.tools.attach.AttachOperationFailedException: java.lang.NullPointerException
        at jdk.attach/sun.tools.attach.VirtualMachineImpl.execute(VirtualMachineImpl.java:225)
        at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:309)
        at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.getSystemProperties(HotSpotVirtualMachine.java:190)
        at com.taobao.arthas.core.Arthas.attachAgent(Arthas.java:105)
        at com.taobao.arthas.core.Arthas.<init>(Arthas.java:27)
        at com.taobao.arthas.core.Arthas.main(Arthas.java:161)
[INFO] Attach process 1213551 success.
[INFO] arthas-client connect 127.0.0.1 3658
Connect to telnet server error: 127.0.0.1 3658
java.net.ConnectException: Connection refused (Connection refused)
        at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)
        at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255)
        at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.base/java.net.Socket.connect(Socket.java:609)
        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(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.taobao.arthas.boot.Bootstrap.main(Bootstrap.java:634)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant