ehcache 和 jgroups 同步缓存,tomcat启动失败
@红薯 你好,想跟你请教个问题:
ehcache 和 jgroups 同步缓存 配置后, tomcat 启动失败:
报以下日志:
15-08-06 13:30:32 [ localhost-startStop-1:1362 ] - [ INFO ] Get applicationContext is ok,context id is org.springframework.web.context.WebApplicationContext:
2015-08-06 13:30:32 [ localhost-startStop-1:1501 ] - [ INFO ] Initializing EhCache CacheManager
2015-08-06 13:30:32 [ localhost-startStop-1:2077 ] - [ ERROR ] Unable to set localhost. This prevents creation of a GUID. Cause was: JS-XA-CC-QianWEB: JS-XA-CC-QianWEB
java.net.UnknownHostException: JS-XA-CC-QianWEB: JS-XA-CC-QianWEB
at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
at net.sf.ehcache.Cache.<clinit>(Cache.java:222)
at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:305)
at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:223)
at net.sf.ehcache.CacheManager.configure(CacheManager.java:759)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:464)
at net.sf.ehcache.CacheManager.init(CacheManager.java:388)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:264)
at org.springframework.cache.ehcache.EhCacheManagerFactoryBean.afterPropertiesSet(EhCacheManagerFactoryBean.java:166)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:684)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.net.UnknownHostException: JS-XA-CC-QianWEB
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
at java.net.InetAddress.getLocalHost(InetAddress.java:1469)
... 31 more
2015-08-06 13:30:41 [ localhost-startStop-1:11039 ] - [ WARN ] localhost-20006: no physical address for cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06, dropping message
2015-08-06 13:30:46 [ localhost-startStop-1:16040 ] - [ WARN ] JOIN(localhost-20006) sent to cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06 timed out (after 5000 ms), on try 1
2015-08-06 13:30:55 [ localhost-startStop-1:24923 ] - [ WARN ] localhost-20006: no physical address for cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06, dropping message
2015-08-06 13:31:00 [ localhost-startStop-1:29923 ] - [ WARN ] JOIN(localhost-20006) sent to cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06 timed out (after 5000 ms), on try 2
2015-08-06 13:31:09 [ localhost-startStop-1:39148 ] - [ WARN ] localhost-20006: no physical address for cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06, dropping message
2015-08-06 13:31:14 [ localhost-startStop-1:44148 ] - [ WARN ] JOIN(localhost-20006) sent to cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06 timed out (after 5000 ms), on try 3
2015-08-06 13:31:24 [ localhost-startStop-1:53317 ] - [ WARN ] localhost-20006: no physical address for cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06, dropping message
2015-08-06 13:31:29 [ localhost-startStop-1:58317 ] - [ WARN ] JOIN(localhost-20006) sent to cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06 timed out (after 5000 ms), on try 4
2015-08-06 13:31:38 [ localhost-startStop-1:67476 ] - [ WARN ] localhost-20006: no physical address for cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06, dropping message
2015-08-06 13:31:43 [ localhost-startStop-1:72476 ] - [ WARN ] JOIN(localhost-20006) sent to cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06 timed out (after 5000 ms), on try 5
2015-08-06 13:31:52 [ localhost-startStop-1:81577 ] - [ WARN ] localhost-20006: no physical address for cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06, dropping message
2015-08-06 13:31:57 [ localhost-startStop-1:86578 ] - [ WARN ] JOIN(localhost-20006) sent to cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06 timed out (after 5000 ms), on try 6
2015-08-06 13:32:06 [ localhost-startStop-1:95686 ] - [ WARN ] localhost-20006: no physical address for cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06, dropping message
2015-08-06 13:32:11 [ localhost-startStop-1:100686 ] - [ WARN ] JOIN(localhost-20006) sent to cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06 timed out (after 5000 ms), on try 7
2015-08-06 13:32:20 [ localhost-startStop-1:109677 ] - [ WARN ] localhost-20006: no physical address for cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06, dropping message
2015-08-06 13:32:25 [ localhost-startStop-1:114677 ] - [ WARN ] JOIN(localhost-20006) sent to cd41cbfa-31c8-6dfa-73ee-5fd6112f4d06 timed out (after 5000 ms), on try 8
2015-08-06 13:32:34 [ localhost-startStop-1:124020 ] - [ WARN ] localhost-20006: no physica
ehcache版本: 2.8.3 Jgroups版本: 3.2.13.Final ehcache-jgroupsreplication版本:1.7
配置:
<ehcache>
<diskStore path="java.io.tmpdir" />
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"
properties="connect=TCP(bind_addr=10.34.39.104;bind_port=7800):
TCPPING(initial_hosts=10.34.39.104[7800],10.34.39.103[7800];port_range=10;timeout=3000;num_initial_members=2):
VERIFY_SUSPECT(timeout=1500):
pbcast.NAKACK(use_mcast_xmit=false;retransmit_timeout=3000):
pbcast.GMS(join_timeout=5000;print_local_addr=true)"
propertySeparator="::" />
<defaultCache maxElementsInMemory="1000" eternal="false"
timeToIdleSeconds="600" timeToLiveSeconds="600" overflowToDisk="false"
clearOnFlush="true" memoryStoreEvictionPolicy="LFU">
</defaultCache>
<cache name="qddcache" maxElementsInMemory="1000" eternal="false"
timeToIdleSeconds="100" timeToLiveSeconds="100" overflowToDisk="false">
<cacheEventListenerFactory
class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
properties="replicateAsynchronously=false, replicatePuts=true,
replicateUpdates=true, replicateUpdatesViaCopy=false, replicateRemovals=true" />
<bootstrapCacheLoaderFactory
class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" />
</cache>
</ehcache>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论