1. JBoss EAP 6 Modes
  • There are two operating or start-up modes for JBoss EAP 6 : Standalone & Domain
  • Differ is in how servers are managed, not in their capacity to service end-user requests.
  • High-availability (HA) cluster functionality is available via both operating mode. A group of standalone servers can also be configured to form an HA cluster.

 

      a. Standalone Servers

 

  • Standalone server mode is an independent process and is similar to the running mode available in previous JBoss EAP versions.
  • A JBoss EAP 6 instance running as a standalone server is a single instance only but can optionally run in a clustered configuration.

 

      b. Managed Domains

 

  • This mode allows for management of multiple JBoss EAP 6 instances from a single control point.
  • Centrally managed JBoss EAP 6 server collections are known as members of a domain.
  • All JBoss EAP 6 instances in a domain share a common management policy.
  • A domain consists of

1 domain controller

1 or more host controller(s)

0 or more server groups per host.

 

  • The host controller on each host interacts with the domain controller to control the lifecycle of the application server instances running on its host and to assist the domain controller to manage them.
  • Each host can contain multiple server groups.
  • You can run multiple host controllers on the same hardware if you use different configurations, ensuring their ports and other resources do not conflict.

  1. Host Controller
  • When the domain.sh or domain.bat script is run on a host, a process known as a Host Controller is launched.
  • One Host Controller instance is configured to act as the central Domain Controller.
  • The Host Controller on each host interacts with the Domain Controller to control the lifecycle of the application server instances running on its host and to assist the Domain Controller in managing them.
  • The Host Controller is responsible for starting and stopping the individual application server processes that run on its host, and interacts with the Domain Controller to help manage them.
  • Each Host Controller by default reads its configuration from the domain/configuration/host.xml
  • If you kill host controller, process control will start it again.

 

  1. Domain Controller

JBoss EAP 6 server instance that acts as a central management point for a domain.

One host controller instance is configured to act as a domain controller.

By default, the central management policy is stored in the domain/configuration/domain.xml file. This file is in the unzipped JBoss EAP 6 installation file, on the domain controller’s host’s filesystem.

 

Domain Controller : Discovery and Failover

 

When setting up a managed domain, each host controller must be configured with information needed to contact the domain controller. In EAP 6.3, each host controller can now be configured with multiple options for finding the domain controller. Host controllers iterate through the list of options until one succeeds.

This allows host controllers to be pre-configured with contact information for a backup domain controller. A backup host controller can be promoted to master if there is a problem with the primary domain controller, allowing host controllers to automatically fail over to the new master once it’s been promoted.

The following is an example of how to configure a host controller with multiple options for finding the domain controller.

<domain-controller>

<remote security-realm=”ManagementRealm”>

<discovery-options>

<static-discovery name=”primary” host=”xxx.yyy.81.100″ port=”9999″/>

<static-discovery name=”backup” host=”xxx.yyy.81.101″ port=”9999″/>

</discovery-options>

</remote>

</domain-controller>

  1. Process Controller
  • A lightweight Process Controller process that is responsible for spawning the other HOST CONTROLLER/SERVER processes and monitoring their lifecycle.
  • If process Controller is killed, then all process will be getting killed.

 

  1. Server Process
  • Started by Process Controller. These are application server instance
  • If killed, then you need to bring them up manually.

 

  1. Process Created on starting JBoss EAP 6

We can start the JBoss server in two modes

Standalone

  •  Started using ./standalone.sh
  • In standalone, only one process will be created:

 

[userID@HOSTNAME ~]$ ps auxwww | grep java

userID 24776 32.0 19.8 2860960 374064 pts/0 Sl+ 14:52   0:07 /app/jdk1.6.0_37/bin/java -D[Standalone] -server -XX:+UseCompressedOops -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/standalone/log/server.log -Dlogging.configuration=file:/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/standalone/configuration/logging.properties -jar /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/jboss-modules.jar -mp /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2 -Djboss.server.base.dir=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/standalone -b=192.168.0.45 -bmanagement=192.168.0.45

 

Domain

  • Started using ./domain.sh
  • This starts Many processes :
[Process Controller]
[Host Controller]
[Server:server-one]
[Server:server-two]

[userID@HOSTNAME ~]$ ps auxwww | grep java

userID 11763 1.2 2.9 1988448 56468 pts/0   Sl+ 20:03   0:00 /app/jdk1.6.0_37/bin/java -D[Process Controller] -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/log/process-controller.log -Dlogging.configuration=file:/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/configuration/logging.properties -jar /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/jboss-modules.jar -mp /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/modules org.jboss.as.process-controller -jboss-home /home/userID/app2/EAP-6.2.0/jboss-eap-6.2 -jvm /app/jdk1.6.0_37/bin/java -mp /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/modules — -Dorg.jboss.boot.log.file=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/log/host-controller.log -Dlogging.configuration=file:/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/configuration/logging.properties -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true — -default-jvm /app/jdk1.6.0_37/bin/java -b=192.168.0.45 -bmanagement=192.168.0.45

 

userID 11778 10.1 9.4 2020336 178664 pts/0 Sl+ 20:03   0:06 /app/jdk1.6.0_37/bin/java -D[Host Controller] -Dorg.jboss.boot.log.file=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/log/host-controller.log -Dlogging.configuration=file:/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/configuration/logging.properties -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -jar /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/jboss-modules.jar -mp /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.host-controller -mp /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/modules –pc-address 127.0.0.1 –pc-port 55166 -default-jvm /app/jdk1.6.0_37/bin/java -b=192.168.0.45 -bmanagement=192.168.0.45 -Djboss.home.dir=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2

 

userID 11830 15.9 22.8 2892888 431056 pts/0 Sl+ 20:03   0:09 /app/jdk1.6.0_37/bin/java -D[Server:server-one] -XX:PermSize=256m -XX:MaxPermSize=256m -Xms1303m -Xmx1303m -server -Djboss.bind.address=192.168.0.45 -Djboss.bind.address.management=192.168.0.45 -Djava.awt.headless=true -D[Host=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.home.dir=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2 -Djava.net.preferIPv4Stack=true -Djboss.server.log.dir=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/servers/server-one/log -Djboss.server.temp.dir=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/servers/server-one/tmp -Djboss.server.data.dir=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/servers/server-one/data -Dorg.jboss.boot.log.file=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/servers/server-one/log/server.log -Dlogging.configuration=file:/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/configuration/logging.properties -jar /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/jboss-modules.jar -mp /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.server

 

userID 11864 18.0 22.1 2892732 417300 pts/0 Sl+ 20:03   0:10 /app/jdk1.6.0_37/bin/java -D[Server:server-two] -XX:PermSize=256m -XX:MaxPermSize=256m -Xms1303m -Xmx1303m -server -Djboss.bind.address=192.168.0.45 -Djboss.bind.address.management=192.168.0.45 -Djava.awt.headless=true -D[Host=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.home.dir=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2 -Djava.net.preferIPv4Stack=true -Djboss.server.log.dir=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/servers/server-two/log -Djboss.server.temp.dir=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/servers/server-two/tmp -Djboss.server.data.dir=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/servers/server-two/data -Dorg.jboss.boot.log.file=/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/servers/server-two/log/server.log -Dlogging.configuration=file:/home/userID/app2/EAP-6.2.0/jboss-eap-6.2/domain/configuration/logging.properties -jar /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/jboss-modules.jar -mp /home/userID/app2/EAP-6.2.0/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.server

 

  1. Accessing Admin Console

Once Jboss server is started in either mode, Admin console can be access via :

http://<hostname>:<port>/console , default port being 9990

If you are not able to access the url, try starting Jboss using argument “-b=192.168.0.45 -bmanagement=192.168.0.45”

 

Eg:

./domain.sh -b=192.168.0.45 -bmanagement=192.168.0.45
./standalone.sh -b=192.168.0.45 -bmanagement=192.168.0.45
  1. Start/Stop Application server from console
  • We can start/stop the application server from the Domain console. This is applicable when server is started in domain mode

 

  1. Login to console –> Runtime –> TOPOLOGY

  1. Place cursor on server intended to be started or shutdown, and click to start/stop.

  1. Start/Stop Application server from command line
  1. Find jboss.domain.master.port value from domain/configuration/host.xml (default is 9999)
  2. Connect to Domain controller/Host controller.
EAP_HOME/bin/jboss-cli.sh --connect --controller=<host>:<port>
Eg:
EAP_HOME/bin/jboss-cli.sh --connect --controller=192.168.0.45:9999

Once you are connected to the host controller, you can control Host Controller , Groups and individual servers.

Shutdown Host Controller

/host=master:shutdown
  • This command kill JBoss domain host controller ( to which we are connected), killing all processes. Just like killing process Controller.
  • We cannot start host controller from cli/console

Control JBoss Groups

/server-group=<Group_Name>:start-servers
/server-group=<Group_Name>:stop-servers
Eg:
/server-group=main-server-group:start-servers
/server-group=main-server-group:stop-servers

This command start/stop default server group named main-server-group by declaring the group before calling the start and stop operations.

Control Individual Server Instance

/host=master/server-config=<server_name>:start
/host=master/server-config=<server_name>:stop
Eg:
/host=master/server-config=server-one:start
/host=master/server-config=server-one:stop

 

This command start/stop the JBoss instances individually.

 

Please leave your comments for any suggestion or queries on this topic!

 

Author

12+ Year IT professional SME with expertise in Middleware, Cloud Computing & DevOps Methodology.