我们在激活Jenkins文件泄漏检测器插件时遇到问题。错误信息如下。有什么想法吗?
以下是可能相关的信息:
RHEL 6.0
/ tmp权限:drwxrwxrwt。 17 root root 28672 Aug 31 08:42 tmp
[root @XXX tmp] #java -version
java版“1.6.0_39”
Java(TM)SE运行时环境(版本1.6.0_39-b04)
Java HotSpot(TM)64位服务器VM(版本20.14-b01,混合模式)
Status Code: 500
Exception: java.lang.Error: Failed to activate file leak detector: Connecting to 0 2013-08-31 08:42:18 Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.14-b01 mixed mode): "Low Memory Detector" daemon prio=10 tid=0x00007f3d400b7000 nid=0x380a runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread1" daemon prio=10 tid=0x00007f3d400b4800 nid=0x3809 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread0" daemon prio=10 tid=0x00007f3d400b1800 nid=0x3808 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE "Signal Dispatcher" daemon prio=10 tid=0x00007f3d400af800 nid=0x3806 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE "Finalizer" daemon prio=10 tid=0x00007f3d40094000 nid=0x37b4 in Object.wait() [0x00007f3d3f17b000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000007c1eb1300> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118) - locked <0x00000007c1eb1300> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) "Reference Handler" daemon prio=10 tid=0x00007f3d40092000 nid=0x37b3 in Object.wait() [0x00007f3d3f27c000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000007c1eb11d8> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:485) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116) - locked <0x00000007c1eb11d8> (a java.lang.ref.Reference$Lock) "main" prio=10 tid=0x00007f3d40006800 nid=0x37a8 runnable [0x00007f3d4802b000] java.lang.Thread.State: RUNNABLE at sun.tools.attach.LinuxVirtualMachine.sendQuitTo(Native Method) at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:67) at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:46) at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:195) 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 org.kohsuke.file_leak_detector.Main.run(Main.java:50) at org.kohsuke.file_leak_detector.Main.main(Main.java:35) "VM Thread" prio=10 tid=0x00007f3d4008b800 nid=0x37ad runnable "GC task thread#0 (ParallelGC)" prio=10 tid=0x00007f3d40019800 nid=0x37a9 runnable "GC task thread#1 (ParallelGC)" prio=10 tid=0x00007f3d4001b800 nid=0x37aa runnable "GC task thread#2 (ParallelGC)" prio=10 tid=0x00007f3d4001d000 nid=0x37ab runnable "GC task thread#3 (ParallelGC)" prio=10 tid=0x00007f3d4001f000 nid=0x37ac runnable "VM Periodic Task Thread" prio=10 tid=0x00007f3d400c9800 nid=0x380e waiting on condition JNI global references: 1129 Heap PSYoungGen total 55616K, used 2868K [0x00000007c1eb0000, 0x00000007c5cc0000, 0x0000000800000000) eden space 47680K, 6% used [0x00000007c1eb0000,0x00000007c217d398,0x00000007c4d40000) from space 7936K, 0% used [0x00000007c5500000,0x00000007c5500000,0x00000007c5cc0000) to space 7936K, 0% used [0x00000007c4d40000,0x00000007c4d40000,0x00000007c5500000) PSOldGen total 127104K, used 0K [0x0000000745c00000, 0x000000074d820000, 0x00000007c1eb0000) object space 127104K, 0% used [0x0000000745c00000,0x0000000745c00000,0x000000074d820000) PSPermGen total 21248K, used 4333K [0x0000000740a00000, 0x0000000741ec0000, 0x0000000745c00000) object space 21248K, 20% used [0x0000000740a00000,0x0000000740e3b460,0x0000000741ec0000) Exception in thread "main" 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 org.kohsuke.file_leak_detector.Main.run(Main.java:50) at org.kohsuke.file_leak_detector.Main.main(Main.java:35) Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:82) at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:46) at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:195) ... 6 more
Stacktrace:
javax.servlet.ServletException: java.lang.Error: Failed to activate file leak detector: Connecting to 0
2013-08-31 08:42:18
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.14-b01 mixed mode):
"Low Memory Detector" daemon prio=10 tid=0x00007f3d400b7000 nid=0x380a runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" daemon prio=10 tid=0x00007f3d400b4800 nid=0x3809 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" daemon prio=10 tid=0x00007f3d400b1800 nid=0x3808 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x00007f3d400af800 nid=0x3806 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=10 tid=0x00007f3d40094000 nid=0x37b4 in Object.wait() [0x00007f3d3f17b000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007c1eb1300> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x00000007c1eb1300> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=0x00007f3d40092000 nid=0x37b3 in Object.wait() [0x00007f3d3f27c000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007c1eb11d8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x00000007c1eb11d8> (a java.lang.ref.Reference$Lock)
"main" prio=10 tid=0x00007f3d40006800 nid=0x37a8 runnable [0x00007f3d4802b000]
java.lang.Thread.State: RUNNABLE
at sun.tools.attach.LinuxVirtualMachine.sendQuitTo(Native Method)
at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:67)
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:46)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:195)
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 org.kohsuke.file_leak_detector.Main.run(Main.java:50)
at org.kohsuke.file_leak_detector.Main.main(Main.java:35)
"VM Thread" prio=10 tid=0x00007f3d4008b800 nid=0x37ad runnable
"GC task thread#0 (ParallelGC)" prio=10 tid=0x00007f3d40019800 nid=0x37a9 runnable
"GC task thread#1 (ParallelGC)" prio=10 tid=0x00007f3d4001b800 nid=0x37aa runnable
"GC task thread#2 (ParallelGC)" prio=10 tid=0x00007f3d4001d000 nid=0x37ab runnable
"GC task thread#3 (ParallelGC)" prio=10 tid=0x00007f3d4001f000 nid=0x37ac runnable
"VM Periodic Task Thread" prio=10 tid=0x00007f3d400c9800 nid=0x380e waiting on condition
JNI global references: 1129
Heap
PSYoungGen total 55616K, used 2868K [0x00000007c1eb0000, 0x00000007c5cc0000, 0x0000000800000000)
eden space 47680K, 6% used [0x00000007c1eb0000,0x00000007c217d398,0x00000007c4d40000)
from space 7936K, 0% used [0x00000007c5500000,0x00000007c5500000,0x00000007c5cc0000)
to space 7936K, 0% used [0x00000007c4d40000,0x00000007c4d40000,0x00000007c5500000)
PSOldGen total 127104K, used 0K [0x0000000745c00000, 0x000000074d820000, 0x00000007c1eb0000)
object space 127104K, 0% used [0x0000000745c00000,0x0000000745c00000,0x000000074d820000)
PSPermGen total 21248K, used 4333K [0x0000000740a00000, 0x0000000741ec0000, 0x0000000745c00000)
object space 21248K, 20% used [0x0000000740a00000,0x0000000740e3b460,0x0000000741ec0000)
Exception in thread "main" 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 org.kohsuke.file_leak_detector.Main.run(Main.java:50)
at org.kohsuke.file_leak_detector.Main.main(Main.java:35)
Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:82)
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:46)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:195)
... 6 more
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:725)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:776)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:381)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:683)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:776)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:585)
at org.kohsuke.stapler.Stapler.service(Stapler.java:216)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:64)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227)
at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.Error: Failed to activate file leak detector: Connecting to 0
2013-08-31 08:42:18
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.14-b01 mixed mode):
"Low Memory Detector" daemon prio=10 tid=0x00007f3d400b7000 nid=0x380a runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" daemon prio=10 tid=0x00007f3d400b4800 nid=0x3809 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" daemon prio=10 tid=0x00007f3d400b1800 nid=0x3808 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" daemon prio=10 tid=0x00007f3d400af800 nid=0x3806 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" daemon prio=10 tid=0x00007f3d40094000 nid=0x37b4 in Object.wait() [0x00007f3d3f17b000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007c1eb1300> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <0x00000007c1eb1300> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=0x00007f3d40092000 nid=0x37b3 in Object.wait() [0x00007f3d3f27c000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000007c1eb11d8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x00000007c1eb11d8> (a java.lang.ref.Reference$Lock)
"main" prio=10 tid=0x00007f3d40006800 nid=0x37a8 runnable [0x00007f3d4802b000]
java.lang.Thread.State: RUNNABLE
at sun.tools.attach.LinuxVirtualMachine.sendQuitTo(Native Method)
at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:67)
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:46)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:195)
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 org.kohsuke.file_leak_detector.Main.run(Main.java:50)
at org.kohsuke.file_leak_detector.Main.main(Main.java:35)
"VM Thread" prio=10 tid=0x00007f3d4008b800 nid=0x37ad runnable
"GC task thread#0 (ParallelGC)" prio=10 tid=0x00007f3d40019800 nid=0x37a9 runnable
"GC task thread#1 (ParallelGC)" prio=10 tid=0x00007f3d4001b800 nid=0x37aa runnable
"GC task thread#2 (ParallelGC)" prio=10 tid=0x00007f3d4001d000 nid=0x37ab runnable
"GC task thread#3 (ParallelGC)" prio=10 tid=0x00007f3d4001f000 nid=0x37ac runnable
"VM Periodic Task Thread" prio=10 tid=0x00007f3d400c9800 nid=0x380e waiting on condition
JNI global references: 1129
Heap
PSYoungGen total 55616K, used 2868K [0x00000007c1eb0000, 0x00000007c5cc0000, 0x0000000800000000)
eden space 47680K, 6% used [0x00000007c1eb0000,0x00000007c217d398,0x00000007c4d40000)
from space 7936K, 0% used [0x00000007c5500000,0x00000007c5500000,0x00000007c5cc0000)
to space 7936K, 0% used [0x00000007c4d40000,0x00000007c4d40000,0x00000007c5500000)
PSOldGen total 127104K, used 0K [0x0000000745c00000, 0x000000074d820000, 0x00000007c1eb0000)
object space 127104K, 0% used [0x0000000745c00000,0x0000000745c00000,0x000000074d820000)
PSPermGen total 21248K, used 4333K [0x0000000740a00000, 0x0000000741ec0000, 0x0000000745c00000)
object space 21248K, 20% used [0x0000000740a00000,0x0000000740e3b460,0x0000000741ec0000)
Exception in thread "main" 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 org.kohsuke.file_leak_detector.Main.run(Main.java:50)
at org.kohsuke.file_leak_detector.Main.main(Main.java:35)
Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:82)
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:46)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:195)
... 6 more
at com.cloudbees.jenkins.plugins.file_leak_detector.FileHandleDump.doActivate(FileHandleDump.java:101)
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 org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:297)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:160)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:95)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:683)
... 55 more
Generated by Stapler at Sat Aug 31 08:42:23 EDT 2013
答案 0 :(得分:0)
JVM在附加到其他JVM期间报告错误
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
似乎附加到正在运行的进程不起作用。您指定了无效的PID或正在运行的JVM与用于启动文件泄漏检测器的JVM不匹配。
作为一种解决方法,您可以尝试将javaagent直接注入应用程序而不是附加到应用程序。有关详细信息,请参阅http://file-leak-detector.kohsuke.org/。