Hello,
I'm having a weird problem with my small GlassFish 4.0 cluster and I already spent 3 days on finding a solution. So here I am...
First of all some information about my setup: I'm running two virtual server machines on an VMware host further called "Hans" and "Fritz". Both of them have a static IP address. They are running Debian Wheezy 7.6 (x64) with Server JRE 7 Update 67.
The DAS and an Apache 2 with mod_jk as loadbalancer is running on Hans as well as an instance "hans-gf". On Fritz there's only an instance "fritz-gf". The "clusterjsp.war" is deployed to both of them with the "availabilityenabled" option set to true.
I already spent several hours on finding out that there may not be a dash in the jvmRoute using the mod_jk version I installed via APT and so they are set to "fritz" and "hans" which I'm also using in the worker.properties file.
Well. Back to my problem: When I'm running the "validate-multicast" command all is fine and both virtual machines receive messages via multicast. Then I start the cluster and the Apache and open my browser to test the session replication. Apache assigns me to one of the instances, I can enter session data, reload the page and get the same instance with all my session data every time. Now I shutdown the instance I'm assigned to (only the instance, not the whole machine) and reload the page. It takes a second to load and... I got a new session. Seems they are not replicating my data. Damn.
All is fine if I'm setting up GMS for direct communication instead of using a multicast address. So I guess the problem is somewhere in how "validate-multicast" is doing it's communication and how the instances do. Does anyone know what could be wrong with my setup?
I already tested it with two virtual machines (VirtualBox) running on my notebook. Same OS. Same Java. Same GlassFish. Their IPs are assigned via DHCP (bridged network adapter). And... it works! The only difference I could find was the entry in the "/etc/hosts" file. Their hostnames pointed to 127.0.1.1 while those of the server VMs pointed to their static IP. The guy from the network team told me there are not restrictions or firewalls or anything like that IN the subnet of the machines. The only thing being controlled is the traffic which goes out of the subnet.
Greetings,
Gacko