JBOSS EAP 6.2 Session Lock Issue
eopsscb Jun 16, 2017 6:48 AMHi Team,
Can anyone help me in fixing the below issue. This occurs frequently in production with clustered mode. The users are facing very slow response with clustered mode and the performance is faster while running one node alone. The request taking more than 30 seconds and timed out to user with clustered mode and with single node it is responding < 5 seconds. I suspect that the issue is on cluster communication. Many portal suggested to enable sticky session, but application will not proven for sticky, we want the load to be balanced equally with round robin mode with proper session replication. We have enabled DB persistence for storing web sessions with no luck.
Configuration as below.
Mod cluster config
<mod-cluster-config advertise-socket="modcluster" proxy-list="x.x.x.x:6666" balancer="mybalancer" advertise="false" auto-enable-contexts="true" sticky-session="false" connector="ajp">
TCP Config
<stack name="tcpping">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<protocol type="TCPPING">
<property name="initial_hosts">
IP1[7700],IP2[7700],IP1[8100],IP2[8100]
</property>
</protocol>
DB strore config
<cache-container name="web" aliases="standard-session-cache" default-cache="database" module="org.jboss.as.clustering.web.infinispan">
<transport lock-timeout="60000"/>
<invalidation-cache name="database" mode="ASYNC" batching="true">
<mixed-keyed-jdbc-store datasource="java:/jdbc/EOPSSEC" preload="true" passivation="false" purge="false">
<property name="databaseType">
oracle
</property>
<string-keyed-table prefix="JBS">
<id-column name="id" type="VARCHAR2(200)"/>
<data-column name="datum" type="BLOB"/>
<timestamp-column name="version" type="NUMBER"/>
</string-keyed-table>
<binary-keyed-table prefix="JBB">
<id-column name="id" type="VARCHAR2(200)"/>
<data-column name="datum" type="BLOB"/>
<timestamp-column name="version" type="NUMBER"/>
</binary-keyed-table>
</mixed-keyed-jdbc-store>
</invalidation-cache>
</cache-container>
11:40:13,747 ERROR [org.apache.catalina.connector] (ajp-executor-threads - 23790) JBWEB001018: An exception or error occurred in the container during the request processing: java.lang.RuntimeException: JBAS018060: Exception acquiring ownership of QKkU0Dg0b2CCb1Q8CVYKgkxK
at org.jboss.as.web.session.ClusteredSession.access(ClusteredSession.java:494) [jboss-as-web-7.3.4.Final-redhat-1.jar:7.3.4.Final-redhat-1]
at org.apache.catalina.connector.Request.doGetSession(Request.java:2616) [jbossweb-7.3.2.Final-redhat-1.jar:7.3.2.Final-redhat-1]
at org.apache.catalina.connector.Request.getSession(Request.java:2361) [jbossweb-7.3.2.Final-redhat-1.jar:7.3.2.Final-redhat-1]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:99) [jboss-as-web-7.3.4.Final-redhat-1.jar:7.3.4.Final-redhat-1]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.3.2.Final-redhat-1.jar:7.3.2.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.3.2.Final-redhat-1.jar:7.3.2.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.3.2.Final-redhat-1.jar:7.3.2.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.3.2.Final-redhat-1.jar:7.3.2.Final-redhat-1]
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:490) [jbossweb-7.3.2.Final-redhat-1.jar:7.3.2.Final-redhat-1]
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:420) [jbossweb-7.3.2.Final-redhat-1.jar:7.3.2.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:511) [jbossweb-7.3.2.Final-redhat-1.jar:7.3.2.Final-redhat-1]
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:808)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:828)
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_67]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.jboss.as.clustering.lock.TimeoutException: JBAS010213: Cannot acquire lock default-host/eopshub/QKkU0Dg0b2CCb1Q8CVYKgkxK from cluster
at org.jboss.as.clustering.lock.SharedLocalYieldingClusterLockManager.lock(SharedLocalYieldingClusterLockManager.java:439)
at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.acquireSessionOwnership(DistributedCacheManager.java:400)
at org.jboss.as.web.session.ClusteredSession.acquireSessionOwnership(ClusteredSession.java:520) [jboss-as-web-7.3.4.Final-redhat-1.jar:7.3.4.Final-redhat-1]
at org.jboss.as.web.session.ClusteredSession.access(ClusteredSession.java:492) [jboss-as-web-7.3.4.Final-redhat-1.jar:7.3.4.Final-redhat-1]
... 16 more