Ram
Ram

Reputation: 873

dEAP Jboss 6 Mod Cluster configuration

I'm setting up a cluster on EAP JBoss 6.0.1 with domain mode. The Master server is in ubuntu and one slave in another ubuntu and one slave in windows server. How to install and configure Apache mod cluster on ubuntu server properly? And also how to configure mod cluster on windows? I have *mod_cluster-1.2.0.Final-windows-x64-ssl* for windows and *mod_cluster-1.2.0.Final-linux2-x64-ssl.tar* for Ubuntu. Thanks in advance...

Upvotes: 0

Views: 2470

Answers (1)

thiagoh
thiagoh

Reputation: 7388

Thats simple..

1 - download last version of mod_cluster at this link and extract it.. 2 - configure your mod_cluster at the httpd.conf file like above..

Listen ##PUT THE BALANCER IP HERE##:80

############### mod_cluster Setting - STARTED ###############

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
# MOD_CLUSTER_ADDS
# Adjust to you hostname and subnet.
<IfModule manager_module>
  Listen ##PUT THE BALANCER IP HERE##:6666
  ManagerBalancerName mycluster
  <VirtualHost ##PUT THE MACHINE IP HERE##:6666>
    <Location />
     Order deny,allow
     Deny from all
     Allow from 192.168.0
    </Location>

    KeepAliveTimeout 300
    MaxKeepAliveRequests 0
    AdvertiseFrequency 5
    EnableMCPMReceive

    <Location /mod_cluster_manager>
       SetHandler mod_cluster-manager
       Order deny,allow
       Deny from all
       Allow from 192.168.0
    </Location>

  </VirtualHost>
</IfModule>

############### mod_cluster Setting - ENDED ###############

3 - Set each of your jboss node's name

<server name="node1" xmlns="urn:jboss:domain:1.2">

4 - Add the instance-id attribute in web subsystem as shown below in both the standalone nodes

<subsystem xmlns="urn:jboss:domain:web:1.1" instance-id="${jboss.node.name}" default-virtual-server="default-host" native="false">
    <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
    <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>
    .
    .
    .
</subsystem>

5 - Add the proxy-list in the attribute in mod-cluster-config of modcluster subsystem, which would be having IP Address and Port on which your Apache server (the balancer) is running so that JBoss server can communicate with it, as shown below in both the standalone nodes

<subsystem xmlns="urn:jboss:domain:modcluster:1.0">
    <mod-cluster-config advertise-socket="modcluster" proxy-list="##PUT THE BALANCER IP HERE##:80">
    .
    .
    .
    </mod-cluster-config>
</subsystem>

6 - Now you can go to http://BALANCER_IP:80 and test it and to manage the jboss instances with mod_cluster go to http://BALANCER_IP:6666/mod_cluster_manager

**Obs: if you want to run jboss in standalone mode you CANNOT use the "-b" flag with the ip 0.0.0.0 that listens requests from all IPs.. I recommend you use the IP of the machine that's running the jboss itself

Upvotes: 0

Related Questions