3 Replies Latest reply on Apr 2, 2012 7:41 PM by aureliocalegari

    Manual JMX Server setup error: RHQ 4.3.0

    aureliocalegari

      I'm a big fan of RHQ and have been using RHQ 3.0 for a long while. I currently just started migrating to RHQ 4.3.0 and I was testing it. I'm unable to register a JMX Server manually as I used to. Here's my settings:

       

      Agent running on a windows box, server on a Fedora.

       

      On the windows platform (below its27940), in the inventory, I tried to add a new JMX Service:

      setting_rhq.PNG

      Which connects well with JVisualVM:

      jvusualvm.PNG

       

      But when I hit Finish, I got an error message in the server side and the following stack trace in the agent side:

       

      2012-03-22 08:32:00,971 INFO  [ResourceDiscoveryComponent.invoker.daemon-94] (ems.impl.jmx.connection.DConnection)- Found 154 MBeans - starting load...

      2012-03-22 08:32:00,986 ERROR [WorkerThread#0[10.35.12.74:46690]] (rhq.core.pc.inventory.InventoryManager)- Manual add failed for resource of type [JMX Server] and parent resource id [10001]

      java.lang.reflect.UndeclaredThrowableException

              at $Proxy73.discoverResource(Unknown Source)

              at org.rhq.core.pc.inventory.InventoryManager.discoverResource(InventoryManager.java:357)

              at org.rhq.core.pc.inventory.InventoryManager.manuallyAddResource(InventoryManager.java:687)

              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.rhq.enterprise.communications.command.impl.remotepojo.server.RemotePojoInvocationCommandService.execute(RemotePojoInvocationCommandService.java:184)

              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 com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)

              at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)

              at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)

              at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)

              at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)

              at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)

              at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:288)

              at $Proxy0.execute(Unknown Source)

              at org.rhq.enterprise.communications.command.server.CommandProcessor.handleIncomingInvocationRequest(CommandProcessor.java:290)

              at org.rhq.enterprise.communications.command.server.CommandProcessor.invoke(CommandProcessor.java:184)

              at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)

              at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)

              at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)

              at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)

      Caused by: java.lang.Exception: Discovery component invocation failed.

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

              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.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.Object;

              at javax.management.openmbean.TabularDataSupport.get(TabularDataSupport.java:260)

              at org.rhq.plugins.jmx.JMXDiscoveryComponent.getJavaVersion(JMXDiscoveryComponent.java:267)

              at org.rhq.plugins.jmx.JMXDiscoveryComponent.discoverResource(JMXDiscoveryComponent.java:247)

              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.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:292)

              ... 5 more

       

      Do you have any thoughts?

       

      Regards

      Aurelio

        • 1. Re: Manual JMX Server setup error: RHQ 4.3.0
          ips

          Hi Aurelio,  Thanks for reporting this regression. I've fixed it in master (see https://bugzilla.redhat.com/show_bug.cgi?id=809191).  I'm curious - why did you have to manually add your JMX Server? I would have thought it would have been autodiscovered.  Regards, Ian

          • 2. Re: Manual JMX Server setup error: RHQ 4.3.0
            aureliocalegari

            Thanks Ian!

             

            In one of the particular boxes we have RHQ agent running, there are applications that belong to different accounts and we're not allowed to have it running as root. Since all we care is the JMX connection where we have our custom plugins to collect the metrics we're interested we thought that although the agent cannot recognise the processes it could still remotely connect from localhost to it. It used to work on RHQ  3.0.

             

            Do I have to go through the new RHQ server setup again to get the fix?

             

            Cheers

            Aurelio

            • 3. Re: Manual JMX Server setup error: RHQ 4.3.0
              aureliocalegari

              Just a thought... You guys could make available for download nightly builds so we could easily download fresh binaries... It will take a while for me to set the environment to build it and I won't be able to do it this week. We're likely to go to RHQ 3.0.0. Do you know when 4.4.0 will be available?

              :-(