4 Replies Latest reply on Aug 1, 2014 7:13 AM by maneendr

    How to migrate jmx-console.war to jboss-as-7.1.1.Final?

    maneendr

      How to migrate jboss 4.2.1- jmx-console.war to jboss as 7.1.1. When going through the posts found that as 7 does not have a jmx-console. Instead can use the JConsole to view the MBeans. Then how to configure the content in following files ?(How to secure the JConsole applying the contents in following files?)

       

      Refer the link - where is jmx-console.war

       

      • jboss-web.xml
      • web.xml
      • jmx-console-roles.properties
      • jmx-console-users.properties

       

      Are they not relevant for JConsole?

       

      There is a page on how to secure jmx console but that does not applicable to jboss as 7.1.1   SecureTheJmxConsole

       

       

       

      Also found a link which says can use a ported jmx-console.war in as 7. Tried to deploy the attached jmx-console.war in as 7 but it gives the below error.

       

      17:41:40,305 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jmx-console]] (MSC service thread 1-3) Exception starting filter JmxOpsAccessControlFilter: java.lang.ClassNotFoundException: org.jboss.jmx.adaptor.html.JMXOpsAccessControlFilter from [Module "deployment.jmx-cons

      ole.war:main" from Service Module Loader]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

              at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:72) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:441) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:]

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

              at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

       

       

      17:41:40,383 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Error filterStart

      17:41:40,386 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Context [/jmx-console] startup failed due to previous errors

      17:41:40,410 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.web.deployment.default-host./jmx-console: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./jmx-console: JBAS018040: Failed to start context

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

              at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

       

       

      17:41:40,647 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./jmx-console" => "org.jboss.ms

      c.service.StartException in service jboss.web.deployment.default-host./jmx-console: JBAS018040: Failed to start context"}}}}

       

      There is no JMXOpsAccessControlFilter.class in the attached war, but it exists in jboss 4.2.1. Any reason for removing it?

       

      Refer - https://issues.jboss.org/browse/WFLY-1197

       

      Can anyone help me to port the jmx-console.war to as 7? What is the best way, use JConsole or port the jmx-console.war?

       

      Thanks in advance.

        • 1. Re: How to migrate jmx-console.war to jboss-as-7.1.1.Final?
          jaikiran

          JConsole is not a web application. It's a tool which comes bundled with the JDK download. You should find it at JDK_HOME/bin/jconsole. Just fire it up and point it to the process which corresponds to AS7.

          1 of 1 people found this helpful
          • 2. Re: How to migrate jmx-console.war to jboss-as-7.1.1.Final?
            jaikiran
            • 3. Re: How to migrate jmx-console.war to jboss-as-7.1.1.Final?
              wdfink

              jmx-console and web-console are administration tools for the jboss instance.

              Since AS7 they are complete replaced by the new management API. The old applications will not longer work as they are based on the old container.

               

              You can use the management GUI by use <host>:9990 in your browser, this will give you access to the AS management.

              1 of 1 people found this helpful
              • 4. Re: How to migrate jmx-console.war to jboss-as-7.1.1.Final?
                maneendr

                Hi,

                 

                Thanks for the explanation. But i have another question regarding the security.

                 

                If we access jmx via management GUI, is there a possibility of configuring a separate security domain(user and roles) for the jmx as below? or can only configure the security domain for whole management console? or security domains are not applicable for management users, it all about application users?

                 

                If security domains are not applicable for management users, only way to secure the management console is username and password?  Because my objective is to configure a security domain for the jmx as in jboss 4.2.1.

                 

                jmx security domain

                <security-domain name="jmx-console" cache-type="default">

                                    <authentication>

                                        <login-module code="RealmUsersRoles" flag="required">

                                            <module-option name="usersProperties" value="${jboss.server.config.dir}/jmx-users.properties"/>"/>

                                            <module-option name="rolesProperties" value="${jboss.server.config.dir}/jmx-roles.properties"/>

                                        </login-module>

                                    </authentication>

                                </security-domain>

                 

                Then where should i configure <security-constraint/> (web.xml) and <security-domain> (jboss-web.xml)?

                 

                Also where should i configure management user security constrains in my app. Referring the article - http://www.mastertheboss.com/jboss-security/securing-as-7-applications-using-the-applicationrealm

                 

                My app structure - bp.ear

                META-INF/

                META-INF/MANIFEST.MF

                lib/

                META-INF/application.xml

                META-INF/jboss-app.xml

                bpconsole.war - Has a sepearete secuirty domain

                bp-sar.sar

                bp-proxy-install-war-4.1.0-SNAPSHOT.war

                 

                 

                Thanks,

                Maneendra