6 Replies Latest reply on Sep 5, 2011 4:30 AM by Stuart Hughes

    5.0.0.CR8 hangs in replication mode with 2 local nodes

    Stuart Hughes Newbie

      Hi everyone,


      I've just started looking at Infinispan and have run into a problem when trying out replication mode in version 5.0.0.CR8.

      • distribution mode works in this version with the same test program
      • replication mode works in 4.2.1.FINAL with the same test program


      If anyone can think whay may be causing this, it would be good to hear from you.


      Regards, Stuart




      • Ubuntu 10.10 i686 (32bit)
      • Apache tomcat 6.0.28
      • java version "1.6.0_26" (Sun)
      • Maven 2.2.1


      Program scenario:

      • Http servlet is used to cache pages using Infinispan
      • Web app started by Maven on different ports (mvn tomcat:run -Dmaven.tomcat.port=909x)

      Repeat steps:

      • Start a java webapp on host A which creates a cache manager and cache
      • Store and retrieve values from the cache (works fine)
      • Start  a second webapp on host A (same code, but the web-app started on a new port)
      • You see messages on both indication "Received new, MERGED cluster view", however:
        • The call in the second jvm to cm.getCache("pageCache"); never returns
        • Both jvm's no longer respond (they appear hung)


      Infinispan XML config:


      <?xml version="1.0" encoding="UTF-8"?>

      <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"






                          <clustering mode="repl">



                <namedCache name="itemCache">







      public class InfCachingService

      implements ICachingService, ResourceLoaderAware {


                private static final Logger logger = LoggerFactory.getLogger(InfCachingService.class);

                private String configName = null;

                protected Cache<Integer, ContentBase> itemCache;

                protected Cache<String, PageCacheItem> pageCache;



                void setConfig(String configName) {

                          this.configName = configName;




                public void setResourceLoader(ResourceLoader resourceLoader) {

                          try {

                                    String configFile = resourceLoader.getResource( configName ).getFile().getCanonicalPath();


                          } catch(Exception e) {

                                    logger.error("Could not get resource file: "+ configName + " : " + e);




                protected Boolean createCaches(String configFile) {

                          System.out.println("Creating infinispan CacheManager from XML config");

                          try {

                                    DefaultCacheManager m = new DefaultCacheManager(configFile);

                                    if ( pageCache != null ) {

                                              throw new Exception("pageCache should not exists");


                                    pageCache = m.getCache("pageCache");

                                    System.out.println("pageCache created");

                                    return true;

                          } catch(Exception e) {

                                    logger.error("Could not create Caches:", e);

                                    return false;



      ...... SNIP .....


      Log output on second jvm:


      ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}.  Using default JGroups configuration!

      New view accepted: [z200-59673|1] [z200-59673, z200-39342]

      ISPN000094: Received new cluster view: [z200-59673|1] [z200-59673, z200-39342]

      ISPN000079: Cache local address is z200-39342, physical addresses are [fe80:0:0:0:250:56ff:fec0:8:60576]

      Waiting on view being accepted

      ISPN000128: Infinispan version: Infinispan 'Pagoa' 5.0.0.CR8

      Interceptor chain size: 6

      Interceptor chain is:

                >> org.infinispan.interceptors.InvocationContextInterceptor

                >> org.infinispan.interceptors.TxInterceptor

                >> org.infinispan.interceptors.NotificationInterceptor

                >> org.infinispan.interceptors.LockingInterceptor

                >> org.infinispan.interceptors.ReplicationInterceptor

                >> org.infinispan.interceptors.CallInterceptor

      Initiating state transfer process

      ISPN000074: Trying to fetch state from z200-59673

      New view accepted: MergeView::[z200-39342|3] [z200-39342, z200-59673], subgroups=[[z200-59673|2] [z200-59673], [z200-59673|1] [z200-39342]]

      ISPN000093: Received new, MERGED cluster view: MergeView::[z200-39342|3] [z200-39342, z200-59673], subgroups=[[z200-59673|2] [z200-59673], [z200-59673|1] [z200-39342]]