2 Replies Latest reply on Sep 1, 2010 4:37 AM by David Wang

    jon - Take thread dump on event

    Kevin Joseph Newbie

      Hi,

       

      I want to setup jon such that it takes a thread dump when the connection pool reaches its maximum capacity. I notice that we can set it to alert when it reaches that condition, but can a thread dump be taken as well ?

       

      Kevin

        • 1. Re: jon - Take thread dump on event
          Heiko Rupp Master

          Hi Kevin,

           

          you mean the connection pool of a datasource?

          This is currently not possible, as operations as reaction to an alert can only be executed on the resource the alert happened.

           

          Loosening that restriction should be on the roadmap for the next major version of JBoss ON.

           

            Heiko

          • 2. Re: jon - Take thread dump on event
            David Wang Newbie

            How can I make a thread dump work through JON? I got the following message when I did:

             

            org.mc4j.ems.connection.EmsInvocationException: Exception on invocation of [findMonitorDeadlockedThreads]org.mc4j.ems.connection.EmsConnectException: Connection failure null
            at org.mc4j.ems.impl.jmx.connection.bean.operation.DOperation.invoke(DOperation.java:127)
            at org.rhq.plugins.jmx.MBeanResourceComponent.invokeOperation(MBeanResourceComponent.java:547)
            at org.rhq.plugins.jmx.MBeanResourceComponent.invokeOperation(MBeanResourceComponent.java:517)
            at org.rhq.plugins.jmx.ThreadDataMeasurementComponent.invokeOperation(ThreadDataMeasurementComponent.java:65)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:616)
            at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
            at java.util.concurrent.FutureTask.run(FutureTask.java:166)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
            at java.lang.Thread.run(Thread.java:636)
            Caused by: org.mc4j.ems.connection.EmsConnectException: Connection failure null
            at org.mc4j.ems.impl.jmx.connection.support.providers.proxy.GenericMBeanServerProxy.invoke(GenericMBeanServerProxy.java:160)
            at $Proxy47.invoke(Unknown Source)
            at org.mc4j.ems.impl.jmx.connection.bean.operation.DOperation.invoke(DOperation.java:111)
            ... 13 more
            Caused by: MBeanException: null Cause: javax.management.InstanceNotFoundException: java.lang:type=Threading is not registered.
            at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:180)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.system.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:291)
            at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:214)
            at sun.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:616)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
            at org.jboss.jmx.connector.invoker.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:108)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.system.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:291)
            at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)
            at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:616)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.system.server.jmx.LazyMBeanServer.invoke(LazyMBeanServer.java:291)
            at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:818)
            at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:419)
            at sun.reflect.GeneratedMethodAccessor141.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:616)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
            at sun.rmi.transport.Transport$1.run(Transport.java:177)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
            ... 3 more
            Caused by: javax.management.InstanceNotFoundException: java.lang:type=Threading is not registered.
            at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)
            at org.jboss.mx.server.registry.BasicMBeanRegistry.getValue(BasicMBeanRegistry.java:561)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:616)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            ... 48 more