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

标签 grails ubuntu tomcat6 profiler yourkit

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

我在生产服务器上的 Tomcat6 中运行了 Grails 应用程序,并解压了 YourKit 分析器并运行它 according to the documentation使用 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 服务器上。有任何想法吗?

最佳答案

看起来我必须以运行容器的用户身份运行。更改 sudo bin/yjp.sh -attachsudo -u tomcat6 bin/yjp.sh -attach工作。

关于grails - 远程 Grails 应用程序上的 YourKit 配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7396089/

相关文章:

grails - Grails:使用运行脚本填充H2数据库

ubuntu - Apache2 虚拟主机 403 被禁止?

Ubuntu 14.04 数控 100% CPU 使用率

java - Jersey @Consumes @Produces 不被服务器接受,

java - 收到警告 : "There should only be one Seam phase listener per application" while starting native tomcat with exploded wars from IntelliJ

grails - 在Grails中将 “date.struct”更改为日期

grails - 使用Grails插件捆绑图像,使用该插件从应用程序引用这些图像不起作用

grails - 使用 Spock 和服务类在 Grails 中进行数据驱动测试

apache - 为什么只有当我进入容器的 bash 时才能访问我的 Apache 默认页面?

java - php java 桥不能在 tomcat 6 上工作