7 Replies Latest reply on Jul 19, 2012 9:41 AM by sarahfr

    how to manage an application (.war or .ear) with an agent (rhq project)??????????????

    sarahfr Newbie

      Hi,

      I try to manage my application with an agent (rhq project 4.4.0) but I can not see my application in resources  which  are  managed by my agent.

      please any idea??????????

       

      ps: I deployed my application in standalone mode (jboss 7.1.1), and I can see my AS 7 server in resouces which are managed by my agent

       

      thanks

        • 1. Re: how to manage an application (.war or .ear) with an agent (rhq project)??????????????
          jay shaughnessy Expert

          It sounds like you successfully imported your AS7 server resource, and you can navigate to it such that it shows up in the resource detail view, and is the selected node in the resource tree view on the left side of the screen.  But that when you expand the tree nodes under the AS7 server, or if you search for your application directly, you don't see it.  Did you deploy your [web] application after importing the AS7 server?  If so it won't be discovered until the next time the agent performs discovery, which happens only once per day for service-level resources (because there is typically very little change in the underlying resources).

           

          So, you can wait or you can force a discovery by executing the 'discovery -f' prompt command on your agent.  (via the command prompt in interactive mode, or via the RHQ Agent resources' 'Execute Prompt Command' operation.  Discovery also happens on an Agent restart.

           

          Hope this helps.

          1 of 1 people found this helpful
          • 2. Re: how to manage an application (.war or .ear) with an agent (rhq project)??????????????
            sarahfr Newbie

            thanks for your answer,

            yes, I deployed my application we after importing the AS7 server.

            I forced the discovery of my applicationI by executing the 'discovery -f' prompt command on your agent but I can not see my application in resouces.


            • 3. Re: how to manage an application (.war or .ear) with an agent (rhq project)??????????????
              jay shaughnessy Expert

              Hmmm, that's odd.   Did the discovery complete successfully?  It can take some time depending on the size of the installation and the agent load.  Is the application running as expected, meaning can you hit it with a browser?  Did you have an active GUI session, if so perhaps you need to refresh your view.

               

              Otherwise I can only recommend that you look in your RHQ agent log for any errors related to the discovery, because I think it should have ben found and reported.   You can also check your server log, I think you should see a message about discovered resources (I'm not 100% sure about that, though).

              1 of 1 people found this helpful
              • 5. Re: how to manage an application (.war or .ear) with an agent (rhq project)??????????????
                sarahfr Newbie

                in the RHQ agent log I have this:

                 

                 

                2012-07-19 15:17:11,480 INFO  [RHQ Agent Prompt Input Thread] (org.rhq.enterprise.agent.AgentMain)- {AgentMain.prompt-command-invoked}Prompt command invoked: [discovery]

                2012-07-19 15:17:37,061 WARN  [WorkerThread#0[172.31.6.224:62887]] (rhq.core.pc.operation.OperationManager)- Failed to submit operation invocation request

                org.rhq.core.clientapi.agent.PluginContainerException: Component does not exist for resource: Resource[id=10001, uuid=97eeee10-f2cf-4ccb-ac4f-d71deac2ec19, type={Platforms}Windows, key=cameleon, name=cameleon, parent=<null>, version=Windows 6.1]

                          at org.rhq.core.pc.inventory.ResourceContainer.createResourceComponentProxy(ResourceContainer.java:428)

                          at org.rhq.core.pc.util.ComponentUtil.getComponent(ComponentUtil.java:105)

                          at org.rhq.core.pc.operation.OperationManager.getOperationFacet(OperationManager.java:199)

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

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

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

                          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.GeneratedMethodAccessor50.invoke(Unknown Source)

                          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:420)

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

                • 6. Re: how to manage an application (.war or .ear) with an agent (rhq project)??????????????
                  jay shaughnessy Expert

                  That's a pretty odd error but certainly it seems like discovery is not working for you yet.  I'm not exactly sure how your agent got into that state, did you uninventory your platform at any point?  Perhaps try an agent restart using the --purgedata option and see if that resolves the situation.

                  • 7. Re: how to manage an application (.war or .ear) with an agent (rhq project)??????????????
                    sarahfr Newbie

                    I restart my agent then I execute discovery command but I can not see my application :

                     

                    > shutdown

                    Shutting down...

                    Shutdown complete.

                    >

                    >

                    > start

                    Starting the agent...

                    Started the agent successfully.

                    > discovery

                    Apache.Apache HTTP Server: Starting discovery...

                    Apache.Apache HTTP Server: Done.

                     

                     

                    Cron.Cron: Starting discovery...

                    Cron.Cron: key=[Cron], name=[Cron], version=[null], description=[The cron configuration]

                    Cron.Cron: Done.

                     

                     

                    GRUB.GRUB: Starting discovery...

                    GRUB.GRUB: Done.

                     

                     

                    IIS.IIS: Starting discovery...

                    IIS.IIS: Done.

                     

                     

                    JBossAS.JBossAS Server: Starting discovery...

                    JBossAS.JBossAS Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.Main|match=.*], name=[JBoss4]], p

                    JBossAS.JBossAS Server: key=[C:\travail\projet-RHQ\rhq-server-4.4.0\jbossas\server\default], name=[dev36-PC:2099 RHQ Server], version=[AS 4.2.3.GA], description=

                    JBossAS.JBossAS Server: Done.

                     

                     

                    JBossAS5.JBossAS Server: Starting discovery...

                    JBossAS5.JBossAS Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.Main|match=.*], name=[jbossas]],

                    JBossAS5.JBossAS Server: Done.

                     

                     

                    JBossAS7.JBossAS7 Host Controller: Starting discovery...

                    JBossAS7.JBossAS7 Host Controller: Done.

                     

                     

                    JBossAS7.JBossAS7 Standalone Server: Starting discovery...

                    JBossAS7.JBossAS7 Standalone Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.as.standalone|match=

                    JBossAS7.JBossAS7 Standalone Server: key=[C:\travail\Jboss-as-7\jboss-as-7.1.1.Final\standalone], name=[AS (172.31.6.224:9990)], version=[7.1.1.Final], descripti

                    JBossAS7.JBossAS7 Standalone Server: Done.

                     

                     

                    JMX.JMX Server: Starting discovery...

                    JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[1848], name=[C:\

                    JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[6364], name=[C:\

                    JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[7176], name=[C:\

                    JMX.JMX Server: Done.

                     

                     

                    MySql.MySql Server: Starting discovery...

                    MySql.MySql Server: Done.

                     

                     

                    OpenSSH.SSHD: Starting discovery...

                    OpenSSH.SSHD: Done.

                     

                     

                    Oracle.Oracle Server: Starting discovery...

                    Oracle.Oracle Server: Done.

                     

                     

                    PerfTest.server-a: Starting discovery...

                    PerfTest.server-a: Done.

                     

                     

                    PerfTest.server-b: Starting discovery...

                    PerfTest.server-b: Done.

                     

                     

                    PerfTest.server-c: Starting discovery...

                    PerfTest.server-c: Done.

                     

                     

                    PerfTest.server-config: Starting discovery...

                    PerfTest.server-config: Done.

                     

                     

                    PerfTest.server-d: Starting discovery...

                    PerfTest.server-d: Done.

                     

                     

                    PerfTest.server-e: Starting discovery...

                    PerfTest.server-e: Done.

                     

                     

                    PerfTest.server-omega: Starting discovery...

                    PerfTest.server-omega: Done.

                     

                     

                    PerfTest.server-rogue: Starting discovery...

                    PerfTest.server-rogue: Done.

                     

                     

                    Postfix.Postfix Server: Starting discovery...

                    Postfix.Postfix Server: key=[/etc/postfix/main.cf], name=[dev36-PC], version=[null], description=[Configuration for Postfix Server]

                    Postfix.Postfix Server: Done.

                     

                     

                    Postgres.Postgres Server: Starting discovery...

                    Postgres.Postgres Server: Done.

                     

                     

                    RHQAgent.RHQ Agent: Starting discovery...

                    RHQAgent.RHQ Agent: key=[cameleon RHQ Agent], name=[RHQ Agent], version=[4.4.0], description=[RHQ Management Agent]

                    RHQAgent.RHQ Agent: Done.

                     

                     

                    Samba.Samba Server: Starting discovery...

                    Samba.Samba Server: key=[/etc/samba/smb.conf], name=[dev36-PC], version=[null], description=[Configuration for Samba Server]

                    Samba.Samba Server: Done.

                     

                     

                    Script.Script Server: Starting discovery...

                    Script.Script Server: Done.

                     

                     

                    Tomcat.Tomcat Server: Starting discovery...

                    Tomcat.Tomcat Server: Done.

                     

                     

                    Twitter.Twitter: Starting discovery...

                    Twitter.Twitter: Done.

                     

                     

                    hudson.Hudson Server: Starting discovery...

                    hudson.Hudson Server: Done.

                     

                     

                    snmptrapd.SnmpTrapd: Starting discovery...

                    snmptrapd.SnmpTrapd: Done.

                     

                     

                    > discovery

                    Apache.Apache HTTP Server: Starting discovery...

                    Apache.Apache HTTP Server: Done.

                     

                     

                    Cron.Cron: Starting discovery...

                    Cron.Cron: key=[Cron], name=[Cron], version=[null], description=[The cron configuration]

                    Cron.Cron: Done.

                     

                     

                    GRUB.GRUB: Starting discovery...

                    GRUB.GRUB: Done.

                     

                     

                    IIS.IIS: Starting discovery...

                    IIS.IIS: Done.

                     

                     

                    JBossAS.JBossAS Server: Starting discovery...

                    JBossAS.JBossAS Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.Main|match=.*], name=[JBoss4]], p

                    JBossAS.JBossAS Server: key=[C:\travail\projet-RHQ\rhq-server-4.4.0\jbossas\server\default], name=[dev36-PC:2099 RHQ Server], version=[AS 4.2.3.GA], description=

                    JBossAS.JBossAS Server: Done.

                     

                     

                    JBossAS5.JBossAS Server: Starting discovery...

                    JBossAS5.JBossAS Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.Main|match=.*], name=[jbossas]],

                    JBossAS5.JBossAS Server: Done.

                     

                     

                    JBossAS7.JBossAS7 Host Controller: Starting discovery...

                    JBossAS7.JBossAS7 Host Controller: Done.

                     

                     

                    JBossAS7.JBossAS7 Standalone Server: Starting discovery...

                    JBossAS7.JBossAS7 Standalone Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.as.standalone|match=

                    JBossAS7.JBossAS7 Standalone Server: key=[C:\travail\Jboss-as-7\jboss-as-7.1.1.Final\standalone], name=[AS (172.31.6.224:9990)], version=[7.1.1.Final], descripti

                    JBossAS7.JBossAS7 Standalone Server: Done.

                     

                     

                    JMX.JMX Server: Starting discovery...

                    JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[1848], name=[C:\

                    JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[6364], name=[C:\

                    JMX.JMX Server: Process scan detected a server - scan=[ProcessScan: query=[process|basename|match=^java.*], name=[java]], process=[process: pid=[7176], name=[C:\

                    JMX.JMX Server: Done.

                     

                     

                    MySql.MySql Server: Starting discovery...

                    MySql.MySql Server: Done.

                     

                     

                    OpenSSH.SSHD: Starting discovery...

                    OpenSSH.SSHD: Done.

                     

                     

                    Oracle.Oracle Server: Starting discovery...

                    Oracle.Oracle Server: Done.

                     

                     

                    PerfTest.server-a: Starting discovery...

                    PerfTest.server-a: Done.

                     

                     

                    PerfTest.server-b: Starting discovery...

                    PerfTest.server-b: Done.

                     

                     

                    PerfTest.server-c: Starting discovery...

                    PerfTest.server-c: Done.

                     

                     

                    PerfTest.server-config: Starting discovery...

                    PerfTest.server-config: Done.

                     

                     

                    PerfTest.server-d: Starting discovery...

                    PerfTest.server-d: Done.

                     

                     

                    PerfTest.server-e: Starting discovery...

                    PerfTest.server-e: Done.

                     

                     

                    PerfTest.server-omega: Starting discovery...

                    PerfTest.server-omega: Done.

                     

                     

                    PerfTest.server-rogue: Starting discovery...

                    PerfTest.server-rogue: Done.

                     

                     

                    Postfix.Postfix Server: Starting discovery...

                    Postfix.Postfix Server: key=[/etc/postfix/main.cf], name=[dev36-PC], version=[null], description=[Configuration for Postfix Server]

                    Postfix.Postfix Server: Done.

                     

                     

                    Postgres.Postgres Server: Starting discovery...

                    Postgres.Postgres Server: Done.

                     

                     

                    RHQAgent.RHQ Agent: Starting discovery...

                    RHQAgent.RHQ Agent: key=[cameleon RHQ Agent], name=[RHQ Agent], version=[4.4.0], description=[RHQ Management Agent]

                    RHQAgent.RHQ Agent: Done.

                     

                     

                    Samba.Samba Server: Starting discovery...

                    Samba.Samba Server: key=[/etc/samba/smb.conf], name=[dev36-PC], version=[null], description=[Configuration for Samba Server]

                    Samba.Samba Server: Done.

                     

                     

                    Script.Script Server: Starting discovery...

                    Script.Script Server: Done.

                     

                     

                    Tomcat.Tomcat Server: Starting discovery...

                    Tomcat.Tomcat Server: Done.

                     

                     

                    Twitter.Twitter: Starting discovery...

                    Twitter.Twitter: Done.

                     

                     

                    hudson.Hudson Server: Starting discovery...

                    hudson.Hudson Server: Done.

                     

                     

                    snmptrapd.SnmpTrapd: Starting discovery...

                    snmptrapd.SnmpTrapd: Done.

                     

                     

                    in my agent log I have this:

                     

                     

                    2012-07-19 15:39:32,491 INFO  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- New configuration version detected on resource: Resource[id=10005, uuid=4301bee6-8e6c-4ee2-aec2-45e7fed161b0, type={RHQAgent}RHQ Agent, key=cameleon RHQ Agent, name=RHQ Agent, parent=cameleon, version=4.4.0]

                    2012-07-19 15:39:32,498 INFO  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- New configuration version detected on resource: Resource[id=10033, uuid=e7aba3d9-60d2-4bec-a8f4-e1b72f925aa1, type={RHQAgent}Environment Setup Script, key=environment-setup-script, name=rhq-agent-env.bat, parent=RHQ Agent, version=4.4.0]

                    2012-07-19 15:39:32,498 INFO  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- New configuration version detected on resource: Resource[id=10038, uuid=e9536aa1-073d-4d50-9ae8-b09189140333, type={RHQAgent}VM Class Loading System, key=java.lang:type=ClassLoading, name=Class Loading, parent=JVM]

                    2012-07-19 15:39:32,499 INFO  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- New configuration version detected on resource: Resource[id=10039, uuid=d0063c7e-8816-4d89-a96a-954556b8b2b6, type={RHQAgent}Threading, key=java.lang:type=Threading, name=Threading, parent=JVM]

                    2012-07-19 15:39:32,501 INFO  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- New configuration version detected on resource: Resource[id=10041, uuid=2209ac9c-2d0b-4b2d-8feb-ebe56380c143, type={RHQAgent}VM Memory System, key=java.lang:type=Memory, name=Memory Subsystem, parent=JVM]

                    2012-07-19 15:39:32,503 INFO  [ResourceContainer.invoker.daemon-2] (org.rhq.plugins.jmx.MBeanResourceComponent)- Configuration management is currently disabled for the {RHQAgent}java.util.logging Resource with key [java.util.logging:type=Logging] - it can be enabled in the Resource's Inventory > Connection tab.

                    2012-07-19 15:39:32,521 WARN  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Plugin Error: Invalid Java Service Wrapper Launcher resource configuration returned by RHQAgent plugin - Required property 'value' has a null value in PropertyMap[id=0, name=mainConfigurationSetting, map={name=PropertySimple[id=0, name=name, value=wrapper.ntservice.dependency.1, override=null], value=PropertySimple[id=0, name=value, value=null, override=null]}].

                    2012-07-19 15:39:32,521 INFO  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- New configuration version detected on resource: Resource[id=10036, uuid=fbd99f14-8b6c-4bc4-8eed-f461d6109b17, type={RHQAgent}Java Service Wrapper Launcher, key=jsw, name=RHQ Agent Java Service Wrapper, parent=RHQ Agent, version=4.4.0]

                    2012-07-19 15:39:32,522 INFO  [ConfigurationManager.threadpool-1] (rhq.core.pc.configuration.ConfigurationCheckExecutor)- Configuration update check completed in 38ms

                    2012-07-19 15:39:36,627 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.AutoDiscoveryExecutor)- Executing server discovery scan...

                    2012-07-19 15:39:37,019 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.AutoDiscoveryExecutor)- Discovered 4 new server(s).

                    2012-07-19 15:39:37,020 INFO  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Sending [server] inventory report to Server...