Closed EdouarL closed 3 years ago
Don't know if this helps but I'm using VisualVM for monitoring IBM WebSphere 8.5.5.x jvms which are Java 1.8 currently and all I need in simplest form (no authentication, no SSL - for more complex setup I use various configuration files and it's little but pain in the a*s to get it working) is to provide IBM jvm process with params
-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=9000
Where the 9000
in the -Dcom.sun.management.jmxremote.port
is the port you will connect your VisualVM to.
The RMI connection URL I enter into VisualVM Connection field is then service:jmx:rmi:///jndi/rmi://targethost:9000/jmxrmi
in my case but that's WebSphere, not sure if same applies to your case
Thank you Pavel,
I tried your configuration, unfortunately it's not working for me. The jmx configuration (on target side) is done through Cognos following the documentation. And it's working fine on local with JConsol (with or without credential).
Thank you again for your help regards, Ed
I connected successfully from remote computer on my target server with JConsole :
But with visualvm I still get error
jvisualvm_logfile_2021-04-25.txt
PRÉCIS: JMX Immediate Heartbeat Processor: outbound call received exception: [TARGETSERVER.mycompany.com:49764] exception:
javax.management.InstanceNotFoundException: java.lang:type=Runtime
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1107)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.isInstanceOf(DefaultMBeanServerInterceptor.java:1413)
at com.sun.jmx.mbeanserver.JmxMBeanServer.isInstanceOf(JmxMBeanServer.java:1103)
at com.ibm.ws.kernel.boot.jmx.internal.PlatformMBeanServer.isInstanceOf(PlatformMBeanServer.java:403)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1485)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:87)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1320)
at java.security.AccessController.doPrivileged(AccessController.java:770)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1419)
at javax.management.remote.rmi.RMIConnectionImpl.isInstanceOf(RMIConnectionImpl.java:950)
at sun.reflect.GeneratedMethodAccessor395.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:374)
at sun.rmi.transport.Transport$1.run(Transport.java:212)
at sun.rmi.transport.Transport$1.run(Transport.java:209)
at java.security.AccessController.doPrivileged(AccessController.java:770)
at sun.rmi.transport.Transport.serviceCall(Transport.java:208)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:585)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:846)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:700)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$682/000000003C291260.run(Unknown Source)
at java.security.AccessController.doPrivileged(AccessController.java:704)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:699)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.lang.Thread.run(Thread.java:822)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:163)
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.isInstanceOf(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.isInstanceOf(RMIConnector.java:1100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.graalvm.visualvm.jmx.impl.JmxModelImpl$CheckerInvocationHandler.invoke(JmxModelImpl.java:393)
at com.sun.proxy.$Proxy14.isInstanceOf(Unknown Source)
at java.lang.management.ManagementFactory.newPlatformMXBeanProxy(ManagementFactory.java:617)
at org.graalvm.visualvm.tools.jmx.JvmMXBeansFactory$JvmMXBeansImpl.getMXBean(JvmMXBeansFactory.java:383)
at org.graalvm.visualvm.tools.jmx.JvmMXBeansFactory$JvmMXBeansImpl.getRuntimeMXBean(JvmMXBeansFactory.java:356)
at org.graalvm.visualvm.jmx.impl.JmxApplication.getPid(JmxApplication.java:99)
at org.graalvm.visualvm.jvmstat.JvmstatModelProvider.getMonitoredVm(JvmstatModelProvider.java:49)
at org.graalvm.visualvm.jvmstat.JvmstatModelProvider.createModelFor(JvmstatModelProvider.java:71)
at org.graalvm.visualvm.jvmstat.JvmstatModelProvider.createModelFor(JvmstatModelProvider.java:45)
at org.graalvm.visualvm.core.model.ModelFactory.getModel(ModelFactory.java:105)
at org.graalvm.visualvm.tools.jvmstat.JvmstatModelFactory.getJvmstatFor(JvmstatModelFactory.java:65)
at org.graalvm.visualvm.graalvm.svm.SVMJvmProvider.createModelFor(SVMJvmProvider.java:49)
at org.graalvm.visualvm.graalvm.svm.SVMJvmProvider.createModelFor(SVMJvmProvider.java:37)
at org.graalvm.visualvm.core.model.ModelFactory.getModel(ModelFactory.java:105)
at org.graalvm.visualvm.application.jvm.JvmFactory.getJVMFor(JvmFactory.java:65)
at org.graalvm.visualvm.jmx.impl.JmxApplication.tryConnect(JmxApplication.java:174)
at org.graalvm.visualvm.jmx.impl.JmxHeartbeat$1.run(JmxHeartbeat.java:91)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
avr. 25, 2021 2:11:15 PM sun.rmi.server.UnicastRef invoke
PRÉCIS: JMX Immediate Heartbeat Processor: free connection (reuse = true)
avr. 25, 2021 2:11:15 PM sun.rmi.transport.tcp.TCPChannel free
PRÉCIS: JMX Immediate Heartbeat Processor: reuse connection
avr. 25, 2021 2:11:15 PM org.netbeans.core.startup.NbInstaller shouldDelegateResource
PLUS PRÉCIS: Delegating resource java/lang/ from null for org.graalvm.visualvm.tools
avr. 25, 2021 2:11:15 PM org.graalvm.visualvm.tools.jmx.JvmMXBeansFactory$JvmMXBeansImpl getMXBean
INFOS: org.graalvm.visualvm.tools.jmx.JvmMXBeansFactory$JvmMXBeansImpl.getMXBean()
java.lang.IllegalArgumentException: javax.management.InstanceNotFoundException: java.lang:type=Runtime
at java.lang.management.ManagementFactory.newPlatformMXBeanProxy(ManagementFactory.java:630)
at org.graalvm.visualvm.tools.jmx.JvmMXBeansFactory$JvmMXBeansImpl.getMXBean(JvmMXBeansFactory.java:383)
at org.graalvm.visualvm.tools.jmx.JvmMXBeansFactory$JvmMXBeansImpl.getRuntimeMXBean(JvmMXBeansFactory.java:356)
at org.graalvm.visualvm.jmx.impl.JmxApplication.getPid(JmxApplication.java:99)
at org.graalvm.visualvm.jvmstat.JvmstatModelProvider.getMonitoredVm(JvmstatModelProvider.java:49)
at org.graalvm.visualvm.jvmstat.JvmstatModelProvider.createModelFor(JvmstatModelProvider.java:71)
at org.graalvm.visualvm.jvmstat.JvmstatModelProvider.createModelFor(JvmstatModelProvider.java:45)
at org.graalvm.visualvm.core.model.ModelFactory.getModel(ModelFactory.java:105)
at org.graalvm.visualvm.tools.jvmstat.JvmstatModelFactory.getJvmstatFor(JvmstatModelFactory.java:65)
at org.graalvm.visualvm.graalvm.svm.SVMJvmProvider.createModelFor(SVMJvmProvider.java:49)
at org.graalvm.visualvm.graalvm.svm.SVMJvmProvider.createModelFor(SVMJvmProvider.java:37)
at org.graalvm.visualvm.core.model.ModelFactory.getModel(ModelFactory.java:105)
at org.graalvm.visualvm.application.jvm.JvmFactory.getJVMFor(JvmFactory.java:65)
at org.graalvm.visualvm.jmx.impl.JmxApplication.tryConnect(JmxApplication.java:174)
at org.graalvm.visualvm.jmx.impl.JmxHeartbeat$1.run(JmxHeartbeat.java:91)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Caused by: javax.management.InstanceNotFoundException: java.lang:type=Runtime
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1107)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.isInstanceOf(DefaultMBeanServerInterceptor.java:1413)
at com.sun.jmx.mbeanserver.JmxMBeanServer.isInstanceOf(JmxMBeanServer.java:1103)
at com.ibm.ws.kernel.boot.jmx.internal.PlatformMBeanServer.isInstanceOf(PlatformMBeanServer.java:403)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1485)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:87)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1320)
at java.security.AccessController.doPrivileged(AccessController.java:770)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1419)
at javax.management.remote.rmi.RMIConnectionImpl.isInstanceOf(RMIConnectionImpl.java:950)
at sun.reflect.GeneratedMethodAccessor395.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:374)
at sun.rmi.transport.Transport$1.run(Transport.java:212)
at sun.rmi.transport.Transport$1.run(Transport.java:209)
at java.security.AccessController.doPrivileged(AccessController.java:770)
at sun.rmi.transport.Transport.serviceCall(Transport.java:208)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:585)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:846)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:700)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$682/000000003C291260.run(Unknown Source)
at java.security.AccessController.doPrivileged(AccessController.java:704)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:699)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.lang.Thread.run(Thread.java:822)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:163)
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.isInstanceOf(Unknown Source)
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.isInstanceOf(RMIConnector.java:1100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.graalvm.visualvm.jmx.impl.JmxModelImpl$CheckerInvocationHandler.invoke(JmxModelImpl.java:393)
at com.sun.proxy.$Proxy14.isInstanceOf(Unknown Source)
at java.lang.management.ManagementFactory.newPlatformMXBeanProxy(ManagementFactory.java:617)
... 18 more
I cannot figure what is it about. Any help will be apreciate because Google help on this time. Thank you Ed
IBM JVM can be monitored via JMX just fine. You just need to start IBM JMV with enabled remote JMX monitoring. JMX documentation is available here. If JMX is set up correctly, you can attach to it from VisualVM by specifying host:port
. Your JMX connection string looks strange to me and it looks like you are trying to connect to some kind of 'proxy JMX service'. This does not work well, since the proxy MXBeans do not have correct ObjectName. In your case the ObjectName for RuntimeMXBean should be java.lang:type=Runtime
, but it is java.lang:dispatcher="xxxxxxxxx",type=Runtime
. How did you enabled JMX? Where did you get this JMX proxy connection string? Is IBM JVM running on your local machine? Can you provide steps to reproduce?
Hello thurka,
thank you for your reply. JMX is enable with IBM Cognos Analytics (which is a BI application). I follow the official documentation to enable JMX : https://www.ibm.com/docs/en/cognos-analytics/11.1.0?topic=metrics-monitoring-system-externally
Here the way to enable JMX monitoring in Cognos (just give a port, if it 0 then it's disable)
So maybe it is not IBM JVM related but more on application (?)
it is the IBM Cognos which wrote to use the specific connexion string : service:jmx:rmi://Content_Manager_server/jndi/rmi://monitoring_server:
When I connect remotely or locally with JConsole it's ok (as shown in previous screenshots) But with VisualVM I got the error : Not supported for this JVM
I guess I am able to connect to the JMX because the icon associate to the connexion is colored
I also try to connect with a simple host:port
connexion string without success as you can see the connexion is not working
regards,
It looks like IBM Cognos JMX connection (service:jmx:rmi://Content_Manager_server/jndi/rmi://monitoring_server:/proxyserver
) does not provide ordinary JMX beans, but some kind of proxy JMX beans. VisualVM and JConsole works the same in this situation - there are no monitoring info. JConsole has all the monitoring tabs (Overview, Memory, Threads, Classes, VM summary) disabled and VisualVM displays 'Not supported by this JVM'. JConsole shows MBeans browser, which just displays exported MBeans without any interpretation. If you are interested to see same MBeans browser in VisualVM, just install VisualVM-Mbeans
plugin.
host:port
connection does not work, since the IBM Cognos JMX settings enables that 'strange' JMX connection service:jmx:rmi://Content_Manager_server/jndi/rmi://monitoring_server:/proxyserver
. If you want to try to use ordinary host:port
connection, you need to enable it first. You can try to follow this blog to see how to enable ordinary JMX monitoring.
Hello Thurka,
then this is definitely an issue on IBM Cognos side. I was able to find a problem with an IBM® program is documented, tracked, and not yet corrected : https://www.ibm.com/support/pages/apar/PH30864
Many thank for your help ! kind regards, Ed
then this is definitely an issue on IBM Cognos side. I was able to find a problem with an IBM® program is documented, tracked, and not yet corrected : https://www.ibm.com/support/pages/apar/PH30864
I cannot access the link, since it requires IBMid
. BTW: Did you try to enable ordinary JMX via blog post referenced above?
Here a screenshot of the link
I didn't try the blog post because I assumed it is a former version of the software
Issue was open with 11.1.7 IBM Cognos version. Bug is still there with 11.2.0
Hi team,
Not supported for this JVM I try to connect to remote JMX running on IBM JRE and I got a message : Not supported for this JVM
Target JVM :
As documentation say : https://visualvm.github.io/relnotes.html
so I guess it is not a bug any workaround to can use visualvm on IBM JRE will be appreciate
Please find enclosed screenshot and logfile Thanks jvisualvm_logfile-1.txt
many thank for your help, regards, Ed