2 Replies Latest reply on Mar 13, 2013 11:32 AM by tomas11

    [help!] Big difficulties in stopping the cache properly when two Jboss infinispan cache is joined

    NB C Newbie

      Hi,

       

      I am facing big difficulties in stopping the cache properly.

      Below error message keep printing when one cluster node is shutdown with the following api being called:

       



      cache.stop();


      cacheManager.removeCache(CACHENAME);


      cacheManager.stop();

       

      Is the above API correct to shutdown the standby server and keep the primary server running?

      Thanks a lot!

       

      Definition:

      public static EmbeddedCacheManager cacheManager

      private static Cache<String, Vector<String>> cache

       

      More information:

      jboss-5.1.0.GA and infinispan-5.1.5.FINAL are used.

       

      Below logs are just continuously printing out in the remaining alive server:

      2012-08-16 18:28:39,498 INFO  [STDOUT] (CacheViewInstaller-1,qapvmmhstrctl01-35942) 18:28:39,497 ERROR [CacheViewsManagerImpl] ISPN000172: Failed to prepare view CacheView{viewId=6, members=[machine01-35942]} for cache  SessionControl, rolling back to view CacheView{viewId=3, members=[machine01-35942]}

      java.util.concurrent.ExecutionException: java.lang.IllegalStateException: ControlCache: Received cache view prepare request after the local node has already shut down

              at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)

              at java.util.concurrent.FutureTask.get(FutureTask.java:91)

              at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterPrepareView(CacheViewsManagerImpl.java:321)

              at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterInstallView(CacheViewsManagerImpl.java:249)

              at org.infinispan.cacheviews.CacheViewsManagerImpl$ViewInstallationTask.call(CacheViewsManagerImpl.java:875)

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

              at java.lang.Thread.run(Thread.java:662)

      Caused by: java.lang.IllegalStateException: ControlCache: Received cache view prepare request after the local node has already shut down

              at org.infinispan.cacheviews.CacheViewsManagerImpl.handlePrepareView(CacheViewsManagerImpl.java:487)

              at org.infinispan.cacheviews.CacheViewsManagerImpl$3.call(CacheViewsManagerImpl.java:312)

              ... 5 more

      2012-08-16 18:28:44,113 INFO  [STDOUT] (Incoming-1,machine01-35942) 18:28:44,113 INFO  [JGroupsTransport] ISPN000094: Received new cluster view: [machine01-35942|3] [machine01-35942, qapvmmhstrctl02-62558]

      2012-08-16 18:28:44,113 INFO  [STDOUT] (Incoming-1,machine01-35942) 18:28:44,113 INFO  [CacheClusterCacheListener] Event = VIEW_CHANGED

      2012-08-16 18:28:44,341 INFO  [STDOUT] (CacheViewInstaller-1,machine01-35942) 18:28:44,340 ERROR [CacheViewsManagerImpl] ISPN000172: Failed to prepare view CacheView{viewId=8, members=[machine01-35942, qapvmmhstrctl02-62558]} for cache  ControlCache, rolling back to view CacheView{viewId=7, members=[machine01-35942]}

      java.util.concurrent.ExecutionException: java.lang.IllegalStateException: ControlCache: Received cache view prepare request after the local node has already shut down

              at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)

              at java.util.concurrent.FutureTask.get(FutureTask.java:91)

              at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterPrepareView(CacheViewsManagerImpl.java:321)

              at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterInstallView(CacheViewsManagerImpl.java:249)

              at org.infinispan.cacheviews.CacheViewsManagerImpl$ViewInstallationTask.call(CacheViewsManagerImpl.java:875)

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

              at java.lang.Thread.run(Thread.java:662)

      Caused by: java.lang.IllegalStateException: ControlCache: Received cache view prepare request after the local node has already shut down

              at org.infinispan.cacheviews.CacheViewsManagerImpl.handlePrepareView(CacheViewsManagerImpl.java:487)

              at org.infinispan.cacheviews.CacheViewsManagerImpl$3.call(CacheViewsManagerImpl.java:312)

              ... 5 more

       

      NB

        • 1. Re: [help!] Big difficulties in stopping the cache properly when two Jboss infinispan cache is joined
          Galder Zamarreño Master

          It's not an error message, it's an INFO message

           

          It might need to be less noisy though...

          • 2. Re: [help!] Big difficulties in stopping the cache properly when two Jboss infinispan cache is joined
            tomas11 Novice

            with infinispan-5.1.6.FINAL I get very similar one but now it is really an ERROR

             

            ERROR [CacheViewInstaller-3,7cdbf321-40a4-4246-8e9b-edcac6087037-4803] (CacheViewsManagerImpl.java:264) - ISPN000172: Failed to prepare view CacheView{viewId=4, members=[7cdbf321-40a4-4246-8e9b-edcac6087037-4803, 7cdbf321-40a4-4246-8e9b-edcac6087035-64632]} for cache  services, rolling back to view CacheView{viewId=3, members=[7cdbf321-40a4-4246-8e9b-edcac6087037-4803, 7cdbf321-40a4-4246-8e9b-edcac6087035-64632, 7cdbf321-40a4-4246-8e9b-edcac6087036-6658]}

            java.util.concurrent.ExecutionException: java.lang.IllegalStateException: cache: Received cache view prepare request after the local node has already shut down

                at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:262)

                at java.util.concurrent.FutureTask.get(FutureTask.java:119)

                at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterPrepareView(CacheViewsManagerImpl.java:322)

                at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterInstallView(CacheViewsManagerImpl.java:250)

                at org.infinispan.cacheviews.CacheViewsManagerImpl$ViewInstallationTask.call(CacheViewsManagerImpl.java:876)

                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

                at java.util.concurrent.FutureTask.run(FutureTask.java:166)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                at java.lang.Thread.run(Thread.java:722)

            Caused by: java.lang.IllegalStateException: services: Received cache view prepare request after the local node has already shut down

                at org.infinispan.cacheviews.CacheViewsManagerImpl.handlePrepareView(CacheViewsManagerImpl.java:488)

                at org.infinispan.cacheviews.CacheViewsManagerImpl$3.call(CacheViewsManagerImpl.java:313)

                ... 5 more

             

            Does this mean that cache was not properly removed with cacheManager.removeCache(CACHENAME)?