a8921y / jvmmonitor

Automatically exported from code.google.com/p/jvmmonitor
0 stars 0 forks source link

"Monitoring is not supported for the selected JVM" #71

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the defect?
 1. Open JVM explorer  4 jvms shown.  None of them monitorable but I don't care about those.
 2. Launch my application from within Eclipse.  Application starts and a new PID is shows in my JVM Explorer
 3. Click on this and it says "Monitoring is not supported for the selected JVM" See FAQ.  The FAQ lists several scenarios including a few with additional messages but in my case there are no additional messages shown.  For this situation, the FAQ says only "If you don't see any additional message, your application might be shut down in the meantime."  This is not the case, my application is still running. 

...

What is the expected behavior?
either information would be shown in the JVM Explorer or the suggested link in 
FAQ would provide usable information about why it isn't working.
What was the actual behavior?
Nothing is shown in JVM Explorer and FAQ does not describe my situation.
What errors are shown on Error Log view or at <workspace>/.metadata/.log?
!ENTRY org.jvmmonitor.tools 4 0 2012-06-01 11:19:52.897
!MESSAGE Could not get monitored JVM.
!STACK 1
org.jvmmonitor.core.JvmCoreException: 
    at org.jvmmonitor.internal.tools.Tools.invokeGetMonitoredVm(Tools.java:188)
    at org.jvmmonitor.internal.tools.JvmAttachHandler.addActiveJvm(JvmAttachHandler.java:158)
    at org.jvmmonitor.internal.tools.JvmAttachHandler.updatesActiveJvms(JvmAttachHandler.java:114)
    at org.jvmmonitor.internal.tools.JvmAttachHandler$1.run(JvmAttachHandler.java:81)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jvmmonitor.internal.tools.Tools.invokeGetMonitoredVm(Tools.java:186)
    ... 5 more
Caused by: java.lang.Exception: Could not open PerfMemory
    at sun.misc.Perf.attach(Native Method)
    at sun.misc.Perf.attachImpl(Unknown Source)
    at sun.misc.Perf.attach(Unknown Source)
    at sun.jvmstat.perfdata.monitor.protocol.local.PerfDataBuffer.<init>(PerfDataBuffer.java:46)
    at sun.jvmstat.perfdata.monitor.protocol.local.LocalMonitoredVm.<init>(LocalMonitoredVm.java:51)
    at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider.getMonitoredVm(MonitoredHostProvider.java:60)
    at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider.getMonitoredVm(MonitoredHostProvider.java:50)
    ... 9 more
!SUBENTRY 1 org.jvmmonitor.core 4 0 2012-06-01 11:19:52.897
!MESSAGE 
!STACK 0
java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jvmmonitor.internal.tools.Tools.invokeGetMonitoredVm(Tools.java:186)
    at org.jvmmonitor.internal.tools.JvmAttachHandler.addActiveJvm(JvmAttachHandler.java:158)
    at org.jvmmonitor.internal.tools.JvmAttachHandler.updatesActiveJvms(JvmAttachHandler.java:114)
    at org.jvmmonitor.internal.tools.JvmAttachHandler$1.run(JvmAttachHandler.java:81)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)
Caused by: java.lang.Exception: Could not open PerfMemory
    at sun.misc.Perf.attach(Native Method)
    at sun.misc.Perf.attachImpl(Unknown Source)
    at sun.misc.Perf.attach(Unknown Source)
    at sun.jvmstat.perfdata.monitor.protocol.local.PerfDataBuffer.<init>(PerfDataBuffer.java:46)
    at sun.jvmstat.perfdata.monitor.protocol.local.LocalMonitoredVm.<init>(LocalMonitoredVm.java:51)
    at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider.getMonitoredVm(MonitoredHostProvider.java:60)
    at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider.getMonitoredVm(MonitoredHostProvider.java:50)
    ... 9 more
Root exception:
java.lang.Exception: Could not open PerfMemory
    at sun.misc.Perf.attach(Native Method)
    at sun.misc.Perf.attachImpl(Unknown Source)
    at sun.misc.Perf.attach(Unknown Source)
    at sun.jvmstat.perfdata.monitor.protocol.local.PerfDataBuffer.<init>(PerfDataBuffer.java:46)
    at sun.jvmstat.perfdata.monitor.protocol.local.LocalMonitoredVm.<init>(LocalMonitoredVm.java:51)
    at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider.getMonitoredVm(MonitoredHostProvider.java:60)
    at sun.jvmstat.perfdata.monitor.protocol.local.MonitoredHostProvider.getMonitoredVm(MonitoredHostProvider.java:50)
    at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jvmmonitor.internal.tools.Tools.invokeGetMonitoredVm(Tools.java:186)
    at org.jvmmonitor.internal.tools.JvmAttachHandler.addActiveJvm(JvmAttachHandler.java:158)
    at org.jvmmonitor.internal.tools.JvmAttachHandler.updatesActiveJvms(JvmAttachHandler.java:114)
    at org.jvmmonitor.internal.tools.JvmAttachHandler$1.run(JvmAttachHandler.java:81)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)

What is your environment for Eclipse?

e.g.
  OS: Microsoft Windows XP Professional Version 2002 Service Pack 3
  Eclipse: Indigo Service Release 1
  JVM Monitor: 3.8.0
  Java: Sun JDK 6 Update 23

What is your environment for the monitored JVM?

e.g.
  OS: Microsoft Windows XP Professional Version 2002 Service Pack 3
  Java: Sun JDK 6 Update 23

How can I get JVM Monitoring working?

Original issue reported on code.google.com by sc1...@att.com on 1 Jun 2012 at 4:33

GoogleCodeExporter commented 8 years ago
Hi,

This error looks the same as the one commented at 
http://code.google.com/a/eclipselabs.org/p/jvmmonitor/issues/detail?id=30#c5

Does changing TMP environment variable solve the issue?

Best Regards,
Yoshitaka

Original comment by yoshitak...@gmail.com on 28 Jun 2012 at 11:36

GoogleCodeExporter commented 8 years ago
No, changing the TMP env var does not help.

On the other thread someone mentioned running the app in debug mode, which I 
hadn't tried before.  I tried that now and that did not work either, with 
either the old or the new definition of TMP.

Original comment by sc1...@att.com on 28 Jun 2012 at 12:53

GoogleCodeExporter commented 8 years ago
workaround is described at 
https://forums.oracle.com/forums/thread.jspa?messageID=7067232

Original comment by yoshitak...@gmail.com on 2 Feb 2013 at 3:38

GoogleCodeExporter commented 8 years ago
I was facing the same issue and and i just did 2 things

1. Created a tmp folder in C:
2. Added a VM args -Djava.io.tmpdir="C:\tmp" while starting Tomcat

This is the root cause 
https://forums.oracle.com/forums/thread.jspa?messageID=7067232

It solves my issue.

Thank you.

Original comment by dhiraj.c...@gmail.com on 4 Sep 2013 at 1:28