1 Reply Latest reply on Oct 13, 2010 4:32 AM by asimoes

    Jboss 5.10+apache+mod_jk

    asimoes

      Hi.

      I'm creating a Jboss cluster in one machine.

      The cluster is ok.

      Now, i have a problem in configuring apache to work as loadbalancer to jboss.

       

      I had followed the documentation at JBOSS Chapter 8 and apache is running.

       

      I'm using Ubuntu 10.04      64 bits

       

      My jboss desired configuration is:

      two node clusters running one a single machine in different ip

      MyNode1 -> 192.168.0.21

      MyNode2 -> 192.168.0.22

      Apache Ip -> 10.1.4.200

       

      Services available:

      I have a XmlRpcServer on port 8081 in each cluster node

      I have Webservices on 8080

       

       

      My configurations are:

       

      Apache:

       

      httpd.conf

           ServerName 10.1.4.200

           Include /etc/apache2/conf/mod_jk.conf

       

      ports.conf

           NameVirtualHost *:80

           Listen 80

           <IfModule mod_ssl.c>

                Listen 443

           </IfModule>

       

           <IfModule mod_gnutls.c>

                Listen 443

           </IfModule>

       

       

      apache2.conf (no modification)

       

      uriworkermap.properties

           # Simple worker configuration file
           # Mount the Servlet context to the ajp13 worker
           /jmx-console=loadbalancer
           /jmx-console/*=loadbalancer
           /web-console=loadbalancer
           /web-console/*=loadbalancer
           /*=loadbalancer

       

      mod_jk.conf (attached)

      workers.properties (attached)

       

      JBOSS

       

      cd path_To_Jboss/server/myNode1/deploy/jbossweb.sar/

       

      server.xml (only relevant lines)

      <!-- A AJP 1.3 Connector on port 8009 -->
            <Connector protocol="AJP/1.3" port="8009" address="${jboss.bind.address}"
               redirectPort="8443" />

       

      <Engine name="jboss.web" defaultHost="192.168.0.21" jvmRoute="node1">

       

      cd path_To_Jboss/server/myNode2/deploy/jbossweb.sar/

       

      server.xml (only relevant lines)

      <!-- A AJP 1.3 Connector on port 8009 -->
             <Connector protocol="AJP/1.3" port="8009" address="${jboss.bind.address}"
                redirectPort="8443" />

       

      <Engine name="jboss.web" defaultHost="192.168.0.22" jvmRoute="node2">

       

       

      With this configuration i got:

      -> the log of apache is ok, no reported problem.

      -> Jboss clusters start ok

       

      When i try to access to 10.1.4.200 i cannot acces to jboss.

      The XmlRpcServer isn't balanced neither the webservices

       

      Can someone give some help ?

       

      The XmlRpcServer and the webservices are still available on the nodes ip

      192.168.0.21 and 22

        • 1. Re: Jboss 5.10+apache+mod_jk
          asimoes

          I had already solved my problem.

          For those who might be having the same problem, the answer is to add the virtual interface on mod_jk.conf

          Example:

          <VirtualHost *:80>

               ServerName 10.1.1.2

               JkMountFile conf/uriworkermap.properties

          </VirtualHost>