Question

I am trying to cluster my liferay 6.1.1 CE portal on two servers at Rackspace. The servers are windows 2008 R2, next generation cloud servers. I mention that because for multicasting to work, I have to enable a cloud network at rackspace and attach it to only next generation servers.

Each server has three network interfaces: public, rackspace data center, local private (cloud network).

I have followed all the steps to the tee from multiple articles, but for some reason it just does not want to replicate the data cache between the two servers.

The apache/tomcat configuration for session replication works fine. It also uses multicasting.

I have enabled the following lines in the portal properties file:

cluster.link.enabled=true

cluster.link.autodetect.address=: ---- I added this because it looks like it tries to bind to the public interface if I don't set a local address here...

lucene.replicate.write=true

Another thing here is that we have this exact setup working perfectly in our sandbox environment. The only difference is that the sandbox is not at rackspace, but here locally in our office...

Please help!

Thanks Wessel

So multicasting at rackspace does work, if you have next generation servers with a private cloud network attached. For this liferay clustering to work though, you have to use jgroups instead of RMI.

The lines below is what's needed in your portal properties file to get jgroups cache replication working on rackspace windows servers. The default RMI replication does not work:

cluster.link.enabled=true

cluster.link.autodetect.address=[local network IP]:[port]

ehcache.bootstrap.cache.loader.factory=com.liferay.portal.cache.ehcache.JGroupsBootstrapCacheLoaderFactory

ehcache.cache.event.listener.factory=net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory

ehcache.cache.manager.peer.provider.factory=net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory

lucene.replicate.write=true

Also add the following line to your setenv.bat as part of your JVM startup options:

-Djgroups.bind_addr=[local network IP]

Was it helpful?

Solution

Unless you specifically "introduce" the nodes to each other they will try to discover each other through multicast. My bet is that Rackspace is not routing any multicast requests. Look at the JGroups configuration where you can have your cluster machines communicate through unicast and it should work, given proper connectivity (try ping first)

You'll have to set the autodetect address, because that's the mechanism that determines which interface the (multicast) requests will be sent out on. As you obviously don't want them on your public-facing interface, it's correct (and expected) that you configure it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top