远程 Grails 应用程序上的 YourKit 配置文件

发布于 2024-12-04 01:19:35 字数 1105 浏览 6 评论 0原文

我正在尝试追踪 Grails 应用程序中出现的内存泄漏问题,并且正在使用 Yourkit Profiler,但遇到了问题。

我在生产服务器上的 Tomcat6 中运行 Grails 应用程序,并解压了 YourKit 分析器并运行它 根据文档使用sudo bin/yjp.sh -attach,但我收到错误:

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.yourkit.Main$2.run(a:19)
Caused by: com.yourkit.runtime.PresentableException: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
    at com.yourkit.ui.s.n.a(a:170)
    at com.yourkit.ui.s.n.a(a:176)
    at com.yourkit.ui.s.j.a(a:250)
    at com.yourkit.c.do(a:73)
    at com.yourkit.Main0.entry(a:274)
    ... 5 more

我正在使用 YourKit v10 并且使用的是 Ubuntu 11.04 服务器。有什么想法吗?

I am trying to track down a memory leak that I am having with a Grails application and am using the Yourkit Profiler, but am running into a problem.

I have the Grails application running in Tomcat6 on the Production server and have unpacked the YourKit profiler and ran it according to the documentation using sudo bin/yjp.sh -attach, but I am getting the error:

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.yourkit.Main$2.run(a:19)
Caused by: com.yourkit.runtime.PresentableException: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
    at com.yourkit.ui.s.n.a(a:170)
    at com.yourkit.ui.s.n.a(a:176)
    at com.yourkit.ui.s.j.a(a:250)
    at com.yourkit.c.do(a:73)
    at com.yourkit.Main0.entry(a:274)
    ... 5 more

I am using YourKit v10 and am on an Ubuntu 11.04 server. Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦回旧景 2024-12-11 01:19:35

看来我必须以运行容器的用户身份运行。将 sudo bin/yjp.sh -attach 更改为 sudo -u tomcat6 bin/yjp.sh -attach 有效。

It looks like I had to run as the user running the container. Changing sudo bin/yjp.sh -attach to sudo -u tomcat6 bin/yjp.sh -attach worked.

故事灯 2024-12-11 01:19:35

您需要让 Attach API 正常工作才能继续:

com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded

请参阅 JVisualVM 常见问题解答 - 此处也可以使用他们的故障排除。

You need to have the Attach API working before you can continue:

com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded

See the JVisualVM FAQ - their troubleshooting can be used here too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文