[help!] Big difficulties in stopping the cache properly when two Jboss infinispan cache is joined
tedckt Aug 16, 2012 6:39 AMHi,
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