我有一个在 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 应用程序工作?
谢谢
凯利