Menu

EhCache replication by jgroups not working in JBoss EAP 6.2

2014-07-03
2014-07-04
  • Sathyanarayanan

    Sathyanarayanan - 2014-07-03

    Hi,
    We are using the EhCache for caching mechansm in our application. We are using Spring Cache framework with EhCache and the application is deployed in JBoss EAP 6.2 server. The jboss servers are clustered in doman mode in two separate linux nodes under same subnet. We are trying to replicate the cache using jgroups.

    Caching works properly on each of the server but the replication is not happening. ie, if we put an serialised object in one cache server , its not replicated in other cache server. We tried running the jgroups demo program to test the connectivity using multicast , its working fine without any issues. Means multicast is enabled on both the server nodes.

    The caching logs one each server states it has only one member (self) in the cluster group.

    I followed the changes recommended in this forum , but issue not solved.
    Please let us know if anything wrong in the configuration.

     
  • Sathyanarayanan

    Sathyanarayanan - 2014-07-03

    Attached the configuration files for reference.

     

    Last edit: Sathyanarayanan 2014-07-03
  • Bela Ban

    Bela Ban - 2014-07-04

    bind_port and mcast_port have the same value (45688) ? That won't work... Also, the timeout in PING (100000) means the first member will wait for 100 seconds; I don't think that's what you want.
    Try running the 2 nodes with Draw, e.g.
    java -Djava.net.preferIPv4Stack=true -cp jgroups.jar org.jgroups.demos.Draw -props ./jgroups-udp.xml -name A
    java -Djava.net.preferIPv4Stack=true -cp jgroups.jar org.jgroups.demos.Draw -props ./jgroups-udp.xml -name B
    Run probe.sh to investigate (check the manual for details).
    JBoss EAP has clustering built in; if you enable it, does the cluster form correctly ? If yes, you could then copy the JGroups config used by EAP and apply it to ehcache.

     

Log in to post a comment.