3 Replies Latest reply on Mar 2, 2011 4:29 PM by joaocunhalopes

    Help with mod_cluster 1.0.8 GA setup on Windows

    joaocunhalopes Newbie

      Hello.

      I have trying to get mod_cluster to work on windows.

      I wish to avoid using advertise (multicast) so I have configured mod-cluster-jboss-beans.xml (property advertise was set to false; explicit IP/port was declared on property proxyList) like this:

       

        <!-- Configure this node's communication with the load balancer -->

        <bean name="HAModClusterConfig" class="org.jboss.modcluster.config.ha.HAModClusterConfig" mode="On Demand">

       

          <!-- Comma separated list of address:port listing the httpd servers

               where mod_cluster is running. -->

          <property name="proxyList">192.168.1.20:6666</property>

          <!-- URL prefix to send with commands to mod_cluster.  Default is no prefix. -->

          <!--property name="proxyURL"></property-->

       

          <!-- mod_advertise is a small httpd module that advertises the

               availability of httpd servers via multicast, allowing

               ModClusterService to discover the httpd front-end instead of/in

               addition to having them defined in proxyList. -->

          <!-- Whether to listen for advertise messages -->

          <property name="advertise">false</property>

          <!-- Multicast address on which to listen for advertisements -->

          <property name="advertiseGroupAddress">${jboss.modcluster.advertise.address,jboss.partition.udpGroup:224.0.1.105}</property>

          <!-- Port to listen to for advertisements -->

          <property name="advertisePort">${jboss.modcluster.advertise.port:23364}</property>

       

          <!-- Comma delimited list of contexts that should *not* be auto-registered with httpd. -->

          <!-- ROOT indicates the root context. -->

          <!-- Context may be qualified by host using a colon, e.g. host1:context1 -->

          <!-- If no host is defined, localhost is assumed. -->

          <property name="excludedContexts">${jboss.modcluster.excludedContexts:ROOT,admin-console,invoker,jbossws,jmx-console,juddi,web-console}</property>

       

          <!-- Security key the proxy is going to send with advertise messages.

               Default is none. -->

          <!--property name="advertiseSecurityKey"></property-->

       

          <!-- Whether to use SSL to communicate with mod_cluster. Note this

               has nothing to do with handling of https requests by JBoss Web -->

          <property name="ssl">false</property>

       

          <!-- Configuration values for the load balancer itself (must be the

               same on all nodes in the cluster). These will be passed to the

               load balancer. -->

          <property name="stickySession">true</property>

          <property name="stickySessionForce">false</property>

          <property name="stickySessionRemove">false</property>

          <property name="maxAttempts">1</property>

          <property name="workerTimeout">-1</property>

        </bean>

       

      On the httpd "side" I am using Apache 2.2.17 and I have my httpd.conf setup like this:

       

      ServerRoot "D:/Apache2.2"

       

      ThreadsPerChild 250

      MaxRequestsPerChild 0

       

      # Required for Apache startup

      LoadModule authz_host_module modules/mod_authz_host.so

       

      # Module for server-status

      LoadModule status_module modules/mod_status.so

      ExtendedStatus On

       

      # Modules for JBoss mod_cluster

      LoadModule proxy_module modules/mod_proxy.so

      LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

      LoadModule slotmem_module modules/mod_slotmem.so

      LoadModule manager_module modules/mod_manager.so

      LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

      LoadModule advertise_module modules/mod_advertise.so

       

       

       

      Listen 192.168.1.20:6666

      <VirtualHost 192.168.1.20:6666>

          KeepAliveTimeout 60

          MaxKeepAliveRequests 0

       

          ManagerBalancerName mycluster

          AdvertiseFrequency 5

      </VirtualHost>

       

       

       

      Listen 192.168.1.20:80

      <VirtualHost *:80>

          <Location /mcm>

              SetHandler mod_cluster-manager

       

              Order deny,allow

              Deny from all

              Allow from all

          </Location>

       

          <Location /server-status>

              SetHandler server-status

       

              Order deny,allow

              Deny from all

              Allow from all

          </Location>   

       

          <Location /load-demo>

              Order deny,allow

              Deny from all

              Allow from all

          </Location>      

      </VirtualHost>

       

      The "problem" that I have is the following: if on httpd.conf I use:

       

      Listen 192.168.1.20:6666

      <VirtualHost 192.168.1.20:6666>

          KeepAliveTimeout 60

          MaxKeepAliveRequests 0

       

          ManagerBalancerName mycluster

          ServerAdvertise Off

      </VirtualHost>

       

      I just can't get mod_cluster to work. Nothing is shown on the page

       

      http://192.168.1.20/mcm

       

      as oposed to the first configuration, where, with

       

       

      Listen 192.168.1.20:6666

      <VirtualHost 192.168.1.20:6666>

          KeepAliveTimeout 60

          MaxKeepAliveRequests 0

       

          ManagerBalancerName mycluster

          AdvertiseFrequency 5

      </VirtualHost>

       

      I can see the JBoss servers on the page

       

      http://192.168.1.20/mcm

       

      Before posting here I have read this:

       

      http://docs.jboss.org/mod_cluster/1.1.0/html/faq.html#d0e4112

       

      I know the above link is for 1.1.0 and that I'm using 1.0.8 GA.

      Can anyone explain why with ServerAdvertise Off mod_cluster stops working?

      Thank you.

       

      John