3 Replies Latest reply on Aug 3, 2011 2:28 AM by mihir8979

    Error while adding JMX server

    mihir8979 Newbie

       

       

      All ,

      I am getting below error while adding JMX server manually from RHQ server. Any one has idea how to recover from this error gracefully.

       

      I am able to connect to JMX server from JCONSOLE.

       

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

      Caused by: java.lang.NullPointerException: [Warning] null

      ... 25 more

      2011-08-02 19:39:16,791 INFO [org.rhq.enterprise.server.core.AgentManagerBean] Have not heard from agent [225Box] since [Tue Aug 02 19:00:28 IST 2011]. Will be backfilled since we suspect it is down

      2011-08-02 19:40:16,718 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 2292, SQLState: 23000

      2011-08-02 19:40:16,719 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-02292: integrity constraint (RHQ.SYS_C008511) violated - child record found

      2011-08-02 19:40:16,719 ERROR [org.rhq.enterprise.server.resource.ResourceManagerBean] Bulk named query delete error for 'AlertCondition.deleteByResources' for [10861]: org.hibernate.exception.ConstraintViolationException: could not execute update query

      2011-08-02 19:40:16,747 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 2292, SQLState: 23000

      2011-08-02 19:40:16,747 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-02292: integrity constraint (RHQ.SYS_C008494) violated - child record found

      2011-08-02 19:40:16,747 ERROR [org.rhq.enterprise.server.resource.ResourceManagerBean] Bulk named query delete error for 'AlertDefinition.deleteByResources' for [10861]: org.hibernate.exception.ConstraintViolationException: could not execute update query

      2011-08-02 19:40:16,749 INFO [org.rhq.enterprise.server.scheduler.jobs.AsyncResourceDeleteJob] Async resource deletion - 1 successful, 0 failed, took [270] ms

      2011-08-02 19:40:33,591 WARN [org.hibernate.hql.ast.QueryTranslatorImpl] firstResult/maxResults specified with collection fetch; applying in memory!

      2011-08-02 19:40:55,362 WARN [gwt-log] Sending exception to client: [1312294255362]

      org.rhq.core.clientapi.agent.PluginContainerException: Failed to add resource with type [JMX Server] and parent resource id [10981]

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

      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.NullPointerException: [Warning] null

       

      ... 25 more

        • 1. Re: Error while adding JMX server
          Ian Springer Master

          I don't see the stack trace for the NPE in what you pasted. Can you look in your agent.log file on the Agent machine and see if you can find it and then paste that in here?

          • 2. Re: Error while adding JMX server
            mihir8979 Newbie

            This is the stack trace I found in agent.log.

             

            at org.rhq.core.pc.inventory.InventoryManager.activateResource(InventoryManager.java:1592)

            at org.rhq.core.pc.inventory.InventoryManager.activateAndUpgradeResourceRecursively(InventoryManager.java:2745)

            at org.rhq.core.pc.inventory.InventoryManager.activateAndUpgradeResourceRecursively(InventoryManager.java:2747)

            at org.rhq.core.pc.inventory.InventoryManager.activateAndUpgradeResourceRecursively(InventoryManager.java:2747)

            at org.rhq.core.pc.inventory.InventoryManager.activateAndUpgradeResources(InventoryManager.java:2709)

            at org.rhq.core.pc.inventory.InventoryManager.initialize(InventoryManager.java:228)

            at org.rhq.core.pc.PluginContainer.startContainerService(PluginContainer.java:425)

            at org.rhq.core.pc.PluginContainer.initialize(PluginContainer.java:279)

            at org.rhq.enterprise.agent.AgentMain.startPluginContainer(AgentMain.java:1867)

            at org.rhq.enterprise.agent.AgentMain.start(AgentMain.java:648)

            at org.rhq.enterprise.agent.AgentMain.main(AgentMain.java:418)

            Caused by: java.lang.NullPointerException

            at org.rhq.plugins.jmx.MBeanResourceComponent.loadBean(MBeanResourceComponent.java:190)

            at org.rhq.plugins.jmx.MBeanResourceComponent.loadBean(MBeanResourceComponent.java:176)

            at org.rhq.plugins.jmx.MBeanResourceComponent.start(MBeanResourceComponent.java:108)

            at sun.reflect.GeneratedMethodAccessor28.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.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)

            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)

            • 3. Re: Error while adding JMX server
              mihir8979 Newbie

              This is one more trace visible

               

              org.rhq.core.clientapi.agent.PluginContainerException: Resource component container could not be retrieved for resource: 10215

              at org.rhq.core.pc.util.ComponentUtil.getResourceType(ComponentUtil.java:55)

              at org.rhq.core.pc.operation.OperationManager.getResourceType(OperationManager.java:213)

              at org.rhq.core.pc.operation.OperationManager.getOperationDefinition(OperationManager.java:272)

              at org.rhq.core.pc.operation.OperationManager.invokeOperation(OperationManager.java:124)

              at org.rhq.core.pc.operation.OperationManager.invokeOperation(OperationManager.java:110)

              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)