Cluster update
Since OpenKM v6.4.34 there is a new and much better cluster architecture. To take advantage of these clustering improvements you should upgrade your cluster configuration.
Master node
We have to modify the OpenKM.cfg configuration file, so you have to stop Tomcat:
$ sudo /etc/init.d/tomcat stop
Once Tomcat has been shutted down, remove the Lucene indexes:
$ rm -rf $TOMCAT_HOME/repository/index
Edit the OpenKM.cfg file and modify the cluster related section:
# Cluster - Master
cluster.backend=jms
cluster.node=master
Now edit the $TOMCAT_HOME/conf/context.xml Tomcat resources configuration:
<!-- Cluster - Master & Slave -->
<ResourceLink global="jms/ConnectionFactory" name="jms/ConnectionFactory" type="javax.jms.ConnectionFactory"/>
And the $TOMCAT_HOME/conf/server.xml resources configuration file:
<!-- Cluster -->
<Resource auth="Container" name="jms/ConnectionFactory" type="org.apache.activemq.ActiveMQConnectionFactory"
description="JMS Connection Factory" factory="org.apache.activemq.jndi.JNDIReferenceFactory"
brokerURL="tcp://master:61616" brokerName="HibernateSearchBroker"/>
Start Tomcat again:
$ sudo /etc/init.d/tomcat start
Login into OpenKM and go to Administration > Utilities > Rebuild indexes in order to generate the Lucene indexes again.
Slave nodes
We need to stop Tomcat because we have to modify the OpenKM.cfg configuration file:
$ sudo /etc/init.d/tomcat stop
When Tomcat is stopped remove the Lucene indexes:
$ rm -rf $TOMCAT_HOME/repository/index
Edit the OpenKM.cfg file and modify this section:
# Cluster - Slave
cluster.backend=jms
cluster.node=slave
Edit the $TOMCAT_HOME/conf/context.xml Tomcat resources configuration:
<!-- Cluster - Master & Slave -->
<ResourceLink global="jms/ConnectionFactory" name="jms/ConnectionFactory" type="javax.jms.ConnectionFactory"/>
Also edit the $TOMCAT_HOME/conf/server.xml resources configuration file:
<!-- Cluster -->
<Resource auth="Container" name="jms/ConnectionFactory" type="org.apache.activemq.ActiveMQConnectionFactory"
description="JMS Connection Factory" factory="org.apache.activemq.jndi.JNDIReferenceFactory"
brokerURL="tcp://localhost:61616" brokerName="HibernateSearchBroker"/>
Start Tomcat again:
$ sudo /etc/init.d/tomcat start
Login into OpenKM and go to Administration > Utilities > Rebuild indexes in order to generate the Lucene indexes again.