3 Replies Latest reply on May 7, 2010 11:28 AM by Franck Garcia

    lucene-demo issue

    Franck Garcia Newbie

      I'm new to Infinispan/JGroups (but not to JBoss AS, seam,hibernate etc..). The idea of having a Lucene Directory distributed on Infinispan seems very promising and I wanted to give it a try.

      I tried to setup 2 linux boxes to run the demo (I'm using 4.1.0.ALPHA 2). For some reason the ipv4 does not work for my environment so I change a bit the code and recompile to use ipv6 and flush-udp.xml jgroups config file.

      With this config I can see the cluster members (option 1 List cluster members], but as soon as I try to insert a new text [option 3 insert new text] and after a while, I have the following exception:

       

      org.infinispan.util.concurrent.TimeoutException: Replication timeout for MTLLinux01-42302
          at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:421)
          at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:100)
          at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:124)
          at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:229)
          at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:216)
          at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:212)
          at org.infinispan.interceptors.DistributionInterceptor.handleWriteCommand(DistributionInterceptor.java:304)
          at org.infinispan.interceptors.DistributionInterceptor.visitPutKeyValueCommand(DistributionInterceptor.java:162)
          at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.LockingInterceptor.visitPutKeyValueCommand(LockingInterceptor.java:198)
          at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:132)
          at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:57)
          at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.TxInterceptor.enlistWriteAndInvokeNext(TxInterceptor.java:183)
          at org.infinispan.interceptors.TxInterceptor.visitPutKeyValueCommand(TxInterceptor.java:132)
          at org.infinispan.interceptors.DistTxInterceptor.visitPutKeyValueCommand(DistTxInterceptor.java:76)
          at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:48)
          at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:34)
          at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:57)
          at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
          at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:118)
          at org.infinispan.interceptors.BatchingInterceptor.handleDefault(BatchingInterceptor.java:72)
          at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:57)
          at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:76)
          at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:269)
          at org.infinispan.CacheDelegate.put(CacheDelegate.java:413)
          at org.infinispan.CacheSupport.put(CacheSupport.java:30)
          at org.infinispan.lucene.InfinispanIndexIO$InfinispanIndexOutput.flush(InfinispanIndexIO.java:257)
          at org.apache.lucene.store.ChecksumIndexOutput.prepareCommit(ChecksumIndexOutput.java:80)
          at org.apache.lucene.index.SegmentInfos.write(SegmentInfos.java:344)
          at org.apache.lucene.index.SegmentInfos.prepareCommit(SegmentInfos.java:809)
          at org.apache.lucene.index.SegmentInfos.commit(SegmentInfos.java:893)
          at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1574)
          at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1527)
          at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1239)
          at org.infinispan.lucenedemo.DemoActions.addNewDocument(DemoActions.java:110)
          at org.infinispan.lucenedemo.DemoDriver.insertNewText(DemoDriver.java:71)
          at org.infinispan.lucenedemo.DemoDriver.run(DemoDriver.java:130)
          at org.infinispan.lucenedemo.DemoDriver.main(DemoDriver.java:46)

       

      Can someone provide a pointer on what could happen?

      Note that the GuiDemo runs perfectly well with the flush-udp.xml and ipv6 config......

      Thanks

        • 1. Re: lucene-demo issue
          Manik Surtani Master

          Have you tried increasing your lock acquisition timeout and sync repl timeout?

          • 2. Re: lucene-demo issue
            Franck Garcia Newbie

            I have the same problem. The config is this now:

             

            public static synchronized CacheManager getCacheManager() {
                  if (manager != null)
                     return manager;
                  GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
                  gc.setClusterName("infinispan-lucene-demo-cluster");
                  gc.setTransportClass(JGroupsTransport.class.getName());
                  gc.setTransportProperties("configurationFile=flush-udp.xml");
                  Configuration config = new Configuration();
                  config.setCacheMode(Configuration.CacheMode.DIST_SYNC);
                  config.setSyncCommitPhase(true);
                  config.setSyncReplTimeout(60000);
                  config.setLockAcquisitionTimeout(60000);
                  config.setSyncRollbackPhase(true);
                  config.setTransactionManagerLookupClass(JBossStandaloneJTAManagerLookup.class.getName());
                  config.setNumOwners(2);
                  config.setL1CacheEnabled(true);
                  config.setL1Lifespan(6000000);
                  config.setInvocationBatchingEnabled(true);
                  
                  manager = new DefaultCacheManager(gc, config, false);
                  return manager;
               }
            

            I've attached the trace log of infinispan classes from the moment I try to insert a new text in the index until I've got the timeout.........

            Thanks Manik, I appreciate

            • 3. Re: lucene-demo issue
              Franck Garcia Newbie

              I tried with 2 windows nodes in ipv4 and it's working....Infinispan is not the issue, I'm going to focus on make ipv4 works on my Linux boxes now..thx