12 Replies Latest reply on Apr 1, 2009 11:07 AM by Peter Johnson

    JBoss Web Console 4.2.1 on Gentoo Linux OS

    KAUSHAL SHRIIYAN Newbie

      Hi,

      I have got jmx-console working for me on Jboss AS 4.2.1 on Gentoo Linux OS but not Web Console. I have followed that URL (http://www.jboss.org/community/docs/DOC-12190) too.

      I have provided the username/password details in /var/lib/jboss/all/conf/props/web-console-users.properties

      I dont see any audit.log configs in jboss-log4j.xml, is the audit.log support present in Jboss Application Server 4.2.1.

      Do you want me to pastebin the configs? Please let me know.

      Thanks and Regards

      Kaushal

        • 1. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
          Peter Johnson Master

          web console uses a Java applet. If you have not installed applet support into your browser it will not work. By "not working" I mean that there will be no tree view in the left panel and only the main page will show on the right panel in the browser. What, exactly, do you mean by it not working for you?

          • 2. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
            KAUSHAL SHRIIYAN Newbie

            Hi Peter Johnson

            Thanks for the quick reply.

            I get Jboss Authentication Dialog Box for Web Console on my Browser, I key in the Username and Password Details as provided in /var/lib/jboss/all/conf/props/web-console-users.properties.

            It keeps on popping up again and again.

            Am i missing something?

            Thanks and Regards

            Kaushal

            • 3. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
              Peter Johnson Master

              Are you running the 'all' configuration? That is:

              ./run.sh -c all

              If you are, then you must have changed something incorrectly. Could you post the changes that you made to the web.xml and jboss-web.xml files for the web console?

              When posting XML text or source code, please enclose the text in UBBCode "code" tags - you can do this by selecting the text and clicking the Code button above the editor window. Also, click the Preview button to ensure that the formatting is correct and the XML text shows up before posting.

              • 4. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
                KAUSHAL SHRIIYAN Newbie

                jboss-web.xml

                <?xml version='1.0' encoding='UTF-8' ?>
                
                <!DOCTYPE jboss-web
                 PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
                 "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
                
                <jboss-web>
                
                 <!-- Uncomment the security-domain to enable security. You will
                 need to edit the htmladaptor login configuration to setup the
                 login modules used to authentication users.
                 -->
                 <security-domain>java:/jaas/web-console</security-domain>
                
                 <!-- The war depends on the -->
                 <depends>jboss.admin:service=PluginManager</depends>
                </jboss-web>
                



                web.xml

                <?xml version="1.0"?>
                <!DOCTYPE web-app PUBLIC
                 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
                 "http://java.sun.com/dtd/web-app_2_3.dtd">
                
                <web-app>
                 <description>Web Admin Console</description>
                 <servlet>
                 <servlet-name>J2EEFolder</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>ScriptName</param-name>
                 <param-value>J2EEFolder.bsh</param-value>
                 </init-param>
                 <init-param>
                 <param-name>IsRootNode</param-name>
                 <param-value>true</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>SystemFolder</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>ScriptName</param-name>
                 <param-value>SystemFolder.bsh</param-value>
                 </init-param>
                 <init-param>
                 <param-name>IsRootNode</param-name>
                 <param-value>true</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>MonitorsFolder</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>WrapperClass</param-name>
                 <param-value>org.jboss.console.plugins.MonitorLister</param-value>
                 </init-param>
                 <init-param>
                 <param-name>IsRootNode</param-name>
                 <param-value>true</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>AOPFolder</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>WrapperClass</param-name>
                 <param-value>org.jboss.console.plugins.AOPLister</param-value>
                 </init-param>
                 <init-param>
                 <param-name>IsRootNode</param-name>
                 <param-value>true</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>JMS Message</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>WrapperClass</param-name>
                 <param-value>org.jboss.console.plugins.JMSLister</param-value>
                 </init-param>
                 <init-param>
                 <param-name>MBeanClass</param-name>
                 <param-value>org.jboss.management.j2ee.JMSResource</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <!--servlet>
                 <servlet-name>UCLs</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>ScriptName</param-name>
                 <param-value>Classloaders.bsh</param-value>
                 </init-param>
                 <init-param>
                 <param-name>FolderName</param-name>
                 <param-value>ROOT/System</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet-->
                
                 <servlet>
                 <servlet-name>UCLs</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>WrapperClass</param-name>
                 <param-value>org.jboss.console.plugins.UCLLister</param-value>
                 </init-param>
                 <init-param>
                 <param-name>FolderName</param-name>
                 <param-value>ROOT/System</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>MBeans</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>WrapperClass</param-name>
                 <param-value>org.jboss.console.plugins.MBeansLister</param-value>
                 </init-param>
                 <init-param>
                 <param-name>FolderName</param-name>
                 <param-value>ROOT/System</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>JSR77 Domains and Servers</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>WrapperClass</param-name>
                 <param-value>org.jboss.console.plugins.JSR77Lister</param-value>
                 </init-param>
                 <init-param>
                 <param-name>FolderName</param-name>
                 <param-value>ROOT/J2EE</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>JSR77 EJBModules and EJBs</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>WrapperClass</param-name>
                 <param-value>org.jboss.console.plugins.EJBModuleLister</param-value>
                 </init-param>
                 <init-param>
                 <param-name>MBeanClass</param-name>
                 <param-value>org.jboss.management.j2ee.EJBModule</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>JSR77 J2EE Apps</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>WrapperClass</param-name>
                 <param-value>org.jboss.console.plugins.J2EEAppLister</param-value>
                 </init-param>
                 <init-param>
                 <param-name>MBeanClass</param-name>
                 <param-value>org.jboss.management.j2ee.J2EEApplication</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>JSR77 WebModule</servlet-name>
                 <servlet-class>org.jboss.console.plugins.helpers.ServletPluginHelper</servlet-class>
                 <init-param>
                 <param-name>WrapperClass</param-name>
                 <param-value>org.jboss.console.plugins.WebModuleLister</param-value>
                 </init-param>
                 <init-param>
                 <param-name>MBeanClass</param-name>
                 <param-value>org.jboss.management.j2ee.WebModule</param-value>
                 </init-param>
                 <init-param>
                 <param-name>ContextName</param-name>
                 <param-value>/web-console</param-value>
                 </init-param>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>HTTP Invocation</servlet-name>
                 <servlet-class>org.jboss.console.remote.InvokerServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>Create Snapshot</servlet-name>
                 <servlet-class>org.jboss.console.plugins.monitor.CreateSnapshotServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>Manage Snapshot</servlet-name>
                 <servlet-class>org.jboss.console.plugins.monitor.ManageSnapshotServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>Create Threshold Monitor</servlet-name>
                 <servlet-class>org.jboss.console.plugins.monitor.CreateThresholdMonitorServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>Manage Threshold Monitor</servlet-name>
                 <servlet-class>org.jboss.console.plugins.monitor.ManageThresholdMonitorServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>Create String Threshold Monitor</servlet-name>
                 <servlet-class>org.jboss.console.plugins.monitor.CreateStringThresholdMonitorServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>Manage String Threshold Monitor</servlet-name>
                 <servlet-class>org.jboss.console.plugins.monitor.ManageStringThresholdMonitorServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>Clear Monitor Alerts</servlet-name>
                 <servlet-class>org.jboss.console.plugins.monitor.ClearMonitorAlertsServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>Acknowledge Active Alarms</servlet-name>
                 <servlet-class>org.jboss.console.plugins.monitor.AcknowledgeActiveAlarmsServlet</servlet-class>
                 <load-on-startup>1</load-on-startup>
                 </servlet>
                
                 <servlet>
                 <servlet-name>Status Servlet</servlet-name>
                 <servlet-class>org.jboss.web.tomcat.service.StatusServlet</servlet-class>
                 </servlet>
                
                 <servlet-mapping>
                 <servlet-name>Status Servlet</servlet-name>
                 <url-pattern>/status</url-pattern>
                 </servlet-mapping>
                
                 <servlet-mapping>
                 <servlet-name>HTTP Invocation</servlet-name>
                 <url-pattern>/Invoker/*</url-pattern>
                 </servlet-mapping>
                
                 <servlet-mapping>
                 <servlet-name>Create Snapshot</servlet-name>
                 <url-pattern>/CreateSnapshot</url-pattern>
                 </servlet-mapping>
                
                 <servlet-mapping>
                 <servlet-name>Manage Snapshot</servlet-name>
                 <url-pattern>/ManageSnapshot</url-pattern>
                 </servlet-mapping>
                
                 <servlet-mapping>
                 <servlet-name>Create Threshold Monitor</servlet-name>
                 <url-pattern>/CreateThresholdMonitor</url-pattern>
                 </servlet-mapping>
                
                 <servlet-mapping>
                 <servlet-name>Manage Threshold Monitor</servlet-name>
                 <url-pattern>/ManageThresholdMonitor</url-pattern>
                 </servlet-mapping>
                
                 <servlet-mapping>
                 <servlet-name>Create String Threshold Monitor</servlet-name>
                 <url-pattern>/CreateStringThresholdMonitor</url-pattern>
                 </servlet-mapping>
                
                 <servlet-mapping>
                 <servlet-name>Manage String Threshold Monitor</servlet-name>
                 <url-pattern>/ManageStringThresholdMonitor</url-pattern>
                 </servlet-mapping>
                
                 <servlet-mapping>
                 <servlet-name>Clear Monitor Alerts</servlet-name>
                 <url-pattern>/ClearMonitorAlerts</url-pattern>
                 </servlet-mapping>
                
                 <servlet-mapping>
                 <servlet-name>Acknowledge Active Alarms</servlet-name>
                 <url-pattern>/AcknowledgeActiveAlarms</url-pattern>
                 </servlet-mapping>
                
                 <taglib>
                 <taglib-uri>/webconsole</taglib-uri>
                 <taglib-location>/WEB-INF/tlds/webconsole.tld</taglib-location>
                 </taglib>
                
                 <!-- 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>
                 <description>An example security config that only allows users with the
                 role JBossAdmin to access the HTML JMX console web application
                 </description>
                 <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 WEB Console</realm-name>
                 </login-config>
                
                 <security-role>
                 <role-name>JBossAdmin</role-name>
                 </security-role>
                </web-app>
                
                


                • 5. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
                  Peter Johnson Master

                  You did not uncomment the security-constraint entry in web.xml.

                  • 6. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
                    KAUSHAL SHRIIYAN Newbie

                    Hi Peter

                    I have jboss running with all configuration. I have un commented
                    </security-constraint> in web.xml,still i am unable to login with the user credentials provided in /var/lib/jboss/all/conf/props/web-console-users.properties

                    WEB-INF # ps -aef | grep jboss jboss 5023 1 0 Jan29 ? 00:00:00 /bin/sh /usr/share/jboss/bin/run.sh -b 0.0.0.0 -c all
                    jboss 5047 5023 0 Jan29 ? 13:47:55 /opt/sun-jdk-1.5.0.12/bin/java -Dprogram.name=run.sh -server -Xmx12000m -XX:MaxPermSize=2000m -Djboss.server.temp.dir=/var/tmp/jboss -Djboss.server.data.dir=/var/cache/jboss -Djboss.server.base.url=file:///var/lib/jboss -Djava.library.path=/usr/lib -Djboss.server.exitonshutdown=true -Djboss.server.blockingshutdown=true -Djboss.partition.name=MobileServerPartition -Xloggc:/tmp/gc.log -XX:+PrintGCTimeStamps -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/usr/share/jboss/lib/endorsed -classpath /usr/share/jboss/bin/run.jar:/opt/sun-jdk-1.5.0.12/lib/tools.jar org.jboss.Main -b 0.0.0.0 -c all
                    root 5407 5261 0 08:54 pts/8 00:00:00 grep --colour=auto jboss
                    WEB-INF #
                    


                    Am i still missing anything?

                    Please suggest.

                    Thanks and Regards

                    Kaushal

                    • 7. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
                      Peter Johnson Master

                      I just now tried it, changing only these two files, and it worked for me. The only other thing I can think of is that you changed the login-config.xml file. Could you post the application-policy name web-console from that file?

                      • 8. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
                        KAUSHAL SHRIIYAN Newbie

                        Hi Peter

                        <application-policy name = "web-console">
                         <authentication>
                         <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
                         flag = "required">
                         <module-option name="usersProperties">web-console-users.properties</module-option>
                         <module-option name="rolesProperties">web-console-roles.properties</module-option>
                         </login-module>
                         </authentication>
                         </application-policy>
                        


                        Thanks and Regards

                        Kaushal

                        • 9. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
                          Peter Johnson Master

                          Now I am wondering how this worked for me. There are no such properties files - they would have to be in the server/all/conf directory, not in server/all/conf/props directory. (Maybe admin/admin is acceptable id when no file is found...)

                          Try copying the server/all/conf/props/jmx-console-*.properties files as server/all/conf/web-console-*.properties and see if that works. Or change the login-config.xml file to reference the files on props.

                          • 10. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
                            KAUSHAL SHRIIYAN Newbie

                            Hi Peter

                            Thanks Peter :-)

                            With admin/admin it worked. I believe its a default login credentials. Can i reset it to a different username/password credentials? if that is the case which files i need to modify and do i need to bounce jboss AS ?

                            Thanks and Regards

                            Kaushal

                            • 11. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
                              KAUSHAL SHRIIYAN Newbie

                              Hi Peter

                              Thanks Peter :-)

                              With admin/admin it worked. I believe its a default login credentials. Can i reset it to a different username/password credentials? if that is the case which files i need to modify and do i need to bounce jboss AS ?

                              Thanks and Regards

                              Kaushal

                              • 12. Re: JBoss Web Console 4.2.1 on Gentoo Linux OS
                                Peter Johnson Master

                                I already answered that question - see the last paragraph of my previous post. And yes you do need to restart the server.