远程 Grails 应用程序上的 YourKit 配置文件
我正在尝试追踪 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来我必须以运行容器的用户身份运行。将 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
tosudo -u tomcat6 bin/yjp.sh -attach
worked.您需要让 Attach API 正常工作才能继续:
请参阅 JVisualVM 常见问题解答 - 此处也可以使用他们的故障排除。
You need to have the Attach API working before you can continue:
See the JVisualVM FAQ - their troubleshooting can be used here too.