2 Replies Latest reply on Dec 6, 2013 9:42 AM by pruivo

    Infinispan 5.3.0.Final default replication cluster configuration problem.

    alex_ro_bv

      Hi guys,

       

      I am trying to do some replication, synchronously, but somehow, it doesn't replicate, doesn't throw any exception, I have no idea what I did wrong. I am wondering, if the replication would fail, shouldn't there be something in the logs?

       

      My replication test is on the same machine, with the following configuration:

       

      GlobalConfiguration configuration = GlobalConfigurationBuilder.defaultClusteredBuilder().clusteredDefault().transport()

        .addProperty("java.net.preferIPv4Stack", "true").build();

        EmbeddedCacheManager manager = new DefaultCacheManager(configuration);

        manager.defineConfiguration(

        "waiting-cache",

        new ConfigurationBuilder().clustering().cacheMode(CacheMode.REPL_SYNC).expiration().lifespan(waitingQueueTimeout, TimeUnit.SECONDS)

        .eviction().strategy(EvictionStrategy.LIRS).maxEntries(defaultMaxEntries).loaders().shared(false).passivation(false)

        .preload(true).addFileCacheStore().location(evictionDirectory).async().enable().threadPoolSize(noWriteThreads).build());

        waitingMap = manager.getCache("waiting-cache");

       

      While the expiration and eviction work for this example, the replication fails. Both servers are identical copies to this one. I am using jetty with infinispan-core 5.3.0.Final. Do I need more configuration about the transport/ other dependencies added?

       

      Thank you, Alex.

        • 1. Re: Infinispan 5.3.0.Final default replication cluster configuration problem.
          alex_ro_bv

          Found the problem, it looks like the replication is managed only after the second server started on.

           

          If I start server A, put something in the cache, start server B, in B is not available.

           

          If I start server A and server B, put something in server A, it is present in server B.

           

          Unfortunately, I would need also the first scenario to work. Will keep searching.

          • 2. Re: Re: Infinispan 5.3.0.Final default replication cluster configuration problem.
            pruivo

            Alex Ardelean wrote:

             

            Found the problem, it looks like the replication is managed only after the second server started on.

             

            If I start server A, put something in the cache, start server B, in B is not available.

             

            If I start server A and server B, put something in server A, it is present in server B.

             

            Unfortunately, I would need also the first scenario to work. Will keep searching.

            By your description, it looks like the state transfer is not enabled (however, it should be enabled by default). Enable it in the configuration:

             

            clustering().stateTransfer().fetchInMemoryState(true)
            

             

            and give it a try.

             

            cheers,

            Pedro