Profilo YourKit sull'app Remote Grails
Domanda
Sto cercando di rintracciare una perdita di memoria che sto avendo con un'applicazione di Grails e sto usando il profiler Yourkit, ma sto affrontando un problema.
Ho l'applicazione Grails in esecuzione in TomCAT6 sul server di produzione e ho disimballato il profiler Yourkit e lo ho eseguito Secondo la documentazione usando sudo bin/yjp.sh -attach
, ma sto ricevendo l'errore:
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
Sto usando YourKit V10 e sono su un server Ubuntu 11.04. Qualche idea?
Soluzione
Sembra che ho dovuto funzionare come utente che esegue il contenitore. Mutevole sudo bin/yjp.sh -attach
a sudo -u tomcat6 bin/yjp.sh -attach
lavorato.
Altri suggerimenti
Devi far funzionare l'API allegata prima di poter continuare:
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
Vedi le FAQ di JVISualVM: anche la loro risoluzione dei problemi può essere utilizzata qui.