session-replicationopennebulawildfly-10

OpenNebula, wildfly 10 and session replication


I'm having problems in the replication of the session, only in the case of instances of wildfly on different hosts. I basically configured wildfly in domain mode, creating a cluster with one master and one slave, clearly on two different virtual machines, both operated by OpenNebula. The problem is that these two virtual machines have two different sessions, even though they are in the same cluster and group wildfly. When I set the current date on a machine, the other does not receive the updated session, and when I go to read the other machine the date saved clearly the latter returns null. As if you create a new instance of the server directly on the master server, so the same address but different ports, the session is shared regularly.

It occurs to me that there are communication problems between the two hosts, but then I suppose that would not work either deploy the application in domain mode and not be able to form the cluster, which is the case. So the two machines, master and slave, talking to each other, otherwise they may not be the cluster. Furthermore, the application presents the attribute in the web.xml , which serves purpose to indicate that the application is distributed.

I followed the guide in wildfly documentation, specific for clustering, but not work well for me. I'm wrong something, but I don't know what.

And another strange situation is that mod_cluster 1.3.1 see all nodes, but are all in load 0. So aren't in the balancing. The context is registered in the virtual host but don't work. If I access to the url ip/cluster-demo/put.jsp it give me a 404 not found.


Solution

  • The problem was that I was using a wrong OS. Using Ubuntu Server didn't work anything, but when I installed the CentOS OS, all my problems was resolved. There was problems with Ubuntu Firewall. The CentOS installation instead didn't give me any problem. Use this distribution if you can, and you won't have any problem with OpenNebula / Wildfly cluster configuration.