石头城程序猿 2021-08-12 00:04 采纳率: 50%
浏览 292
已结题

window下使用arthas分析JVM内存


D:\>java -jar arthas-boot.jar
[INFO] arthas-boot version: 3.5.3
[INFO] Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
  [1]: 20308
  [2]: 40756 org.jetbrains.idea.maven.server.RemoteMavenServer36
  [3]: 31384 org.jetbrains.jps.cmdline.Launcher
  [4]: 35244 com.jason.io.Math
4
[INFO] arthas home: C:\Users\jiahongfei\.arthas\lib\3.5.3\arthas
[INFO] Try to attach process 35244
[ERROR] Start arthas failed, exception stack trace:
com.sun.tools.attach.AttachNotSupportedException: 拒绝访问。
        at sun.tools.attach.WindowsVirtualMachine.<init>(WindowsVirtualMachine.java:64)
        at sun.tools.attach.WindowsAttachProvider.attachVirtualMachine(WindowsAttachProvider.java:69)
        at com.sun.tools.attach.spi.AttachProvider.attachVirtualMachine(AttachProvider.java:194)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:250)
        at com.taobao.arthas.core.Arthas.attachAgent(Arthas.java:101)
        at com.taobao.arthas.core.Arthas.<init>(Arthas.java:26)
        at com.taobao.arthas.core.Arthas.main(Arthas.java:139)
[ERROR] attach fail, targetPid: 35244

找了一堆资料,没有找到对应的问题,求解

  • 写回答

1条回答 默认 最新

  • java叶新东老师 博客专家认证 2021-08-12 16:04
    关注

    arthas是依赖jdk自带工具,像jps、jmap、jinfo等等,建议你重新安装一下jdk环境变量,jre和jdk都要配置一下

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 8月20日
  • 已采纳回答 8月12日
  • 创建了问题 8月12日