Skip to end of metadata
Go to start of metadata

Let's assume that you want to setup 2-nodes cluster of GateIn Portal servers on JBoss AS7 and one loadbalancer server, which will use Apache HTTPD+Mod_jk

Portal cluster setup

  1. Unzip your GateIn Portal bundle (assuming directory $GATEIN_HOME where bundle is unzipped) and create a copy for each cluster node:

    Let's assume that you have 2 available IP addresses (here node1 will be executed) and (here node2 will be executed). You can use either:

    • Two separate physical servers. In this case you need to have folder "node1" available on first server and folder "node2" needs to be available on second server.
    • One physical server, which is using two virtual IP addresses (Consult documentation of your OS on how to setup virtual IP addresses)
  2. All portal servers in cluster need to share same database. You need to choose one of two approaches:
    1. If you have setup with one physical server and two virtual IP addresses, you can use preconfigured H2 database without need to setup your own database. You can run the DB server (from GATEIN_HOME directory)
    2. For production setup with real cluster, it's recommended to install and setup other database and configure both nodes to use it. More info about database configuration via JBoss datasources is in Database Configuration chapter.
      You need to edit file standalone-ha.xml instead of standalone.xml because it's clustered setup
  3. Run the servers. From the node1 directory:

    And from the node2 directory:

    Now you can directly access node1 on and node2 on

Setting up mod_jk

  1. Install the apache server and mod_jk module
    On Fedora, the package containing Apache HTTP Server is named httpd. You will probably need to build and install mod_jk from sources, in which case the package httpd-devel might be useful. Verify that the file is present in /etc/httpd/modules .
    On Ubuntu the packages are named apache2 and libapache2-mod-jk.
  2. Setup apache to use mod_jk
    • When using Fedora and recent version of Apache (2.2+), put file mod-jk.conf into /etc/httpd/conf.d. Don't forget to load the module by appending the following line to /etc/httpd/conf/httpd.conf .

      File mod-jk.conf needs to look like this:

    • When using Ubuntu, you can create file mod-jk.conf with above content into /etc/apache2/mods-enabled
  3. Setup workers
    in /etc/httpd/ (or /etc/apache2/ in case of Ubuntu) create file. And make sure that balanced workers have same names as the name of attribute used to run both nodes, which has been configured in previous steps. In our case, we used names _node1 and node2 in server.xml. This means that particular balanced workers in file also need to have same names node1 and node2 . File in our case can look like this:

    And file which should be like this

  4. Problems & Solutions
    1. You've configured everything properly, yet you're unable to access the portal via Apache.
      • Description: When accessing EPP via Apache, you're getting "503 Service Temporarily Unavailable" response.
        The cluster itself is working and you can access individual EPP nodes directly.
        According to mod_jk.log, mod_jk is working, but Tomcat is reported as likely not to be running on the specified port.
      • Possible cause:
        If you're using Fedora, SELinux might be stopping httpd from accessing something important, e.g. jk.shm. Check SELinux alerts to see if that's the case.
      • Solution:
        Ideally, you would create a policy to deal with this. A quick workaround is to temporarily disable SELinux to allow Apache to initialize the mod_jk connector properly. You can do this using the following command:
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.