Jboss Datagrid服务器leveldb缓存锁 - 资源暂时不可用

时间:2016-12-05 18:34:47

标签: datagrid jboss infinispan leveldb

我在RHEL中以分布式模式运行2个Jboss Datagrid服务器实例。我使用leveldb缓存存储作为我的二级缓存。这两个实例都应使用相同的leveldb缓存存储路径,并应将键/值写入此路径。

/共享的/ usr /本地/性LevelDB。

这是我的配置

                                                                                                                                                           

(在数据目录中创建了一个软链接,以便leveldb路径指向两个服务器中的同一共享目录。)

我在第二个实例上遇到以下错误(第一个实例正在编译而没有任何问题)。我正在使用shared =" true"在配置中应该允许两个数据网格服务器访问同一个缓存存储。

2016-12-05 13:15:19,077 ERROR [org.jboss.msc.service.fail](MSC服务主题1-5)MSC000001:无法启动服务jboss.datagrid-infinispan.clustered.mycache:org服务中的.jboss.msc.service.StartException jboss.datagrid-infinispan.clustered.mycache:无法启动服务         at org.jboss.msc.service.ServiceControllerImpl $ StartTask.run(ServiceControllerImpl.java:1904)         在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)         at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)         在java.lang.Thread.run(Thread.java:745) 引起:org.infinispan.commons.CacheException:无法在PersistenceManagerImpl类型的对象上调用方法public void org.infinispan.persistence.manager.PersistenceManagerImpl.start()         在org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:172)         at org.infinispan.factories.AbstractComponentRegistry $ PrioritizedMethod.invoke(AbstractComponentRegistry.java:864)         at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:633)         在org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:622)         在org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:547)         在org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:238)         在org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:877)         在org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:637)         在org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:587)         在org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:452)         at org.infinispan.manager.impl.AbstractDelegatingEmbeddedCacheManager.getCache(AbstractDelegatingEmbeddedCacheManager.java:133)         在org.infinispan.server.infinispan.SecurityActions $ 5.run(SecurityActions.java:130)         在org.infinispan.server.infinispan.SecurityActions $ 5.run(SecurityActions.java:127)         在org.infinispan.security.Security.doPrivileged(Security.java:76)         在org.infinispan.server.infinispan.SecurityActions.doPrivileged(SecurityActions.java:63)         在org.infinispan.server.infinispan.SecurityActions.startCache(SecurityActions.java:135)         在org.jboss.as.clustering.infinispan.subsystem.CacheService.start(CacheService.java:86)         at org.jboss.msc.service.ServiceControllerImpl $ StartTask.startService(ServiceControllerImpl.java:1948)         at org.jboss.msc.service.ServiceControllerImpl $ StartTask.run(ServiceControllerImpl.java:1881)         ......还有3个 引起:org.infinispan.commons.CacheException:无法启动缓存加载器         at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:174)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)         at java.lang.reflect.Method.invoke(Method.java:498)         在org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:168)         ......还有21个 引起:org.infinispan.commons.CacheConfigurationException:无法打开数据库         在org.infinispan.persistence.leveldb.LevelDBStore.start(LevelDBStore.java:108)         at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:141)         ......还有26个 引起:org.fusesource.leveldbjni.internal.NativeDB $ DBException:IO错误:lock / shared / usr / local / leveldb / data / mycache / LOCK:资源暂时不可用         在org.fusesource.leveldbjni.internal.NativeDB.checkStatus(NativeDB.java:200)         在org.fusesource.leveldbjni.internal.NativeDB.open(NativeDB.java:218)         在org.fusesource.leveldbjni.JniDBFactory.open(JniDBFactory.java:168)         在org.infinispan.persistence.leveldb.LevelDBStore.openDatabase(LevelDBStore.java:153)         在org.infinispan.persistence.leveldb.LevelDBStore.start(LevelDBStore.java:104)         ......还有27个

1 个答案:

答案 0 :(得分:2)

无法共享LevelDB缓存存储,因为LevelDB本身并不是要共享的。我创建了一个问题,以确保在配置验证期间可以防止此类错误:https://issues.jboss.org/browse/ISPN-7286