I installed JBoss EAP 6.4.0 on two different virtual machines:
Ubuntu Server 12.10, IP=192.168.0.20
Ubuntu Server 12.10, IP=192.168.0.23
Then on each machine I edited the standalone-ha.xml file in standalone/configuration
and replaced all occurrences of 127.0.0.1
with 0.0.0.0
, to allow other machines to connect to the JBoss server.
Then I run the server this way:
$ ./standalone.sh -c standalone-ha.xml -b 192.168.0.{20|23} -u 230.0.0.4 -Djboss.node.name=node{1|2}
I copied a distributable war file in standalone/deployment
and I verified that the war file is executed in cluster mode: it says "received new cluster view
" and I clearly saw the names of both nodes on the logs.
I then connected to each instance:
http://192.168.0.20:8080/MyApp
http://192.168.0.23:8080/MyApp
If I shutdown machine 1
, I'm not able to get the web app's page on http://192.168.0.23:8080/MyApp
and vice-versa. But shouldn't the application be transferred on the other machine since they're on the same cluster?