Liferay ehcache聚类

时间:2014-09-22 12:19:11

标签: jboss liferay cluster-computing liferay-6 ehcache

我试图为两个JBoss 7.2上运行的lifery 6.2设置群集。我的两个应用程序服务器都使用相同的配置,但行为不一样。一个正在启动并正常运行,另一个在启动期间崩溃。它与群集设置有关。

cluster.link.enabled=true
cluster.link.autodetect.address=10.170.121.184:1531
# second points to db server

如前所述,两台服务器都使用此设置。删除这些行后,第二台服务器也会启动。但这会阻止我使用群集环境。我在我的日志文件中做了一些研究,发现了几个例外(在服务器启动时的liferay部署期间)。

这是来自liferays日志文件。不太令人兴奋,因为它并没有真正提供有价值的信息。

12:11:53,259 INFO  [ServerService Thread Pool -- 127][LiferayCacheManagerPeerProviderFactory:76] portalPropertyKey ehcache.multi.vm.config.location.peerProviderProperties has value file=/usr/jboss/liferay-6.1/cluster-config-unicast.xml
12:18:12,793 ERROR [ServerService Thread Pool -- 127][PortalContextLoaderListener:132] java.lang.NullPointerException
java.lang.NullPointerException
    at com.liferay.portal.kernel.servlet.DirectServletRegistryUtil.clearServlets(DirectServletRegistryUtil.java:27)
    at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:129)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3427)
    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3920)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3839)
    at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156)
    at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60)
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    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)
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)
12:18:12,795 ERROR [ServerService Thread Pool -- 127][PortalContextLoaderListener:139] java.lang.NullPointerException
java.lang.NullPointerException
    at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.reset(HotDeployUtil.java:53)
    at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:136)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3427)
    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3920)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3839)
    at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156)
    at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60)
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    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)
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)

但这是有趣的地方。此日志文件摘录在启动期间(同一时间)来自jboss日志。

12:11:46,822 INFO  [org.jboss.web] (ServerService Thread Pool -- 127) JBAS018210: Register web context: 
12:11:47,832 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] (ServerService Thread Pool -- 127) Initializing Spring root WebApplicationContext
12:18:12,760 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] (ServerService Thread Pool -- 127) JBWEB000287: Exception sending context initialized event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.kernel.cache.MultiVMPool' defined in class path resource [META-INF/util-spring.xml]: Cannot resolve reference to bean 'com.liferay.portal.kernel.cache.MultiVMPortalCacheManager' while setting bean property 'portalCacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.kernel.cache.MultiVMPortalCacheManager' defined in class path resource [META-INF/util-spring.xml]: Cannot create inner bean 'com.liferay.portal.cache.ehcache.EhcachePortalCacheManager#26eb6935' of type [com.liferay.portal.cache.ehcache.EhcachePortalCacheManager] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.cache.ehcache.EhcachePortalCacheManager#26eb6935' defined in class path resource [META-INF/util-spring.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //15.131.81.31:53440/com.liferay.portal.kernel.dao.orm.EntityCache.com.liferay.portal.model.impl.ResourcePermissionImpl. Initial cause was Connection refused to host: 15.131.81.31; nested exception is: 
    java.net.ConnectException: Connection timed out
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) [spring-context.jar:3.0.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) [spring-context.jar:3.0.7.RELEASE]
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282) [spring-web.jar:3.0.7.RELEASE]
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204) [spring-web.jar:3.0.7.RELEASE]
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web.jar:3.0.7.RELEASE]
    at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:233) [portal-impl.jar:]
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
    at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
    at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_29]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_29]
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29]
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.kernel.cache.MultiVMPortalCacheManager' defined in class path resource [META-INF/util-spring.xml]: Cannot create inner bean 'com.liferay.portal.cache.ehcache.EhcachePortalCacheManager#26eb6935' of type [com.liferay.portal.cache.ehcache.EhcachePortalCacheManager] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.cache.ehcache.EhcachePortalCacheManager#26eb6935' defined in class path resource [META-INF/util-spring.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //15.131.81.31:53440/com.liferay.portal.kernel.dao.orm.EntityCache.com.liferay.portal.model.impl.ResourcePermissionImpl. Initial cause was Connection refused to host: 15.131.81.31; nested exception is: 
    java.net.ConnectException: Connection timed out
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:441) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:982) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:878) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:484) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) [spring-beans.jar:3.0.7.RELEASE]
    ... 28 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.cache.ehcache.EhcachePortalCacheManager#26eb6935' defined in class path resource [META-INF/util-spring.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //15.131.81.31:53440/com.liferay.portal.kernel.dao.orm.EntityCache.com.liferay.portal.model.impl.ResourcePermissionImpl. Initial cause was Connection refused to host: 15.131.81.31; nested exception is: 
    java.net.ConnectException: Connection timed out
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1422) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270) [spring-beans.jar:3.0.7.RELEASE]
    ... 40 more
Caused by: net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //15.131.81.31:53440/com.liferay.portal.kernel.dao.orm.EntityCache.com.liferay.portal.model.impl.ResourcePermissionImpl. Initial cause was Connection refused to host: 15.131.81.31; nested exception is: 
    java.net.ConnectException: Connection timed out
    at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:538) [ehcache.jar:]
    at net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.java:159) [ehcache.jar:]
    at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1408) [ehcache.jar:]
    at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:798) [ehcache.jar:]
    at net.sf.ehcache.CacheManager.doInit(CacheManager.java:485) [ehcache.jar:]
    at net.sf.ehcache.CacheManager.init(CacheManager.java:392) [ehcache.jar:]
    at net.sf.ehcache.CacheManager.<init>(CacheManager.java:266) [ehcache.jar:]
    at com.liferay.portal.cache.ehcache.CacheManagerUtil.createCacheManager(CacheManagerUtil.java:38) [portal-impl.jar:]
    at com.liferay.portal.cache.ehcache.EhcachePortalCacheManager.afterPropertiesSet(EhcachePortalCacheManager.java:77) [portal-impl.jar:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_29]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_29]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_29]
    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_29]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1546) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1487) [spring-beans.jar:3.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419) [spring-beans.jar:3.0.7.RELEASE]
    ... 43 more
Caused by: java.rmi.ConnectException: Connection refused to host: 15.131.81.31; nested exception is: 
    java.net.ConnectException: Connection timed out
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601) [rt.jar:1.6.0_29]
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198) [rt.jar:1.6.0_29]
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184) [rt.jar:1.6.0_29]
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322) [rt.jar:1.6.0_29]
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source) [rt.jar:1.6.0_29]
    at java.rmi.Naming.rebind(Naming.java:160) [rt.jar:1.6.0_29]
    at net.sf.ehcache.distribution.RMICacheManagerPeerListener.bind(RMICacheManagerPeerListener.java:234) [ehcache.jar:]
    at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:536) [ehcache.jar:]
    ... 58 more
Caused by: java.net.ConnectException: Connection timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method) [rt.jar:1.6.0_29]
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) [rt.jar:1.6.0_29]
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) [rt.jar:1.6.0_29]
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) [rt.jar:1.6.0_29]
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) [rt.jar:1.6.0_29]
    at java.net.Socket.connect(Socket.java:529) [rt.jar:1.6.0_29]
    at java.net.Socket.connect(Socket.java:478) [rt.jar:1.6.0_29]
    at java.net.Socket.<init>(Socket.java:375) [rt.jar:1.6.0_29]
    at java.net.Socket.<init>(Socket.java:189) [rt.jar:1.6.0_29]
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22) [rt.jar:1.6.0_29]
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128) [rt.jar:1.6.0_29]
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595) [rt.jar:1.6.0_29]
    ... 65 more

12:18:12,774 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 127) JBWEB001103: Error detected during context  start, will stop it
12:18:12,796 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] (ServerService Thread Pool -- 127) Closing Spring root WebApplicationContext
12:18:12,816 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 127) MSC00001: Failed to start service jboss.web.deployment.default-host./: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_29]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_29]
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29]
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
    at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161)
    at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60)
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93)
    ... 7 more

12:18:13,062 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Deployed "liferay-marketplace-portlet.war" (runtime-name : "marketplace-portlet.war")
12:18:13,063 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Deployed "liferay-portal-6.2-ee-sp7-20140807114015311.war" (runtime-name : "liferay-portal-6.2-ee-sp7-20140807114015311.war")
12:18:13,066 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.web.deployment.default-host./: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context

12:18:13,070 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.2.0.Final "Janus" started (with errors) in 405064ms - Started 1695 of 1814 services (2 services failed or missing dependencies, 115 services are passive or on-demand)

这两行(来自jboss摘录)对我来说是可疑的。

Caused by: net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //15.131.81.31:53440/com.liferay.portal.kernel.dao.orm.EntityCache.com.liferay.portal.model.impl.ResourcePermissionImpl. Initial cause was Connection refused to host: 15.131.81.31; nested exception is: 
    ...
Caused by: java.rmi.ConnectException: Connection refused to host: 15.131.81.31; nested exception is: 

我不知道为什么这个liferay试图打开与此IP的连接,我不知道这个地址的配置位置(我自己从未这样做过),我不知道这个地址属于哪个系统(不是来自我的网络的IP),我不知道为什么我的其他服务器(具有相同的配置)没有遇到这样的问题。也许这个地址是某种默认或后备?

当我首先或完全单独启动麻烦的服务器时,此行为不会更改。这个问题总会遇到问题。

我确实在portal-ext.properties中引用了一些额外的ehcache设置来使用单播而不是多播,但是这两个服务器的配置也是相同的,所以最初的原因必须在其他地方。但也许我可以使用这些额外的ehcache设置来调整此IP?

我按照其中一个liferays博客条目来设置我的环境。截至目前,我的ehcache设置与本文中提到的相同(因为我的第二台服务器没有启动,我无法检查是否需要进行一些更改)。 https://www.liferay.com/de/web/fimez/blog/-/blogs/configuring-a-liferay-cluster-and-make-it-use-unicast-

有没有人对设置liferay 6.2群集有所了解,或者对ehcache / jgroups设置有一些了解可能会有帮助?我真的很感激。

2 个答案:

答案 0 :(得分:1)

我处于一个非常相似的场景,使用Liferay 6.2在两个JBoss 6.3上运行,和你一样“我的两个应用程序服务器使用相同的配置,但行为不一样。一个启动并运行良好,另一个在启动时崩溃了。“

在测试了很多配置后,这个配置对我来说,我从服务器中删除了这一行,遇到了给定的问题:

renderMenuOn: h
  h div
    class: 'zdDialogMenu';
    with: [ 
       h span
          onClick: (h jQuery ajax
                        script: [ :s | 
                                 self dialog addTurn.
                                 s << ((s jQuery class: 'zdTurns') append: [:r | self renderEmptyTurnOn: r ]) ]);
          with: 'Add Turn' ]

将线路保留在正常启动的服务器中。

令人惊讶的是群集配置非常有效。

PD。抱歉我的英语不好。

答案 1 :(得分:0)

以下一定是问题.....

  

引起:java.rmi.ConnectException:连接拒绝主机:15.131.81.31;嵌套异常是:       java.net.ConnectException:连接超时

这可能是因为防火墙配置。或者由于其他网络相关的原因...或者预期的服务, - RMI serice没有运行在15.131.81.31

一旦整理好了......我希望你能摆脱这个问题......