1 2 3 4 Previous Next 52 Replies Latest reply on Jun 19, 2013 7:33 AM by will.tatam

    Jopr and JBoss AS 5.1.0

    swiderski.maciej

      Hi,

       

      I am trying to monitor JBoss AS 5.1.0 using Jopr but so far no success. It just can't discover the server. I have added plugin for jboss as 5 but dod not help.

       

      Is it possible to have JBoss AS 5.1.0 under control of Jopr?!

       

      Thanks in advance

      Maciej

        • 1. Re: Jopr and JBoss AS 5.1.0
          ips
          No, AS 5.1 can't be discovered or managed by Jopr. Only EAP 5.0 or later or AS 6.0 or later are supported. this is because there were some issues with the Profile Service's remote interface which were not fixed until after 5.1 was released.
          • 2. Re: Jopr and JBoss AS 5.1.0
            swiderski.maciej

            ok, so this means that there is no monitoring tool for JBoss AS 5.1.0 (non commercial release) to be able to monitor more than one server instance?!

             

            Admin console that is shipped with JBoss AS 5.1.0 can only show information regarding only that server which it is running on.

             

            What I am trying to achieve is to be able to setup several application server instances and be able to monitor and manage them in one central place. Is there any alternative way for doing that?

             

            Thanks

            Maciej

            • 3. Re: Jopr and JBoss AS 5.1.0
              ips

              There's no official way. However, you might be able to make it work using the jboss-as (i.e. JBoss AS 4.x) plugin, which uses JMX, rather than the Profile Service, as the management interface. To try this, you would have to checkout RHQ source from git and remove or change the following code in JBossASDiscoveryComponent.discoverResources():    

               

              String version = installInfo.getVersion();
              if (version.startsWith("5") || version.startsWith("6")) {                 
                 throw new InvalidPluginConfigurationException("The specified server is JBoss AS 5.0 or later - only AS 3.2 or 4.x are valid for this Resource type.");          
              }

               

              Then compile and deploy the plugin and see if it discovers and is able to manage a 5.1.0 instance.  I've never tried this and so am not positive it will work. Let me know how it goes.

              • 4. Re: Jopr and JBoss AS 5.1.0
                swiderski.maciej

                Great hint Ian, thanks. Will give it a try tomorrow and keep you updated with the result. Hope it will work.

                 

                Cheers,

                Maciej

                • 5. Re: Jopr and JBoss AS 5.1.0
                  swiderski.maciej

                  OK, finally I managed to build the plug in and made the described change. The result was quite promising - JBoss 5.1.0 was found by agent and was possible to import it on the server, but... here problems start.

                  It was only visible as server without any resources (applications, resources, etc). Whatever I tried to do on that server it caused an error. Below you can find stack trace from agent log file:

                  java.lang.Exception: java.lang.NoClassDefFoundError: Could not initialize class org.jnp.interfaces.NamingContext
                       at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:530)
                       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.NoClassDefFoundError: Could not initialize class org.jnp.interfaces.NamingContext
                       at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:55)
                       at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
                       at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
                       at javax.naming.InitialContext.init(InitialContext.java:223)
                       at javax.naming.InitialContext.<init>(InitialContext.java:197)
                       at org.mc4j.ems.impl.jmx.connection.support.providers.JBossConnectionProvider.getInitialContext(JBossConnectionProvider.java:112)
                       at org.mc4j.ems.impl.jmx.connection.support.providers.JBossConnectionProvider.doConnect(JBossConnectionProvider.java:69)
                       at org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider.connect(AbstractConnectionProvider.java:99)
                       at org.rhq.plugins.jbossas.JBossASServerComponent.loadConnection(JBossASServerComponent.java:1028)
                       at org.rhq.plugins.jbossas.JBossASServerComponent.getEmsConnection(JBossASServerComponent.java:394)
                       at org.rhq.plugins.jbossas.JBossASServerOperationsDelegate.shutdownViaJmx(JBossASServerOperationsDelegate.java:325)
                       at org.rhq.plugins.jbossas.JBossASServerOperationsDelegate.shutdown(JBossASServerOperationsDelegate.java:245)
                       at org.rhq.plugins.jbossas.JBossASServerOperationsDelegate.invoke(JBossASServerOperationsDelegate.java:115)
                       at org.rhq.plugins.jbossas.JBossASServerComponent.invokeOperation(JBossASServerComponent.java:330)
                       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.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
                       ... 5 more
                  
                  

                   

                  In addition I found that agent is expecting some libraries under JBoss home directory that were not present there:

                  Connection library dependancy [client/jboss-common.jar] not found  in directory: D:\Tools\jboss-5.1.0.GA\jboss-5.1.0.GA
                  Connection library dependancy [*/*/lib/jboss.jar] not found  in directory: D:\Tools\jboss-5.1.0.GA\jboss-5.1.0.GA
                  Connection library dependancy [*/*/lib/jboss-transaction.jar] not found  in directory: D:\Tools\jboss-5.1.0.GA\jboss-5.1.0.GA
                  Connection library dependancy [lib/xercesImpl.jar] not found  in directory: D:\Tools\jboss-5.1.0.GA\jboss-5.1.0.GA
                  Connection library dependancy [lib/xml-apis.jar] not found  in directory: D:\Tools\jboss-5.1.0.GA\jboss-5.1.0.GA
                  Connection library dependancy [client/jmx-rmi-connector-client.jar] not found  in directory: D:\Tools\jboss-5.1.0.GA\jboss-5.1.0.GA
                  Connection library dependancy [client/jboss-j2ee.jar] not found  in directory: D:\Tools\jboss-5.1.0.GA\jboss-5.1.0.GA
                  Connection library dependancy [*/*/lib/jboss-management.jar] not found  in directory: D:\Tools\jboss-5.1.0.GA\jboss-5.1.0.GA
                  Connection library dependancy [*/*/lib/jbosssx.jar] not found  in directory: D:\Tools\jboss-5.1.0.GA\jboss-5.1.0.GA
                  Connection library dependancy [lib/endorsed/xml-apis.jar] not found  in directory: D:\Tools\jboss-5.1.0.GA\jboss-5.1.0.GA
                  Connection library dependancy [*/*/lib/hibernate3.jar] not found  in directory: D:\Tools\jboss-5.1.0.GA\jboss-5.1.0.GA
                  

                   

                  Any ideas if that is possible to achieve? Other ideas that can help me reach the target (have a one system that can control, monitor JBoss 5.1.0 app servers) will be good too.

                   

                  Thanks

                  Maciej

                  • 6. Re: Jopr and JBoss AS 5.1.0
                    ips

                    Sounds like you're halfway there  :-)

                     

                    The issue you're seeing is because the client jars required to connect to JMX via JNP are in different locations in AS5, than in AS4. The jboss-as plugin is looking in the AS4 locations and not finding all the jars it needs. To fix this, you should be able to add a new class (e.g. YourJBossConnectionTypeDescriptor) that extends JBossConnectionTypeDescriptor (from mc4j-ems.jar) and override getRecongnitionPath() and getConnectionClasspathEntries() as follows:

                     

                        public String getRecongnitionPath() {
                            return "lib/jboss-system.jar";
                        }
                    
                        public String[] getConnectionClasspathEntries() {
                            return new String[] {
                                // 3.x jars
                                "lib/jboss-jmx.jar",
                                "client/jboss-common.jar",
                                "lib/jboss-system.jar",
                                "client/jbossall-client.jar",
                                "client/log4j.jar",
                                "*/*/lib/jboss.jar",
                                "client/concurrent.jar",
                                "client/jboss-jsr77-client.jar",
                    
                                // 3.2.3 jars
                                "*/*/lib/jboss-transaction.jar",
                                "lib/xercesImpl.jar",
                                "lib/xml-apis.jar",
                    
                                // 4.x jars
                                "lib/dom4j.jar",
                                "client/jnp-client.jar",
                                "client/jmx-rmi-connector-client.jar",
                                "client/jboss-j2ee.jar",
                                "*/*/lib/jboss-management.jar",
                                "*/*/lib/jbosssx.jar",
                                "client/jbosssx-client.jar",
                                "lib/endorsed/xercesImpl.jar",
                                "lib/endorsed/xml-apis.jar",
                                "*/*/lib/hibernate3.jar",
                    
                                // 5.x jars
                                "client/jboss-common-core.jar",
                                "lib/jboss-profileservice-spi.jar",
                                "client/jboss-logging-jdk.jar",
                                "client/jboss-logging-spi.jar",
                                "client/jboss-aop-client.jar",
                                "client/jboss-remoting.jar",
                                "common/lib/jboss-security-aspects.jar",
                                "client/jboss-aspect-jdk50-client.jar",
                                "client/trove.jar",
                                "client/javassist.jar",
                                "client/jboss-mdr.jar",
                                "client/jboss-security-spi.jar",
                                "client/jboss-javaee.jar",
                                "client/jmx-invoker-adaptor-client.jar",
                                "client/jboss-client.jar",
                                "client/jboss-integration.jar",
                                "client/jboss-serialization.jar",
                                "common/lib/hibernate-core.jar"
                            };
                        }
                    
                    

                     

                    Then, in org.rhq.plugins.jbossas.JBossASDiscoveryComponent, change the following line:

                     

                    pluginConfiguration.put(new PropertySimple(JMXDiscoveryComponent.CONNECTION_TYPE,
                                    JBossConnectionTypeDescriptor.class.getName()));
                    
                    

                    to:

                     

                    pluginConfiguration.put(new PropertySimple(JMXDiscoveryComponent.CONNECTION_TYPE,
                                    YourJBossConnectionTypeDescriptor.class.getName()));
                    
                    

                     

                    Recompile, redeploy the plugin, pull it down to your Agents, uninventory your JBoss AS 5.1 Servers, run "discovery -f" from the Agent prompt to rediscover them, reimport them, and see what happens.

                    • 7. Re: Jopr and JBoss AS 5.1.0
                      swiderski.maciej

                      Great to see that I am going in correct direction.

                       

                      Will give it a try with your latest hints tomorrow morning. Keep you posted.

                      • 8. Re: Jopr and JBoss AS 5.1.0
                        swiderski.maciej

                        Hi,

                         

                        few steps forward... I guess. After appliying described changes JBoss 5.1.0 was discovered and agent can retrieve some information about it. Please find screenshot (as attachement) of the console that illustrates what is discovered.

                         

                         

                        I was able to perform following operations on the server:

                        start server

                        stop server

                        create new data source

                         

                        Unfortunately it faild while deploying very simple web application (war):

                        2010-02-03 10:33:57,670 INFO  [org.jboss.deployment.MainDeployer] (RMI TCP Connection(37)-10.15.119.91) deploy, url=file:/D:/Tools/jboss-5.1.0.GA/server/default/deploy/my-webapp.war/
                        2010-02-03 10:33:57,858 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (RMI TCP Connection(37)-10.15.119.91) deploy, ctxPath=/my-webapp
                        2010-02-03 10:33:57,905 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (RMI TCP Connection(37)-10.15.119.91) Error installing to Start: name=jboss.web.deployment:war=/my-webapp state=Create mode=Manual requiredState=Installed
                        org.jboss.deployers.spi.DeploymentException: URL file:/D:/Tools/jboss-5.1.0.GA/server/default/deploy/my-webapp.war/ deployment failed
                             at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
                             at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:316)
                             at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
                             at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
                             at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
                             at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
                             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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                             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:668)
                             at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
                             at $Proxy38.start(Unknown Source)
                             at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
                             at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
                             at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                             at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                             at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                             at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                             at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
                             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                             at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                             at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
                             at org.jboss.system.ServiceController.start(ServiceController.java:460)
                             at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
                             at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
                             at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
                             at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                             at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                             at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
                             at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
                             at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
                             at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
                             at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
                             at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
                             at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
                             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                             at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
                             at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
                             at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:830)
                             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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                             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:668)
                             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.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:263)
                             at sun.reflect.GeneratedMethodAccessor274.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:597)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                             at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                             at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
                             at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
                             at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
                             at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                             at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                             at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)
                             at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:597)
                             at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                             at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                             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:668)
                             at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:855)
                             at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:422)
                             at sun.reflect.GeneratedMethodAccessor272.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:597)
                             at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
                             at sun.rmi.transport.Transport$1.run(Transport.java:159)
                             at java.security.AccessController.doPrivileged(Native Method)
                             at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
                             at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
                             at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
                             at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
                             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: LifecycleException:  Error initializaing :  java.lang.IllegalStateException: BaseClassLoader@575b9e{vfsfile:/D:/Tools/jboss-5.1.0.GA/server/default/deploy/my-webapp.war/} classLoader is not connected to a domain (probably undeployed?) for class org.apache.catalina.Container
                             at org.apache.catalina.core.StandardContext.start(StandardContext.java:4150)
                             at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
                        

                         

                        In addition there are quite some message on agent side regarding failure while getting metrics:

                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=ajp-9009,type=GlobalRequestProcessor not found, skipping ...
                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=ajp-9009,type=GlobalRequestProcessor not found, skipping ...
                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=ajp-9009,type=ThreadPool not found, skipping ...
                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=ajp-9009,type=ThreadPool not found, skipping ...
                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=http-7443,type=ThreadPool not found, skipping ...
                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=http-7443,type=ThreadPool not found, skipping ...
                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=http-7443,type=GlobalRequestProcessor not found, skipping ...
                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=http-7443,type=GlobalRequestProcessor not found, skipping ...
                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=http-7080,type=ThreadPool not found, skipping ...
                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=http-7080,type=ThreadPool not found, skipping ...
                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=http-7080,type=GlobalRequestProcessor not found, skipping ...
                        2010-02-03 10:38:12,708 WARN  [ResourceContainer.invoker.daemon-22] (org.rhq.plugins.jbossas.JBossASTomcatConnectorComponent)- Bean jboss.web:name=http-7080,type=GlobalRequestProcessor not found, skipping ...
                        

                         

                        Could it be that there are naming mismatch?!

                         

                        Seems like I need your help, again...

                         

                        Thanks

                        Maciej

                        • 9. Re: Jopr and JBoss AS 5.1.0
                          swiderski.maciej

                          After switching JVM to 1.5 instead of 1.6 I was able to deploy web application using JOPR to JBoss AS 5.1.0.

                           

                          Unfortunately it does not show anything else that EJB 3 under Applications for that server nor Tomcat connectors etc. Previous post illustrates everything that is available on JBoss AS 5.1.0 in JOPR.

                           

                          Any ideas?

                          • 10. Re: Jopr and JBoss AS 5.1.0
                            ips

                            Did you switch the Jopr Agent JVM to 1.5, or the AS5 JVM? Any idea why switching from Java 6 to Java 5 cleared up the deployment issue?

                             

                            I would turn on DEBUG logging in the Agent and then run "discovery -f" from the Agent prompt to kick off a full discovery scan. Then look for any warnings or errors in the Agent log related to discovery. If you don't see any, then chances are certain services aren't being discovered because the names or interfaces of the underlying MBeans changed between AS4 and AS5. To check this, you could compare the MBeans listed in the jmx-console for an AS5 instance versus the jmx-console for an AS4 instance. For example, maybe the Tomcat connectors aren't getting discovered, because the format of the names of Tomcat connector MBeans changed from AS4 to AS5. Keep me posted on what you find.

                            • 11. Re: Jopr and JBoss AS 5.1.0
                              swiderski.maciej

                              I switched both but I think it is a matter of JVM of AS. I found following issue in jira that suggested me to give it a try with different JVM:

                               

                              https://jira.jboss.org/jira/browse/JBAS-6489

                               

                              I will turn on DEBUG on the agent and discover my AS once again. Hopefully something will be shown.

                              • 12. Re: Jopr and JBoss AS 5.1.0
                                swiderski.maciej

                                Ok, some more updates...going forward again.

                                 

                                I managed to put under JOPR control Embedded Tomcat and its connectors.

                                 

                                Issue was in class JBossASTomcatDiscoveryComponent. Two small changes/improvements were needed to be able to discover Tomcat on JBoss 5.1.0:

                                 

                                Before:

                                    public static final String EMBEDDED_TOMCAT_PRE42_DIR = "jbossweb-tomcat";
                                    public static final String EMBEDDED_TOMCAT_42_DIR = "jboss-web.";
                                
                                
                                        File configDir = context.getParentResourceComponent().getConfigurationPath();
                                        File deployDir = deployDir = new File(configDir, "deploy");
                                        
                                        
                                        File[] jbossWebDirs = deployDir.listFiles(new FileFilter() {
                                            public boolean accept(File file) {
                                                boolean pre42 = file.getName().startsWith(EMBEDDED_TOMCAT_PRE42_DIR);
                                                boolean is42 = file.getName().startsWith(EMBEDDED_TOMCAT_42_DIR);
                                                
                                                return file.isDirectory() && (pre42 || is42);
                                            }
                                
                                
                                

                                });

                                 

                                After:

                                    public static final String EMBEDDED_TOMCAT_PRE42_DIR = "jbossweb-tomcat";
                                    public static final String EMBEDDED_TOMCAT_42_DIR = "jboss-web.";
                                    //added support for JBoss 5.1.0
                                    public static final String EMBEDDED_TOMCAT_5_DIR = "jbossweb.";
                                
                                
                                        File configDir = context.getParentResourceComponent().getConfigurationPath();
                                        File deployDir = null;
                                        if (configDir.getName().endsWith("deploy")) {
                                             deployDir = configDir;
                                        } else {
                                             deployDir = new File(configDir, "deploy");
                                        }
                                        
                                        File[] jbossWebDirs = deployDir.listFiles(new FileFilter() {
                                            public boolean accept(File file) {
                                                boolean pre42 = file.getName().startsWith(EMBEDDED_TOMCAT_PRE42_DIR);
                                                boolean is42 = file.getName().startsWith(EMBEDDED_TOMCAT_42_DIR);
                                                //added support for JBoss 5.1.0
                                                boolean is5 = file.getName().startsWith(EMBEDDED_TOMCAT_5_DIR);
                                                
                                                return file.isDirectory() && (pre42 || is42 || is5);
                                            }
                                

                                });

                                Problem was inside method discoverResources and main issue was that the name of directory where Tomcat should be located has changed in AS 5.1.0 it is jbossweb instead of jboss-web. In addition, some how comfigDir returned full path to deploy directory so I made simple check just to give it a try. And it helped, let me know if there is a better way of doing that, perhaps I have something wrong with my configuration of AS (mainly regarding configDir).

                                 

                                Next step was to check why applications are not discovered. I found that they are not found due to MainDeployer (jboss.system:service=MainDeployer) operations are not returning them (listDeployed and listDeployedModules). I tried them as well from jmx-console delivered with JBoss and the same result.

                                 

                                Is there any other way of getting such information?

                                 

                                BTW, listDeployers returns empty list as well.

                                 

                                Cheers,

                                Maciej

                                • 13. Re: Jopr and JBoss AS 5.1.0
                                  ips

                                  That's cool that you got embedded Tomcat discovery working.

                                   

                                  Unfortunately, I don't think it will be trivial to get WAR/EAR discovery working, since the list operations on the MainDeployer MBean apparently no longer work, and a lot of the code in the jboss-as plugin relies on them.

                                  • 14. Re: Jopr and JBoss AS 5.1.0
                                    swiderski.maciej

                                    yeap, I think so too. I spent some time on it trying several different ways of getting this info but no luck so far. I used DeploymentScanner to get hold of deployed resources but it returns only array of urls to deployed resources. Have no idea what else to do.

                                     

                                    Anyway thanks a lot for the great help you provided me with.

                                     

                                    If you have any more ideas I will be glad to give them a try.

                                     

                                    Cheers,

                                    Maciej

                                     

                                     

                                    BTW, here are some additional information about worning I get from the agent:

                                    2010-02-04 08:45:21,447 WARN  [ResourceContainer.invoker.daemon-12] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3]
                                    2010-02-04 08:45:21,447 WARN  [ResourceContainer.invoker.daemon-12] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3]
                                    2010-02-04 08:45:21,447 WARN  [ResourceContainer.invoker.daemon-11] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=JBossMQ, plugin=JBossAS]:jboss.mq:service=DestinationManager]
                                    2010-02-04 08:45:21,447 WARN  [ResourceContainer.invoker.daemon-11] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3]
                                    
                                    2010-02-04 08:45:26,446 WARN  [ResourceContainer.invoker.daemon-11] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3]
                                    2010-02-04 08:45:26,446 WARN  [ResourceContainer.invoker.daemon-11] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3]
                                    2010-02-04 08:45:26,446 WARN  [ResourceContainer.invoker.daemon-11] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=JBossMQ, plugin=JBossAS]:jboss.mq:service=DestinationManager]
                                    2010-02-04 08:45:26,446 WARN  [ResourceContainer.invoker.daemon-11] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3]
                                    
                                    2010-02-04 08:45:26,946 WARN  [InventoryManager.discovery-1] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=JBossMQ, plugin=JBossAS]:jboss.mq:service=DestinationManager]
                                    
                                    2010-02-04 08:45:26,978 WARN  [InventoryManager.discovery-1] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3]
                                    
                                    2010-02-04 08:45:26,978 WARN  [InventoryManager.discovery-1] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3]
                                    
                                    2010-02-04 08:45:26,978 WARN  [InventoryManager.discovery-1] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3]
                                    
                                    2010-02-04 08:45:27,181 WARN  [ResourceContainer.invoker.daemon-11] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3]
                                    2010-02-04 08:45:27,181 WARN  [ResourceContainer.invoker.daemon-11] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3]
                                    2010-02-04 08:45:27,181 WARN  [ResourceContainer.invoker.daemon-11] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=JBossMQ, plugin=JBossAS]:jboss.mq:service=DestinationManager]
                                    2010-02-04 08:45:27,181 WARN  [ResourceContainer.invoker.daemon-11] (rhq.plugins.jbossas.util.JBossMBeanUtility)- Could not determine availability of unknown EMS bean for [ResourceType[id=0, category=Service, name=EJB3 Session Bean, plugin=JBossAS]:jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3]
                                    
                                    
                                    2010-02-04 08:45:32,727 DEBUG [ResourceDiscoveryComponent.invoker.daemon-5] (rhq.plugins.jbossas.util.WarDiscoveryHelper)- The deployed WAR 'web-console.war' does not have a jboss.web MBean (i.e. context root) associated with it; it will not be added to inventory.
                                    2010-02-04 08:45:32,727 DEBUG [ResourceDiscoveryComponent.invoker.daemon-5] (rhq.plugins.jbossas.util.WarDiscoveryHelper)- The deployed WAR 'admin-console.war' does not have a jboss.web MBean (i.e. context root) associated with it; it will not be added to inventory.
                                    2010-02-04 08:45:32,727 DEBUG [ResourceDiscoveryComponent.invoker.daemon-5] (rhq.plugins.jbossas.util.WarDiscoveryHelper)- The deployed WAR 'jmx-console.war' does not have a jboss.web MBean (i.e. context root) associated with it; it will not be added to inventory.
                                    2010-02-04 08:45:32,727 DEBUG [ResourceDiscoveryComponent.invoker.daemon-5] (rhq.plugins.jbossas.util.WarDiscoveryHelper)- The deployed WAR 'jbossws-management.war' does not have a jboss.web MBean (i.e. context root) associated with it; it will not be added to inventory.
                                    2010-02-04 08:45:32,727 DEBUG [ResourceDiscoveryComponent.invoker.daemon-5] (rhq.plugins.jbossas.util.WarDiscoveryHelper)- The deployed WAR 'invoker.war' does not have a jboss.web MBean (i.e. context root) associated with it; it will not be added to inventory.
                                    
                                    
                                    
                                    1 2 3 4 Previous Next