I am using VirtualBox on a WINDOWS7, host of two DEBIAN7.7 guests, I run a Wildfly.8.2.0.Final istance per guest. Each guest can comunicate with the other one. Using one guest browser I can see the Wildfly istance welcome page that's running on the other guest. I run each istance in standalone-ha
mode, network interfaces have mutlicast enabled. I added a multicast route
route add -net 224.0.0.0 subnet 240.0.0.0 dev eth0
guests are identical. I made some tests using jgroups's test application McastReceiverTest and McastSenderTest with the following addresses: 230.0.0.4:45688, 230.0.0.4:45700 and 224.0.1.105:23364. Every test worked, on the receiver guest I can read what I sent by the sender guest. I and run Wildfly istance with this command
./standalone.sh -b=%ETH0_IP_ADDRESS% -c standalone-ha.xml -Djboss.node.name=%NODE_NAME% -u 230.0.0.4
I can see on Wildfly node named srv1
that the two istances build a cluster:
... ...ISPN000094: Received new cluster view: [srv2/web|3] (2) [srv2/web, srv1/web]
where srv1
and srv2
are the node names of the istances. A tcpdump show UDP packets come across the multicast address 230.0.0.4, just where JGroups is listening. Despite all this goodness, http-session is not shared, this is my problem. The application I use is very simple and <distributable/>
, I have already used it succesfully in a multiple nodes on a single host scenario. I tried to change my application too, I use this one https://github.com/liweinan/cluster-demo but http session is not shared.