A cluster is a set of nodes which are managed together and participate in the workload management. Installing eXo Platform in the cluster mode is considered in the following main cases:

  • Load Balancing: when a single server node is not enough for handling the load.

  • High Availability: if one of nodes is failed, the rest of nodes in the cluster can assume the workload of the system. It means that no access is interrupted.

These characteristics should be handled by the overall architecture of your system. The Load Balancing is typically achieved by a front server or device that distributes the request to the cluster nodes. Also, the High Availability on the data layer can be typically achieved using the native replication implemented by Relation Database Management System (RDBMS) or Shared File Systems, such as SAN and NAS.

  • Shared file system

    Introduction to the shared file system which is necesary for the embedded JCR server.

  • Typical setup

    Steps to do a typical setup of eXo Platform cluster.

  • Advanced configuration

    Introduction to the advanced configuration which is optional and not required in general cases, including JBossCache and shared file system.

  • Local JCR index in cluster

    Description of changes which will be applied if the cluster is used with the local JCR index on each node.

See also

The following steps describe a typical setup of eXo Platform cluster:

The path is shared, so all nodes will need the read/write access to this path. Then, switch the JCR to the cluster mode.

In this step, JCR enables the automatic network replication and discovery between other cluster nodes.

or use the start_eXo.sh script with such parameters:

The cluster mode is preconfigured to work out of the box. The eXo Platform clustering fully relies on the JBossCache replication which uses JGroups internally. The default configuration of JBossCache lies in exo.portal.component.common-x.x.x.jar. Since eXo Platform 3.5, the JCR's JBossCache configuration is externalized to the gatein.conf.dir configuration folder:

JBossCache

The JBossCache configuration is done in the configuration.properties file using following properties:

By default, the nodes discovery is based on UDP, in which JGroups is responsible for the nodes identification through the UDP transport. The administrator can change the configuration of detection and ports in jgroups-udp.xml.

Shared file system

Optionally, if you need separate physical storage for JCR indexes and value storage files, it is possible to configure related paths, each to a separate shared file system:

Q1. How to migrate from local to the cluster mode?

If you intend to migrate your production system from the local (non-cluster) to the cluster mode, follow these steps:

1. Update the configuration to the cluster mode as explained above on your main server.

2. Use the same configuration on other cluster nodes.

3. Move the index and value storage to the shared file system.

4. Start the cluster.

Q2. Why is startup failed with the "Port value out of range" error?

On Linux, your startup is failed if you encounter the following error:

[INFO] Caused by: java.lang.IllegalArgumentException: Port value out of range: 65536

This problem happens under specific circumstances when the JGroups networking library behind the clustering attempts to detect the IP to communicate with other nodes.

You need to verify:

  • The host name is a valid IP address, served by one of the network devices, such as eth0, and eth1.

  • The host name is NOT defined as localhost or 127.0.0.1.

Q3. How to solve the "failed sending message to null" error?

If you encounter the following error when starting up in the cluster mode on Linux:

Dec 15, 2010 6:11:31 PM org.jgroups.protocols.TP down
SEVERE: failed sending message to null (44 bytes)
java.lang.Exception: dest=/228.10.10.10:45588 (47 bytes)

Be aware that clustering on Linux only works with IPv4. Therefore, when using a cluster under Linux, add the following property to the JVM parameters:

 -Djava.net.preferIPv4Stack=true 

Q3. How to hide JGroups protocol warnings in the log?

In the cluster mode, several eXo Platform subsystems, such as JCR, various caches, and organization service use shared JGroups transport; and in case of being used by the default UDP transport, it might cause a side effect (a lot of warnings) like these below:

WARNING: discarded message from different group "gatein-idm-api-cluster" (our group is "gatein-idm-store-cluster"). Sender was 192.168.1.55:54232
Dec 16, 2011 4:46:09 PM org.jgroups.protocols.TP passMessageUp
WARNING: discarded message from different group "gatein-idm-store-cluster" (our group is "gatein-idm-api-cluster"). Sender was 192.168.1.55:63364
Dec 16, 2011 4:46:10 PM org.jgroups.protocols.TP passMessageUp

To hide such warnings, need to configure the Application Server logger in an appropriate way:

  • Apache Tomcat: add the following lines to the ${CATALINA_HOME}/conf/logging.properties file:

org.jgroups.level = SEVERE

org.jgroups.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
  • JBoss Application Server: for the "all" server profile, add the following lines to the ${jboss_server}/server/all/conf/jboss-log4j.xml file:


<category name="org.jgroups.protocols.UDP">
    <priority value="ERROR"/>
</category>

See also

Copyright © 2009-2012. All rights reserved. eXo Platform SAS