1 2 Previous Next 15 Replies Latest reply: Apr 23, 2012 10:49 PM by Tan Mariani RSS

    User Admin for JBOSS-AS-7.0.2

    Tan Mariani Newbie

      Hi...

       

      I tried to setup server Jboss-as-7.0.2

       

      When I setup in windows server, I can use admin console directly (although I don't know admin user and password ).

       

      When I setup in Linux, I cannot access admin console from web.

       

      What is default user admin and password to access it? And how can I add new user and password?

       

      Thanks before

        • 1. Re: User Admin for JBOSS-AS-7.0.2
          Phani Reddy V Newbie

          There is no default user for admin console in JBoss AS 7.1. Please go to the <JBOSS_HOME>/bin and run the add-user.sh from terminal and follow the steps as tool guides. That would create the user and you don't need to restart server as it automatically updates the server.

          • 2. Re: User Admin for JBOSS-AS-7.0.2
            Tan Mariani Newbie

            But there's no add-user.sh in jboss 7.0

            • 3. Re: User Admin for JBOSS-AS-7.0.2
              Phani Reddy V Newbie

              In that case, then please go to the <JBOSS_HOME>/standalone/configuration/mgmt-users.properties file and follow the guidelines in the file.

              • 4. Re: User Admin for JBOSS-AS-7.0.2
                Tan Mariani Newbie

                I try to execute  bin/jboss-admin.sh -c --file=bin/scripts/secure-standalone-mgmt.cli, but I got this following error :

                 

                The controller is not available at localhost:9999

                #1 /core-service=management/security-realm=PropertiesMgmtSecurityRealm:validate-address

                #2 /core-service=management/management-interface=http-interface:write-attribute(name=security-realm,value=PropertiesMgmtSecurityRealm)

                #3 /core-service=management/management-interface=native-interface:write-attribute(name=security-realm,value=PropertiesMgmtSecurityRealm)

                The command is not available in the current context (e.g. required subsystems or connection to the controller might be unavailable).

                • 5. Re: User Admin for JBOSS-AS-7.0.2
                  Phani Reddy V Newbie

                  Is your server up and running?

                  • 6. Re: User Admin for JBOSS-AS-7.0.2
                    Tan Mariani Newbie

                    Yes...

                     

                    I can acesss jboss home page....

                    • 7. Re: User Admin for JBOSS-AS-7.0.2
                      Phani Reddy V Newbie

                      I tried with default configuration and it all worked fine. By any chance did you change the default ports of JBoss server?

                      • 8. Re: User Admin for JBOSS-AS-7.0.2
                        Tan Mariani Newbie

                        Yes...I change HTTP port to 8090 cause I have Tomcat that run in 8080....and I edit the binding management ip too via standalone.conf

                        • 9. Re: User Admin for JBOSS-AS-7.0.2
                          Phani Reddy V Newbie

                          Please copy the host.xml from <JBOSS_HOME>/domain/conf/host.xml to <JBOSS_HOME>/standalone/configuration/ and uncomment the mgmt-users.properties in the same folder to enable admin=admin. It should work.

                          • 10. Re: User Admin for JBOSS-AS-7.0.2
                            Tan Mariani Newbie

                            I've done as you said, copy and comment.

                             

                            I assume that step mean the username and password is admin/admin. I tried to login with that username, but didn't work.

                             

                            Did I do something wrong?

                            Or should I try to setup jboss without change configuration first?

                            • 11. Re: User Admin for JBOSS-AS-7.0.2
                              Phani Reddy V Newbie

                              could you please upload your standalone.xml and hosts.xml?

                              • 12. Re: User Admin for JBOSS-AS-7.0.2
                                Tan Mariani Newbie

                                host.xml

                                <host xmlns="urn:jboss:domain:1.0"

                                      name="master">

                                 

                                 

                                    <management>

                                              <security-realms>

                                                        <security-realm name="PropertiesMgmtSecurityRealm">

                                                                  <authentication>

                                                                            <properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir" />

                                                                  </authentication>

                                                        </security-realm>

                                              </security-realms>

                                       <management-interfaces>

                                          <native-interface interface="management" port="9999" />

                                          <http-interface interface="management" port="9990"/>

                                       </management-interfaces>

                                    </management>

                                 

                                 

                                    <domain-controller>

                                       <local/>

                                       <!-- Alternative remote domain controller configuration with a host and port -->

                                       <!-- <remote host="192.168.100.1" port="9999"/> -->

                                    </domain-controller>

                                 

                                 

                                    <interfaces>

                                        <interface name="management">

                                            <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>

                                        </interface>

                                        <interface name="public">

                                           <inet-address value="${jboss.bind.address:127.0.0.1}"/>

                                        </interface>

                                    </interfaces>

                                 

                                 

                                           <jvms>

                                              <jvm name="default">

                                          <heap size="64m" max-size="128m"/>

                                       </jvm>

                                           </jvms>

                                 

                                 

                                    <servers>

                                        <server name="server-one" group="main-server-group">

                                            <!-- server-one inherits the default socket-group declared in the server-group -->

                                            <jvm name="default"/>

                                        </server>

                                 

                                 

                                        <server name="server-two" group="main-server-group" auto-start="true">

                                            <!-- server-two avoids port conflicts by incrementing the ports in

                                                 the default socket-group declared in the server-group -->

                                            <socket-binding-group ref="standard-sockets" port-offset="150"/>

                                            <jvm name="default">

                                                <heap size="64m" max-size="256m"/>

                                            </jvm>

                                        </server>

                                 

                                 

                                        <server name="server-three" group="other-server-group" auto-start="false">

                                            <!-- server-three avoids port conflicts by incrementing the ports in

                                                 the default socket-group declared in the server-group -->

                                            <socket-binding-group ref="ha-sockets" port-offset="250"/>

                                        </server>

                                    </servers>

                                </host>

                                 

                                standalone.xml

                                <server xmlns="urn:jboss:domain:1.0">

                                 

                                 

                                    <extensions>

                                        <extension module="org.jboss.as.clustering.infinispan"/>

                                        <extension module="org.jboss.as.connector"/>

                                        <extension module="org.jboss.as.deployment-scanner"/>

                                        <extension module="org.jboss.as.ee"/>

                                        <extension module="org.jboss.as.ejb3"/>

                                        <extension module="org.jboss.as.jaxrs"/>

                                        <extension module="org.jboss.as.jmx"/>

                                        <extension module="org.jboss.as.jpa"/>

                                        <extension module="org.jboss.as.logging"/>

                                        <extension module="org.jboss.as.naming"/>

                                        <extension module="org.jboss.as.osgi"/>

                                        <extension module="org.jboss.as.pojo"/>

                                        <extension module="org.jboss.as.remoting"/>

                                        <extension module="org.jboss.as.sar"/>

                                        <extension module="org.jboss.as.security"/>

                                        <extension module="org.jboss.as.threads"/>

                                        <extension module="org.jboss.as.transactions"/>

                                        <extension module="org.jboss.as.web" />

                                        <extension module="org.jboss.as.weld" />

                                    </extensions>

                                 

                                 

                                    <management>

                                              <security-realms>

                                                        <security-realm name="PropertiesMgmtSecurityRealm">

                                                                  <authentication>

                                                                            <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" />

                                                                  </authentication>

                                                        </security-realm>

                                              </security-realms>

                                        <management-interfaces>

                                           <native-interface interface="management" port="9999" />

                                           <http-interface interface="management" port="9990"/>

                                        </management-interfaces>

                                    </management>

                                 

                                 

                                    <profile>

                                        <subsystem xmlns="urn:jboss:domain:logging:1.1">

                                            <console-handler name="CONSOLE">

                                                <level name="INFO"/>

                                                <formatter>

                                                    <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                                                </formatter>

                                            </console-handler>

                                 

                                 

                                            <periodic-rotating-file-handler name="FILE">

                                                <level name="INFO"/>

                                                <formatter>

                                                    <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                                                </formatter>

                                                <file relative-to="jboss.server.log.dir" path="server.log"/>

                                                <suffix value=".yyyy-MM-dd"/>

                                            </periodic-rotating-file-handler>

                                 

                                 

                                            <logger category="com.arjuna">

                                                <level name="WARN"/>

                                            </logger>

                                            <logger category="org.apache.tomcat.util.modeler">

                                                <level name="WARN"/>

                                            </logger>

                                            <logger category="sun.rmi">

                                                <level name="WARN"/>

                                            </logger>

                                 

                                 

                                            <root-logger>

                                                <level name="INFO"/>

                                                <handlers>

                                                    <handler name="CONSOLE"/>

                                                    <handler name="FILE"/>

                                                </handlers>

                                            </root-logger>

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:datasources:1.0">

                                            <datasources>

                                                <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">

                                                    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>

                                                    <driver>h2</driver>

                                                    <pool></pool>

                                                    <security>

                                                        <user-name>sa</user-name>

                                                        <password>sa</password>

                                                    </security>

                                                </datasource>

                                                <drivers>

                                                    <driver name="h2" module="com.h2database.h2">

                                                        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                                                    </driver>

                                                </drivers>

                                            </datasources>

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">

                                            <deployment-scanner scan-interval="5000" relative-to="jboss.server.base.dir" path="deployments" />

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:ee:1.0" />

                                        <subsystem xmlns="urn:jboss:domain:ejb3:1.1" lite="true">

                                            <!-- EJB3 pools -->

                                            <pools>

                                                <bean-instance-pools>

                                                    <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5"

                                                                     instance-acquisition-timeout-unit="MINUTES"/>

                                                </bean-instance-pools>

                                            </pools>

                                 

                                 

                                            <!-- Session bean configurations -->

                                            <session-bean>

                                                <stateless>

                                                    <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                                                </stateless>

                                            </session-bean>

                                 

                                 

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:infinispan:1.0" default-cache-container="hibernate">

                                            <cache-container name="hibernate" default-cache="local-query">

                                                <local-cache name="entity">

                                                    <eviction strategy="LRU" max-entries="10000"/>

                                                    <expiration max-idle="100000"/>

                                                </local-cache>

                                                <local-cache name="local-query">

                                                    <eviction strategy="LRU" max-entries="10000"/>

                                                    <expiration max-idle="100000"/>

                                                </local-cache>

                                                <local-cache name="timestamps">

                                                    <eviction strategy="NONE"/>

                                                </local-cache>

                                            </cache-container>

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>

                                        <subsystem xmlns="urn:jboss:domain:jca:1.0">

                                            <archive-validation enabled="false" />

                                            <bean-validation enabled="false" />

                                            <default-workmanager>

                                                <short-running-threads blocking="true">

                                                        <core-threads count="10" per-cpu="20"/>

                                                        <queue-length count="10" per-cpu="20"/>

                                                        <max-threads count="10" per-cpu="20"/>

                                                        <keepalive-time time="10" unit="seconds"/>

                                                </short-running-threads>

                                                <long-running-threads blocking="true">

                                                        <core-threads count="10" per-cpu="20"/>

                                                        <queue-length count="10" per-cpu="20"/>

                                                        <max-threads count="10" per-cpu="20"/>

                                                        <keepalive-time time="10" unit="seconds"/>

                                                </long-running-threads>

                                            </default-workmanager>

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:jmx:1.0">

                                            <jmx-connector registry-binding="jmx-connector-registry" server-binding="jmx-connector-server" />

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:jpa:1.0">

                                            <jpa default-datasource=""/>

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:naming:1.0" />

                                        <subsystem xmlns="urn:jboss:domain:pojo:1.0" />

                                        <subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">

                                            <configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">

                                                <property name="manager.root">jboss-osgi</property>

                                            </configuration>

                                            <properties>

                                                <!--

                                                    A comma seperated list of module identifiers. Each system module

                                                    is added as a dependency to the OSGi framework module. The packages

                                                    from these system modules can be made visible as framework system packages.

                                                    http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Constants.html#FRAMEWORK_SYSTEMPACKAGES_EXTRA

                                                -->

                                                <property name="org.jboss.osgi.system.modules">

                                                org.apache.commons.logging,

                                                org.apache.log4j,

                                                org.jboss.as.osgi,

                                                org.slf4j,

                                                </property>

                                                <!--

                                                    Framework environment property identifying extra packages which the system bundle

                                                    must export from the current execution environment

                                                -->

                                                <property name="org.osgi.framework.system.packages.extra">

                                                org.apache.commons.logging;version=1.1.1,

                                                org.apache.log4j;version=1.2,

                                                org.jboss.as.osgi.service;version=7.0,

                                                org.jboss.osgi.deployment.interceptor;version=1.0,

                                                org.jboss.osgi.spi.capability;version=1.0,

                                                org.jboss.osgi.spi.util;version=1.0,

                                                org.jboss.osgi.testing;version=1.0,

                                                org.jboss.osgi.vfs;version=1.0,

                                                org.slf4j;version=1.5.10,

                                                </property>

                                                <!-- Specifies the beginning start level of the framework -->

                                                <property name="org.osgi.framework.startlevel.beginning">1</property>

                                            </properties>

                                            <modules>

                                                <!-- modules registered with the OSGi layer on startup -->

                                                <module identifier="javaee.api"/>

                                                <module identifier="org.jboss.logging"/>

                                                <!-- bundles installed on startup -->

                                                <module identifier="org.apache.aries.util"/>

                                                <module identifier="org.jboss.osgi.webconsole"/>

                                                <module identifier="org.osgi.compendium"/>

                                                <!-- bundles started in startlevel 1 -->

                                                <module identifier="org.apache.felix.log" startlevel="1"/>

                                                <module identifier="org.jboss.osgi.logging" startlevel="1"/>

                                                <module identifier="org.apache.felix.configadmin" startlevel="1"/>

                                                <module identifier="org.jboss.as.osgi.configadmin" startlevel="1"/>

                                                <!-- bundles started in startlevel 2 -->

                                                <module identifier="org.apache.aries.jmx" startlevel="2"/>

                                                <module identifier="org.apache.felix.eventadmin" startlevel="2"/>

                                                <module identifier="org.apache.felix.metatype" startlevel="2"/>

                                                <module identifier="org.apache.felix.scr" startlevel="2"/>

                                                <module identifier="org.apache.felix.webconsole" startlevel="2"/>

                                                <module identifier="org.jboss.osgi.jmx" startlevel="2"/>

                                                <module identifier="org.jboss.osgi.http" startlevel="2"/>

                                                <!-- bundles started in startlevel 3 -->

                                                <module identifier="org.jboss.osgi.blueprint" startlevel="3"/>

                                                <module identifier="org.jboss.osgi.webapp" startlevel="3"/>

                                                <module identifier="org.jboss.osgi.xerces" startlevel="3"/>

                                            </modules>

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:remoting:1.0"/>

                                        <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0" />

                                        <subsystem xmlns="urn:jboss:domain:sar:1.0"/>

                                        <subsystem xmlns="urn:jboss:domain:security:1.0">

                                            <security-domains>

                                                <security-domain name="other" cache-type="default">

                                                    <authentication>

                                                        <login-module code="Disabled" flag="required"/>

                                                    </authentication>

                                                </security-domain>

                                            </security-domains>

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:threads:1.0"/>

                                        <subsystem xmlns="urn:jboss:domain:transactions:1.0">

                                            <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

                                            <core-environment>

                                                <process-id>

                                                    <uuid />

                                                </process-id>

                                            </core-environment>

                                            <coordinator-environment default-timeout="300"/>

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">

                                            <connector name="http" scheme="http" protocol="HTTP/1.1" socket-binding="http"/>

                                            <virtual-server name="default-host" enable-welcome-root="true">

                                               <alias name="localhost" />

                                               <alias name="example.com" />

                                            </virtual-server>

                                        </subsystem>

                                        <subsystem xmlns="urn:jboss:domain:weld:1.0" />

                                    </profile>

                                 

                                 

                                    <interfaces>

                                        <interface name="management">

                                            <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>

                                        </interface>

                                        <interface name="public">

                                           <inet-address value="${jboss.bind.address:127.0.0.1}"/>

                                        </interface>

                                    </interfaces>

                                 

                                 

                                    <socket-binding-group name="standard-sockets" default-interface="public">

                                        <socket-binding name="http" port="8090"/>

                                        <socket-binding name="https" port="8443"/>

                                        <socket-binding name="jmx-connector-registry" interface="management" port="1090"/>

                                        <socket-binding name="jmx-connector-server" interface="management" port="1091"/>

                                        <socket-binding name="jndi" port="1099"/>

                                        <socket-binding name="osgi-http" interface="management" port="8090"/>

                                        <socket-binding name="remoting" port="4447"/>

                                        <socket-binding name="txn-recovery-environment" port="4712"/>

                                        <socket-binding name="txn-status-manager" port="4713"/>

                                    </socket-binding-group>

                                 

                                 

                                </server>

                                • 13. Re: User Admin for JBOSS-AS-7.0.2
                                  Darran Lofthouse Master

                                  Looking at your config you need to be connecting to port 9990 as that is where the admin console is - port 8090 is for your own deployed apps.

                                  • 14. Re: User Admin for JBOSS-AS-7.0.2
                                    Phani Reddy V Newbie

                                    Please add security-realm="PropertiesMgmtSecurityRealm" to the below 2 lines in standalone.xml file.

                                     

                                       <native-interface interface="management" port="9999" />

                                              <http-interface interface="management" port="9990"/>

                                     

                                    And then access the Admin Console using http://localhost:9990/console

                                    1 2 Previous Next