8 Replies Latest reply on Sep 23, 2003 1:01 PM by pjuels

    Check if JBoss is running

    fiona_conard Newbie

      I follow JBoss 3.0 Quick Start Guide and try to check if JBoss is running. I open a browser and point to http://localhost:8080/jmx-console. The browser asks me UserName and PassWord. Could anyone tell me UserName and PassWork?

      Thanks Alot!

        • 1. Re: Check if JBoss is running
          Aruna Newbie

          You were enable JMX Console sequrity option. Default user name password are admin, admin. You can edit user name password
          <jboss_home>/server/default/deploy/jmx-console.war/WEB-INF/classes/org/roles.properties users.properties

          • 2. Re: Check if JBoss is running
            fiona_conard Newbie

            Thanks PadMal. I tried (UserName = admin and PassWord = admin) but still can't log in. Any idea?

            Please help! Thanks alot!

            • 3. Re: Check if JBoss is running
              Jon Barnett Master

              In server/default/conf/roles.properties, you will need to declare something like this (user=role):
              admin=JBossAdmin

              In server/default/conf/users.properties, I assume you have (user=password):
              admin=admin

              All of this assumes that;
              1) In server/default/conf/login-config.xml, you have:
              <application-policy name = "jmx-console">

              <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
              flag = "required" />

              </application-policy>

              This declares that you are using UsersRolesLogin for authentication of domain jmx-console (looks up user and role in users.properties and roles.properties respectively).

              2) In server/default/deploy/jmx-console.war/jboss-web.xml you have:
              <security-domain>java:/jaas/jmx-console</security-domain>

              This declares that the jmx-console context uses the jaas security policy jmx-console (declared in 1)

              3) In server/default/deploy/jmx-console.war/web.xml you have:
              <security-constraint>
              <web-resource-collection>
              <web-resource-name>HtmlAdaptor</web-resource-name>
              An example security config that only allows users with the
              role JBossAdmin to access the HTML JMX console web application

              <url-pattern>/*</url-pattern>
              <http-method>GET</http-method>
              <http-method>POST</http-method>
              </web-resource-collection>
              <auth-constraint>
              <role-name>JBossAdmin</role-name>
              </auth-constraint>
              </security-constraint>
              <!-- -->

              <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>JBoss JMX Console</realm-name>
              </login-config>

              <security-role>
              <role-name>JBossAdmin</role-name>
              </security-role>

              This declares using BASIC authentication with user input (as applies to web containers), and expecting a role match that returns the JBossAdmin before a user can access content.

              Hope that helps.

              • 4. Re: Check if JBoss is running
                fiona_conard Newbie

                Thanks JonLee. I have done what you said but still cannot login successfully.

                Any idea? Thanks!

                • 5. Re: Check if JBoss is running
                  Jon Barnett Master

                  OK. Try turning off basic authentication for the web application and see if it stops asking us for a username password. By default , when unpacked, that should be the default in any case.

                  • 6. Re: Check if JBoss is running
                    Jon Barnett Master

                    Normally, your web.xml entry for security should look like this for jmx-console.war/web.xml that comments out the security constraint:
                    <!-- A security constraint that restricts access to the HTML JMX console
                    to users with the role JBossAdmin. Edit the roles to what you want and
                    uncomment the WEB-INF/jboss-web.xml/security-domain element to enable
                    secured access to the HTML JMX console.
                    <security-constraint>
                    <web-resource-collection>
                    <web-resource-name>HtmlAdaptor</web-resource-name>
                    An example security config that only allows users with the
                    role JBossAdmin to access the HTML JMX console web application

                    <url-pattern>/*</url-pattern>
                    <http-method>GET</http-method>
                    <http-method>POST</http-method>
                    </web-resource-collection>
                    <auth-constraint>
                    <role-name>JBossAdmin</role-name>
                    </auth-constraint>
                    </security-constraint>
                    -->

                    • 7. Re: Check if JBoss is running
                      adrian neculau Newbie

                      Hi there,
                      got the same issue, I tried everything but no success.
                      Hell, this should be turned off by default, it was at least in 3.2.0 .

                      • 8. Re: Check if JBoss is running
                        pjuels Newbie

                        Anyone figure this one out? I'm running 3.2.2RC4

                        Thanks,
                        PJ