Friday, February 05, 2010

SOA 11g: Coherence cluster setup on laptop

When you follow the instruction to setup a SOA 11g cluster, you should have multiple servers, loadbalancers, etc. But sometimes you want to setup a SOA 11g cluster on your local machine/laptop. You can still follow the instructions in the documentation. But there is one issue regarding clustering fo SOA 11g. This is related to Oracle Coherence. Coherence wants a physical IP address. If you are using a localhost IP adres; 127.0.0.1 and 127.0.0.1 as Coherence it is still using the IP adress of the network card.

If you disable the network card (remove cable / disable wireless), then it will use the localhost settings, but it gives a warning.

To be independent of any IP address on your network card, create two dummy network interfaces.

as root:
# modprobe dummy numdummies=2
# ifconfig dummy1 192.168.0.1
# ifconfig dummy1 192.168.0.2

Change your /etc/hosts file to point your nodes to this IP address.

192.168.0.1 node1.vijfhuizen.com
192.168.0.2 node2.vijfhuizen.com

Now you are able to start the managed servers on your local machine as a cluster:

EXTRA_JAVA_PROPERTIES="-Dtangosol.coherence.wka1=node2.vijfhuizen.com -Dtangosol.coherence.wka2=node1.vijfhuizen.com -Dtangosol.coherence.localhost=node2.vijfhuizen.com"
export EXTRA_JAVA_PROPERTIES
./startManagedWebLogic.sh soa_server1


EXTRA_JAVA_PROPERTIES="-Dtangosol.coherence.wka1=node1.vijfhuizen.com -Dtangosol.coherence.wka2=node2.vijfhuizen.com -Dtangosol.coherence.localhost=node1.vijfhuizen.com"
export EXTRA_JAVA_PROPERTIES
./startManagedWebLogic.sh soa_server2

Reference info:


Post a Comment