0

I have done everything in WildFly 8 Cluster Howto using domain model. I can see every server in the server manager console, and I can see mod_cluster-manager.

Everything is OK, but when I use the session test war, cluster-demo.war, I visit a server's put.jsp, then close the server, then visit other server's get.jsp, I find that the session is null.

Mike
  • 4,852
  • 1
  • 29
  • 48
wphmoon
  • 1
  • 1
  • Are you using your browser to check http session? If it's so try to test with curl instead. I stumble in that trap, maybe it's the same for you. Check my question. http://stackoverflow.com/questions/27780952/wildfly-clustering-with-virtualbox – Francesco Feb 25 '15 at 07:27
  • What are you using for a load balancer? – Steve C Feb 26 '15 at 10:43
  • Do you see any message in your server console which says something like "session replication has happened" ? – Sam Mar 25 '15 at 10:28

1 Answers1

0

I have done every thing with wildfly 9 document, and failed in the last step http://IP/cluster-mode/put.jsp.

I solve the question with follow steps:(OS is Cent 6.5)

  1. I use mod_cluster with 1.2.6 version.
  2. Add "EnableMCPMReceive ON" in httpd.conf:<VirtualHost IP:10001> tag.
  3. Modify Slave domain.xml, search the "CHANGE ME !!" in <hornetq-server> tag, and change it to "@password@".
  4. Modify Master and Slave domain.xml From

    <subsystem xmlns="urn:jboss:domain:modcluster:2.0"> <mod-cluster-config advertise-socket="modcluster" connector="ajp"> <dynamic-load-provider> <load-metric type="???"/>(I forgot original setting) </dynamic-load-provider> </mod-cluster-config> </subsystem>

TO

`<subsystem xmlns="urn:jboss:domain:modcluster:2.0">
 <mod-cluster-config advertise-socket="modcluster" connector="ajp" proxy-list="IP:10001" balancer="other_server_group">
   <dynamic-load-provider>
    <load-metric type="busyness"/>
   </dynamic-load-provider>
 </mod-cluster-config>
</subsystem>`

PS: the balancer value must mapping httpd.conf:"ManagerBalancerName" setting and can't use "-".

  1. Stop iptables whit command : sudo service iptables stop
  2. Stop SELinux with command : sudo setenforce 0
  3. restart httpd, JBoass master ,slave.

All you done will see http://IP/cluster-mode/put.jsp have time to show.

Hope this can help you.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150