3 Replies Latest reply on Jan 24, 2011 5:43 AM by pilhuhn

    Hibernate Statistics Plugin errors with JBoss AS 6 CR1

    mmusgrov

      I am seeing errors in the rhq agent log when the RHQ agent starts the Hibernate Statistics plugin caused by a failure of the JMX MBeanResourceDiscoveryComponent to obtain a connection to the target (AS6) server:

       

      2010-12-21 18:29:41,537 WARN  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failure during discovery for [Hibernate Statistics] Resources - failed after 5 ms.
      java.lang.Exception: Discovery component invocation failed.
          at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:283)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.NullPointerException: The parent resource component [org.rhq.plugins.jbossas5.ApplicationServerComponent@7bd2e501] returned a null connection - cannot discover MBeans without a connection
          at org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent.performDiscovery(MBeanResourceDiscoveryComponent.java:135)
          at org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent.discoverResources(MBeanResourceDiscoveryComponent.java:96)
          at org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent.discoverResources(MBeanResourceDiscoveryComponent.java:84)
          at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:279)
          ... 5 more

      2010-12-21 18:29:41,537 WARN  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failure during discovery for [Hibernate Statistics] Resources - failed after 5 ms.

      java.lang.Exception: Discovery component invocation failed.

          at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:283)

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

          at java.util.concurrent.FutureTask.run(FutureTask.java:138)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:619)

      Caused by: java.lang.NullPointerException: The parent resource component [org.rhq.plugins.jbossas5.ApplicationServerComponent@7bd2e501] returned a null connection - cannot discover MBeans without a connection

          at org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent.performDiscovery(MBeanResourceDiscoveryComponent.java:135)

          at org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent.discoverResources(MBeanResourceDiscoveryComponent.java:96)

          at org.rhq.plugins.jmx.MBeanResourceDiscoveryComponent.discoverResources(MBeanResourceDiscoveryComponent.java:84)

          at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:279)

          ... 5 more

       

      I am using the same technique (namely, extending MBeanResourceComponent) for the JBossTS RHQ plugin and I am getting the same errors. Perhaps there is a security setting I need to apply to the app server to enable the access.

        • 1. Re: Hibernate Statistics Plugin errors with JBoss AS 6 CR1
          pilhuhn

          Is the AS6 itself up and in inventory?

          Usually you need to enable access to  jmx-console and use the very same credentials in the AS6's connection properties within RHQ.

          Heiko

          • 2. Re: Hibernate Statistics Plugin errors with JBoss AS 6 CR1
            mmusgrov

            I can see various resources such as EJBs and datasources in the RHQ console so it is definitely in the inventory.

             

            I made sure that the username/password in the jmx-console-users.properties file matches the one set in the Connection properties of the JBoss AS instance inventory tab via the RHQ console (and the naming provider url matches the one specified in the AS JMX console). But when I update the connection properties the RHQ GUI fails with: 

             

             

            Unable to update this resource's connection properties. org.rhq.core.clientapi.agent.discovery.InvalidPluginConfigurationClientException: Unable to connect to managed resource of type [JBossAS Server] using the specified connection properties. Failed to start component for resource Resource[id=10668, type=JBossAS Server, key=/home/mmusgrov/source/as/jboss-eap-5.1/jboss-as/server/all, name=dev1:1099, parent=dev1, version=5.1.0]. at org.rhq.core.pc.inventory.InventoryManager.updatePluginConfiguration(InventoryManager.java:483) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25
            
            etc
            
            • 3. Hibernate Statistics Plugin errors with JBoss AS 6 CR1
              pilhuhn

              Hey,

              I came around this yesterday: http://stackoverflow.com/questions/4761496/how-to-activate-jmx-on-my-jrockit-jvm-for-access-with-jconsole/4763287#4763287 -- could you see if that applies to you as well (don't let you confuse by 'jrocket')

               

                Heiko