You are on page 1of 67

JBOSS - EAP 6.4 Application Server on Linux machine .

Configuration File Purpose

standalone.xml This standalone configuration file is the default configuration that is used when
you start your standalone server. It contains all information about the server,
including subsystems, networking, deployments, socket bindings, and other
configurable details. It does not provide the subsystems necessary for messaging
or high availability.
standalone-ha.xml This standalone configuration file includes all of the default subsystems and adds
the modcluster and jgroups subsystems for high availability. It does not provide
the subsystems necessary for messaging.
standalone-full.xml This standalone configuration file includes all of the default subsystems and adds
the messaging-activemq and iiop-openjdk subsystems. It does not provide the
subsystems necessary for high availability.
standalone-full-ha.xml This standalone configuration file includes support for every possible subsystem,
including those for messaging and high availability.
standalone-load- This standalone configuration file includes the minimum subsystems necessary
balancer.xml to use the built-in mod_cluster front-end load
balancer to load balance other JBoss EAP instances.

Step 1: Make one directory JBOSS1

Command >> mkdir JBOSS1

Screenshot 1:
Step 2: copy the jboss binaries to that JBOSS1 folder.

Command >> cp -pr jboss-eap-6.4.0.zip /JBOSS1

Screenshot 2:

Step 3: unzip the jboss-eap-6.4.0.zip binaries .

Command >> unzip jboss-eap-6.4.0.zip

Screenshot 3:

Step 4: change permission to that directory.

Command >> chmod -R 755 /JBOSS1

Screenshot 4:
Step 5: Before starting make sure java is installed on Linux machine.

Command >> java -version

Screenshot 5:

Step 6: We have to add a users.

Command >> ./add-user.sh

Screenshot 6:
What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
Where,
a)The ManagementRealm and is authorized to perform management operations using the
web-based Management Console or command-line based Management CLI.
b)Adds a user to the ApplicationRealm, and provides no particular permissions. That realm
is provided for use with applications.
Step 7: locate to /JBOSS/JBOSS1/jboss-eap-6.4/bin  and  run add-user.sh to add
the users.

Command >> ./add-user.sh

Screenshot 7:

Where,
./add-user.sh  >> Use to add user
Username >> Provide username for Managemnet User.

Password >> Provide password for Management User.

Added user 'jboss' to file >> List of .properties file where the 'jboss' user is added .

Step 8: After adding user we have to start jboss using ./standalone.sh file.
Locate to /JBOSS/JBOSS1/jboss-eap-6.4/bin and run  ./standalone.sh

Command >> ./standalone.sh

Screenshot 8:

Where,

   JBOSS_HOME: /JBOSS/JBOSS1/jboss-eap-6.4   >> says jboss home.

   -verbose:gc >> gc.log location


 
   -Xms1303m -Xmx1303m  >> heap size from standalone.conf
 
   -XX:MaxPermSize=256m >> Perm size from standalone.conf

    http-/127.0.0.1:8080 >> The “public” interface binding is used for all


application related network communication.

http://127.0.0.1:9990 >> The “management” interface is used for all


components and services that are required by the management layer
Step 9: go to browser , use http://127.0.0.1:9990 for login .

Screenshot 9:

Step 10 : Deploy the  Calendar.war file on jboss using file system.

Command >>  cp -pr Calendar.war  /JBOSS/JBOSS1/jboss-eap-


6.4/standalone/deployments/

Screenshot 10:

where,

     JBAS018210: Register web context: /Calendar    >> Access the application


using context root.
Step 11 : Go to browser , use URL http://127.0.0.1:8080/Calendar

Screenshot 11:

Step 12 : Bind JBOSS to a Available IP address

from http://127.0.0.1:8080 to http://192.168.216.134:8080   >> Application Public


IP (IPV4)
     &
     http://127.0.0.1:9990 to http://192.168.216.134:9990/console  >> JBOSS
Management user console

Step 13 : To bind  "Application Public IP" (IPV4)

 locate to jboss bin ,  use below command.

Command >>  ./standalone.sh      -b=192.168.216.134

Where,

-b=XXX.XXX.XXX.XXX is use  to  bind Application “public” interface to a specific IP


address.

Screenshot 13-1:
Screenshot 13-2:

Step 14 : To bind “management” interface to available IP addresses

locate to jboss bin ,  use below command.

Command >>  ./standalone.sh      -bmanagement=192.168.216.134 

Where,

-bmanagement=XXX.XXX.XXX.XXX is use to bind “management” interface to a specific IP


address.

Screenshot 14-1:

Step 15 : To bind jboss  “public” and “management” interface together .

locate to jboss bin ,  use below command.

Command >>  ./standalone.sh   -b=192.168.216.134    -


bmanagement=192.168.216.134
Screenshot 15-1:

Screenshot 15-2:

JBoss EAP 6.X Http Connector Settings

max-connections: The maximum number of connections that the server will accept and
process at any given time.
If the max-connections attributes is not set on web subsystem connectors in standalone-
(*).xml / domain.xml, default is computed as:

512 * Runtime.getRuntime().availableProcessors() //for default Java connector

(i.e The maximum number of simultaneous connection for JBoss server is


based on the number of CPU cores and it is calculated as  512*(no of CPU
core)).

32 * Runtime.getRuntime().availableProcessors() //for native APR connector


addon

max-threads: The maximum number of request processing threads to be created by this


Connector, which therefore determines the maximum number of simultaneous requests that
can be handled.

Reference link :
https://access.redhat.com/documentation/6.4/pdf/installation_guide/Red_Hat_JBoss_EA
P_6.4
https://access.redhat.com/documentation/en-us/
http://anonsvn.jboss.org/repos/jbossweb/tags
https://developer.jboss.org/thread/266415
https://access.redhat.com/solutions/25054

Thanks :-)

#############################END-##########################################

JBoss EAP 7 - DOMAIN installation.

A domain controller is the central point from which the domain is controlled. It ensures
that each server is configured according to the management policy of the domain.

A host controller is a physical or virtual host that 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.
A server group is a set of server instances which have JBoss EAP installed on them and are
managed and configured as one. The domain controller manages the configuration of and
applications deployed onto server groups. Consequently, each server in a server group shares
the same configuration and deployments.

**Managed Domain Configuration Files**


Configuration File Purpose

domain.xml This is the main configuration file for a managed domain. Only the domain master
reads this file. This file contains the configurations for all of the profiles

 (default, ha, full, full-ha, load-balancer).

host.xml This file includes configuration details specific to a physical host in a managed
domain, such as network interfaces, socket bindings, the name of the host, and
other host-specific details. The host.xml file includes all of the features of
both host-master.xml and host-slave.xml, which are described below.

host-master.xml This file includes only the configuration details necessary to run a server as the
master domain controller.

host-slave.xml This file includes only the configuration details necessary to run a server as a
managed domain host controller.

Step 1:  Create four folders listed below.


 
(i) JBOSSMAIN
(ii) JBDOMAIN
(iii) Slave1
(iv)  Slave2

Screenshot :
Step 2: Copy the JBOSS EAP 7.1 to JBOSSMAIN folder and unzip.

Command : unzip jboss-eap-7.1.0.Alpha.zip

Screenshot :

Step 3:  Navigate to JBOSSMAIN/jboss-eap-7.1/bin and run add-user.sh

Screenshot :
We have successfully added user.

Step 4: Now copy domain folder from JBOSSMAIN/jboss-eap-


7/domain to JBDOMAIN , Slave1  and Slave2.

Screenshot :
Step 5 : Navigate to  copied /JBOSS/JBDOMAIN/domain/configuration 

Screenshot  :

Step 6: We have to edit two configuration files host-master.xml & domain.xml 

Screenshot  :
Step 7 : Before editing always take backup of configuration file, Edit host-
master.xml.

(i) Replace the <host xmlns="urn:jboss:domain:5.0" name="master"> with


                    <host xmlns="urn:jboss:domain:5.0" name="Domain-master">

Screenshot :

(ii) Review the Domain controller configuration:

Screenshot :

(iii) Review the management address parameters.


(iv) Review native port of domain controller.

(v)  Review HTTP port to access the management interface.

Screenshot  :

(vi) Change management address of the domain controller with your machine
IP.

Screenshot :

Step  8 : Navigate to /JBOSS/JBDOMAIN/domain/configuration and


edit domain.xml file.

Now add the groups in order primary-server-group and secondary-server-group to


the Domain-controller server-groups.

###############################################################
######

<server-groups>
        <server-group name="primary-server-group" profile="full">
                <jvm name="default">
                          <heap size="1000m" max-size="1000m"/>
                          <permgen max-size="256m"/>
                </jvm>
            <socket-binding-group ref="full-sockets"/>
          </server-group>
<server-group name="secondary-server-group" profile="full">
                 <jvm name="default">
                         <heap size="1000m" max-size="1000m"/>
<permgen max-size="256m"/>
                  </jvm>
            <socket-binding-group ref="full-sockets"/>
        </server-group>
</server-groups>

###############################################################
####

Where, permgen tag is optional.

Before Change 
Screenshot :

After Change
Screenshot :
Step 9 : Start the domain controller using below command from
"/JBOSS/JBOSSMAIN/jboss-eap-7.1/bin/".

/JBOSS/JBOSSMAIN/jboss-eap-7.1/bin/domain.sh --host-config=host-
master.xml -Djboss.domain.base.dir=/JBOSS/JBDOMAIN/domain &

http://192.168.43.79:9990/console/

Screenshot :

Screenshot :
Screenshot :

Nice :-) ,  now the domain configuration is done.

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

Now, Configure the Host Controller


on Slave1 and Slave2

Step 1: Navigate to /Slave1/domain/configuration and edit host-slave.xml

Register the Slave1 with domain controller using name"Slave1".

Screenshot :
Step 2 : Review the native management interface port on Slave1 to avoid port conflicts also
check  , management address , domain-controller.

Add management IP address in "<domain-controller>" tag 

Before change
Screenshot :

After Change
Screenshot :
Step 3 : Edit <servers> tag and add the number of servers with dedicated "JVM"
heap for groups.

IMP NOTE : Use different port offset for each "JVM ".

"<socket-bindings port-offset="100"/>"     &    "<socket-bindings port-offset="200"/> "

Before change
Screenshot :

After Change
Screenshot :
###############################################################
####

<servers>
 <server name="Server1" group="primary-server-group">
           <jvm name="default">
                   <heap size="164m" max-size="256m"/>
            </jvm>
           <socket-bindings port-offset="100"/>
 </server>
  <server name="Server2" group="secondary-server-group">
            <jvm name="default">
                       <heap size="264m" max-size="356m"/>
            </jvm>
          <socket-bindings port-offset="200"/>   
 </server>
</servers>

###############################################################
##

Step 4 : start the Slave1 host controller with the following command.

/JBOSS/JBOSSMAIN/jboss-eap-7.1/bin/domain.sh --host-config=host-
slave.xml -Djboss.domain.base.dir=/JBOSS/Slave1/domain &

Screenshots:
Check through console,
http://192.168.43.79:9990/console/
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$

Now,  similarly Configure the - Slave2 instance as  per


previous step.
NOTE :
 (i) Add name "Slave2" on host.
(ii)  Change  native management interface port for slave2 host and management
address , domain-controller.
(iii) use different "<socket-bindings port-offset="220"/>    " for  servers3 and
server4 .

Step : start the Slave2 host controller with the following command:

/JBOSS/JBOSSMAIN/jboss-eap-7.1/bin/domain.sh --host-config=host-
slave.xml -Djboss.domain.base.dir=/JBOSS/Slave2/domain &

Screenshots
 JBOSS PORTS :

############################END#########################################

JBoss EAP 7 - DOMAIN DEPLOYMENT - GUI CONSOLE


MODE.
JBOSS PORTS : 

On above diag, always note down port - offset which we have used during
configuration.

Step 1:  Login to console.

Screenshot :
Step 2 : Click on Deployments tab.

Screenshot :

Step 3 : Click on Content Repository >> Add .

Screenshot  :
Step 4 : Choose upload a new deployment >> Next.

Screenshot  :

Step 5 : Click on Browse > select a file >> Next .

Screenshot :

Screenshot  :
Step 6 : Verify upload details : Name & Runtime Name >> Finish .

Screenshot  :

Screenshot  :
Step 8 : Click on assign , for assigning calendar.war to group wise.

Screenshot :

Step 9 : Choose the server groups to assign 'Calendar.war'.

 We can also enable the deployment 

Screenshot :
Step 10 : Assigning to primary-server-group & Enable deployment to group >>
Assign.

Screenshot :

Step 11 : Check the assigned .war 


Screenshot :

No deployment were assign to secondary-server-group 

Screenshot :

Step 12 :  Similarly we have assigned "hello.war" on secondary-server-group 


after DEPLOYMENT.

Screenshot :
Step 13 : Check the application logs form console itself Group-wise.

 primary-server-group ( Server1 & Server3 )

 Screenshot :

 Screenshot :
Screenshot :

 Step 15 : Check the application logs form console itself Group-wise.

 secondary-server-group ( Server2 & Server4 )

 Screenshot :
 Screenshot :

Screenshot :

Step 16 : Check the application through URL : 

We have used PORT offset on Server1 & Server3 of 100 & 110 

Server1 >> 8080+100 =  8180

Server3 >> 8080+110 =  8190

Screenshot :
Step 17 : Check the application through URL : 

We have used PORT offset on Server2 & Server4 of 200 & 120

Server2 >> 8080+200 =  8280

Server4 >> 8080+120 =  8200

Screenshot :

Thanks :-)

###############################END###################################

JBOSS EAP 6 TO 7 Migration


Migration of JBOSS EAP 6 to JBOSS EAP 7 is now made easy.

 The JBoss Server Migration Tool is a Java application that automatically migrates
JBoss EAP server configurations with minimal or no interaction required.
 The JBoss Server Migration Tool reads your existing source server configuration files
and adds configurations for any new subsystems, updates the existing subsystem
configurations with new features, and removes any obsolete subsystem configurations.

You can run the JBoss Server Migration Tool in either of the following ways

 Interactive mode: This mode, which is the default, allows you to choose exactly
which configurations you want to migrate.
  Non-interactive mode: This mode allows you to run the tool without prompts.

NOTE: You must Stop both target and source JBOSS EAP servers & Take Full Backup
of target & Source JBoss EAP servers.

Command Syntax: 

$JBOSS-7.2-HOME/bin/jboss-server-migration.sh --source  ../jboss-eap-6.4  --target ../jboss-


eap-7.2

Step 1: Navigate to Target $JBOSS-7-HOME Server /bin folder.

Step 2: Use below command for Interactive mode way, it’s by default.

./jboss-server-migration.sh --source /JBOSS/jboss-eap-6.4 --target /JBOSS/jboss-eap-7.2

Where,
jboss-server-migration.sh : JBoss Migration tool script.
--source : location of old JBoss EAP Server.
-- target : Location of New targeted JBoss EAP server.

You may ask multiple interactive question for migration of  source standalone
configuration, deployments & domain configurations.
Step 3: On Completion Migration Success message is available.
Step 4: New migration Configuration is available now.
Step 5: Migration Logs & reports, Reports are available in .xml & html file formats:

FOR,

 JBoss Server Migration Tool in  NonInteractive Mode:

NOTE: The JBoss Server Migration Tool automatically migrates all subsystem
configurations for all server configuration files ONLY,  Deployements will going to be
SKIP.

Use below Commands:


./jboss-server-migration.sh --source /JBOSS/jboss-eap-6.4 --target /JBOSS/jboss-eap-
7.2 --interactive false

JBoss Migration Report is HTML format:

#############################END######################################

How to Install Apache HTTP Server 2.4.27 Latest Version


on LINUX machine
Step 1: make one directory APACHEWEB [in my case].

Command >> mkdir APACHEWEB

Step 2: Locate to APACHEWEB directory use below command to downlaod Apache HTTP
Server 2.4.27.

Command >> wget http://redrockdigimark.com/apachemirror//httpd/httpd-


2.4.27.tar.gz

Screenshot 2-1 :
 

OR

Download from this link  https://httpd.apache.org/download.cgi#apache24

Screenshot 2-2:

Step 3 : Change the permission to this directory

Command >> chmod -R 755 /APACHEWEB


Screenshot 3:

Step 4: Following requirements you need to be complete.

Refrence link : https://httpd.apache.org/docs/2.4/install.html

Screenshot 4:

Step 5: Extract this httpd-2.4.27.tar.gz

Command >> tar -xvzf httpd-2.4.27.tar.gz

Screenshot 5:
Step 6: locate to /APACHEWEB/httpd-2.4.27/srclib  , since no pre-libraries are there
,so we have to downlaod libraries.

Screenshot 6:

Step 7: Let's complete this requirements execute below commands on


lcation /APACHEWEB/httpd-2.4.27/srclib directory :

      7-1 : Download  Apache Portable Runtime (APR) and Apache Portable Runtime


(APR-Util) Utility 1.6.0 :

  Command for APR >> wget


http://redrockdigimark.com/apachemirror//apr/apr-1.6.2.tar.gz

  OR

  Download Link : http://apr.apache.org/download.cgi

  Screenshot 7-1:

  7-2: Download Apache Portable Runtime (APR-Util) Utility 1.6.0 :

  Command >> wget http://redrockdigimark.com/apachemirror//apr/apr-util-


1.6.0.tar.gz

  OR

  Download Link :  http://apr.apache.org/download.cgi

  Screenshot 7-2:

Step 8 : Extract this APR and APR Util.

8-1: Extract  apr-1.6.2.tar.gz

Command >>  tar -xvzf apr-1.6.2.tar.gz

Screenshot 8-1:

8-2: Extract apr-util-1.6.0.tar.gz

Command >>  tar -xvzf apr-util-1.6.0.tar.gz

Screenshot 8-2:
Step 9: Rename  apr-util-1.6.0 and apr-1.6.2 version info.

Command >> mv apr-util-1.6.0   apr-util

Command >>  mv  apr-1.6.2    apr

IMP NOTE : After rename please move "apr-util"  & "apr" to "/APACHEWEB/httpd-


2.4.27/srclib"

Screenshot 9:

Step 10 : Also make sure this rpm are intsalled on LINUX machine before installation.

Command >>  yum install pcre-devel

 Screenshot 10-1:
Command >>  yum install openssl-devel

 Screenshot 10-2:

Command >>  yum install expat-devel

 Screenshot 10-3:

Command >>  yum install gcc 

 Screenshot 10-4:
Step 11 : Once again change the permission.

Command >>  chmod -R 755 /APACHEWEB

Step 12: locate  to /APACHEWEB/httpd-2.4.27 and use below commands.

Command >>  ./configure --with-included-apr  


--prefix=/APACHEWEB/HTTPDWEB2.4 --enable-ssl --enable-so

Where,

--with-included-apr=Apache Portable Runtime (APR) and Apache Portable Runtime


libraries on location srclib
–prefix=Provide location where you need to install
apache ,  /APACHEWEB/HTTPDWEB2.4 in my case
–enable-ssl this will compile apache with SSL enabled so can secure apache web server
with SSL cert.
–enable-so

others sonfiguration options :-


  
"./configure" \
"--enable-so" \
"--enable-proxy" \
"--enable-proxy-http" \
"--enable-proxy-balancer" \
"--enable-rewrite" \
"--enable-proxy-ajp" \
"--prefix=" 

 Screenshot :
Step 13 : on same location /APACHEWEB/httpd-2.4.27 use  below commands.

Command >> make 

Screenshot 13:

Step 14 :  on same location /APACHEWEB/httpd-2.4.27 use  below commands.

Command >> make install

Screenshot 14 :

Step 15 : locate to /APACHEWEB/HTTPDWEB2.4  where  new installation of   httpd


server  has done. [--prefix=/APACHEWEB/HTTPDWEB2.4 ]
Screenshot 15:

Step 16: locate to bin directory of installed httpd server 2.4  and start the server .

Command >> ./apachectl  -k start

Screenshot 16:

Step 17: Now, check through browser.

Screenshot 17 :
Step 18 : For  Reference doc use below link

################################ENDDDDDDDDDDDDDD

Apache Mod Cluster as load balancer (LB) - JBoss 6.4

Connector Supports Adapts to Deployment Status


Sticky
Sessions

mod_cluster Yes Yes. Detects deployment and undeployment of applications and


dynamically decides whether to direct client requests to a server
based on whether the application is deployed on that server.

mod_jk Yes No. Directs client requests to the container as long as the
container is available, regardless of application status.

mod_proxy Yes No. Directs client requests to the container as long as the
container is available, regardless of application status.
ISAPI connector Yes No. Directs client requests to the container as long as the
container is available, regardless of application status.

NSAPI connector Yes No. Directs client requests to the container as long as the
container is available, regardless of application status.

Advantages:

 ·         Workers register themselves with httpd servers.


 ·         NO more workers.properties
 ·         Changes in cluster topology are send to httpd.
 ·         Deployed applications are automatically register, which can be Disable, stop & Enable   
from balancer HTTP console.
 ·         NO 404s for un-deployed applications.
 ·         Load balancer function automatically managed.

Software Details:

(1)  Apache/2.4.34(Unix) 

(2)  JBossEAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) 

(3) Download  mod_clustermodules for httpd 

Step 1: Install Apache server on UNIX.

Use below link to install Apache server on UNIX step by step.

https://www.middlewarebox.com/2017/08/how-to-install-apache-http-server-2427.html

Step 2: Download “mod_cluster modules for httpd” from below link, as per your environment.

http://mod-cluster.jboss.org/mod_cluster/downloads/1-3-1-Final-bin

Screenshot: 
Screenshot: 

Step 3: Move this mod_cluster modules to installed Apache server modules


location.  “$Apache_Home/modules”.

Step 4: Add below configuration to httpd.conf file at “$Apache_Home/conf”.

NOTE: Disable mod_proxy_balancer module.

# mod_proxy_balancer should be disabled while using mod_cluster.


***************************************************************

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

LoadModule cluster_slotmem_module modules/mod_cluster_slotmem.so

LoadModule manager_module modules/mod_manager.so

LoadModule advertise_module modules/mod_advertise.so

MemManagerFile /Apache/HTTPDWEB2.4/MemManagerFile

<IfModule manager_module>

Listen 10.142.0.2:9111

        ManagerBalancerName mycluster-1

        ManagerBalancerName mycluster-2

<VirtualHost 10.142.0.2:9111>

    <Directory />

##      AllowOverride None

      Require all granted

    </Directory>

    ServerAdvertise off

        EnableMCPMReceive

        KeepAliveTimeout 60

<Location /mod_cluster_manager>

    SetHandler mod_cluster-manager

      Require all granted

</Location>

</VirtualHost>

</IfModule>
AllowDisplay On

***************************************************************

Where,

MemManagerFile: That is the base name for the names mod_manager will use to store
configuration, generate keys for shared memory or lock files. That must be an absolute path name;
the directories will created if needed. It is highly recommended that those files are placed on a local
drive and not an NFS share.

Default: $Apache_Home/logs/.

ServerAdvertise On: Use the advertise mechanism to tell the JBoss AS to whom it should send the
cluster information.

ServerAdvertise On http://hostname:port: Tell the hostname and port to use. Only needed if the
VirtualHost is not defined correctly, if the VirtualHost is a Name-based Virtual Host [http://
httpd.apache.org/docs/2.2/vhosts/name-based.html] or when VirtualHost is not used.

ServerAdvertise Off: Don't use the advertise mechanism.

EnableMCPMReceive - Allow the VirtualHost to receive the MCPM from the nodes. You need one
EnableMCPMReceive in your httpd configuration to allow mod_cluster to work, put it in the
VirtualHost where you configure advertise.

SetHandler mod_cluster-manager: That is the handler to display the node mod_cluster sees from
the cluster. It displays the information about the nodes like INFO and additionally counts the number
of active sessions.

NOTE:

On httpd 2.2

#########

Order allow,deny

Allow from all

#########

And On   httpd 2.4 we use,


#########

Require all granted

#########

We have done with mod_cluster configuration on Apache Server.

Screenshot:

 Screenshot:
Step 5:  For performing  mod_cluster method, we need to use standalone-ha.xml or standalone-
full-ha.xml profile, Since this ha & full-ha has a mod_cluster subsystem configuration.

We will use ha profile.

Step 6: Add Jboss Server name on “standalone-ha.xml”.

**********************************************

<?xml version='1.0' encoding='UTF-8'?>

<server name="jboss-eap-6.4-1"   xmlns="urn:jboss:domain:1.7">

    <extensions>

**********************************************

Screenshot:
Step 7: Add Proxy-list and  Balancer name to “standalone-ha.xml” mod cluster subsystem.

***************************

        <subsystem xmlns="urn:jboss:domain:modcluster:1.2">

            <mod-cluster-config proxy-list="10.142.0.2:9111"  advertise-socket="modcluster"
connector="ajp" balancer="mycluster-1" >

                <dynamic-load-provider>

                    <load-metric type="busyness"/>

                </dynamic-load-provider>

            </mod-cluster-config>

        </subsystem>

***************************

 Screenshot:
Step 8: Add Node name to “standalone-ha.xml” web subsystem.

  ***************************

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


native="false" instance-id="jboss-eap-Node-1" >

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

            <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>

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

                <alias name="localhost"/>

                <alias name="example.com"/>

            </virtual-server>

        </subsystem>

***************************

Screenshot:

 Step 9: Start the “JBoss instance-1” from “$JBOSS_HOME-1/bin”, using below script,
./standalone.sh  -c  standalone-ha.xml   -b  10.142.0.2  -bmanagement  10.142.0.2

 Screenshot:

Step 10: Now, perform same configuration changes using different server name, balancer name &
instance-id on “JBoss instance-2”.

NOTE:  use port offset for socket-binding on “standalone-ha.xml”.

**********************************

  <socket-binding-group name="standard-sockets" default-interface="public" port-offset="$


{jboss.socket.binding.port-offset:10}">

**********************************

Step 11: Start the “JBoss instance-2” from  “$JBOSS_HOME-2/bin”, using below script.

./standalone.sh  -c  standalone-ha.xml   -b  10.142.0.2  -bmanagement  10.142.0.2

Screenshot:
Step 12: Check through browser, using http://ip:PORT/mod_cluster_manager

http://35.231.89.125:9111/mod_cluster_manager

 Screenshot:

Step 13: check the applications.

http://35.231.89.125/Sample/

http://35.231.89.125/Calendar/

http://35.231.89.125/Hello/
 Screenshot:

####################################^^^^^^^^^^^^^^^^^^^^^#####################

Running Multiple Instance of JBoss EAP 6.4 Standalone


Servers on a Single Machine

Step 1: Make One more Directory.

Command >> mkdir JBOSS2

Screenshot 1:

Step 2: Copy previously created JBOSS1 instance to JBOSS2

Command >> cp -pr jboss-eap-6.4   /JBOSS/JBOSS2/

Screenshot 2:
 If doesn't have already jboss instance click here:-)

Step 3:  Locate to /JBOSS/JBOSS2/jboss-eap-6.4/bin and run  ./standalone.sh 

Command >> ./standalone.sh   -b=192.168.216.134    -


bmanagement=192.168.216.134 -Djboss.socket.binding.port-offset=100

Where,

-b=XXX.XXX.XXX.XXX is use to  bind Application “public” interface to a specific IP


address.

-bmanagement=XXX.XXX.XXX.XXX is use  to bind “management” interface to a specific IP


address.

-Djboss.socket.binding.port-offset=100 is use  to avoid port conflict.

Screenshot 3-1:

Screenshot 3-2:
Screenshot 3-3:

Screenshot 3-4:

################%%%%%%%%%%%%%%%%%###########################

Monitor Apache httpd process/thread status


Step 1: Enable "mod_status" module on $apache_home/conf/httpd.conf file.

Step 2: Add below lines to get status of  Apache server.

####################################
LoadModule status_module modules/mod_status.so 
ExtendedStatus On

<Location "/server-status">
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost 192.168.105.170 
</Location>

####################################

Step 3: Now, check through browser using  http://localhost/server-status

Screenshots : 

You might also like