我有一个在ejb2和struts中开发的旧应用程序,必须部署到jboss 6.1实例。如果我将应用程序部署到单个节点,它可以正常工作。但是,如果我尝试在群集环境中部署同一个应用程序,我会收到错误:
ERROR [org.apache.catalina.connector.CoyoteAdapter] (http-10.101.215.38-8443-4) An exception or error occurred in the container during the request processing: java.lang.RuntimeException: Caught TimeoutException acquiring ownership of Gb6p4nliysUprY2lXQwTrA__
at org.jboss.web.tomcat.service.session.ClusteredSession.acquireSessionOwnership(ClusteredSession.java:603) [:6.1.0.Final]
at org.jboss.web.tomcat.service.session.ClusteredSession.access(ClusteredSession.java:566) [:6.1.0.Final]
at org.apache.catalina.connector.Request.doGetSession(Request.java:2566) [:6.1.0.Final]
at org.apache.catalina.connector.Request.getSession(Request.java:2316) [:6.1.0.Final]
at org.jboss.web.tomcat.service.session.JvmRouteValve.checkJvmRoute(JvmRouteValve.java:95) [:6.1.0.Final]
at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:85) [:6.1.0.Final]
at org.jboss.web.tomcat.service.session.LockingValve.invoke(LockingValve.java:62) [:6.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.1.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.1.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159) [:6.1.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.1.0.Final]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.1.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.1.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.1.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.1.0.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.1.0.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.1.0.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.1.0.Final]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
Caused by: org.jboss.ha.framework.server.lock.TimeoutException: Cannot acquire lock //localhost/myapp/Gb6p4nliysUprY2lXQwTrA__ from cluster
at org.jboss.ha.framework.server.lock.SharedLocalYieldingClusterLockManager.lock(SharedLocalYieldingClusterLockManager.java:554) [:2.0.0.Final]
at org.jboss.web.tomcat.service.session.distributedcache.ispn.DistributedCacheManager.acquireSessionOwnership(DistributedCacheManager.java:448) [:1.0.0.Final]
at org.jboss.web.tomcat.service.session.ClusteredSession.acquireSessionOwnership(ClusteredSession.java:595) [:6.1.0.Final]
... 20 more
起初我开始认为它是一个集群配置,但是如果在同一个环境中我部署了另一个使用ejb3构建的应用程序,并且没有struts集群可以正常工作。
是否需要对jboss群集进行任何特殊配置以使ejb2应用程序正常工作?
由于
凯利
答案 0 :(得分:0)
它看起来和此线程中的问题相同。可能启用粘性会话会有所帮助。