Distributed application on JBoss EAP 7.1 loses Session attributes
pthorson Oct 15, 2019 9:41 AMOur Spring MVC project is running on JBoss EAP 7.1 with remote caching to DataGrid 7.2. We have observed occasional instances of Session Attributes not being found.
Logging shows entries like:
2019-10-11 16:13:42,543 WARN [org.wildfly.clustering.web.infinispan] (default task-97) WFLYCLWEBINF0011: Session is missing cache entry for attribute
And see subsequent exceptions from Spring like:
2019-10-11 16:13:42,612 SEVERE [gov.wv.dhhr.ies.cw.administration.application.presentation.util.CWExceptionHandler] (default task-85) Exception Occured: org.springframework.web.bind.ServletRequestBindingException: Missing session attribute 'SESSION_CONTEXT_USI' of type UserSessionInfo at org.springframework.web.servlet.mvc.method.annotation.SessionAttributeMethodArgumentResolver.handleMissingValue(SessionAttributeMethodArgumentResolver.java:60) at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.handleMissingValue(AbstractNamedValueMethodArgumentResolver.java:220) at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:112) at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:124) at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:161)
We are finding it difficult to pinpoint a trace or debug that can reveal more information. As observed, the instances of this are sporadic, but can be repeated occasionally.
Session replication is configured in jboss-web.xml as follows:
<replication-config>
<replication-granularity>ATTRIBUTE</replication-granularity>
<cache-name>web.session_cache</cache-name>
</replication-config>
And cache configured as follows in standalone-ha.xml:
<cache-container name="web" default-cache="session-cache" module="org.wildfly.clustering.web.infinispan">
<transport lock-timeout="60000"/>
<local-cache name="passivation">
<locking isolation="REPEATABLE_READ"/>
<transaction mode="BATCH"/>
<file-store passivation="true" purge="false"/>
</local-cache>
<invalidation-cache name="session-cache" mode="SYNC">
<remote-store cache="default" socket-timeout="60000" remote-servers="remote-jdg-node1" passivation="false" purge="false" shared="true"/>
</invalidation-cache>
<replicated-cache name="sso" mode="SYNC"/>
<distributed-cache name="dist" mode="ASYNC" l1-lifespan="0">
<file-store/>
</distributed-cache>
</cache-container>
And socket binding like:
<outbound-socket-binding name="remote-jdg-node1">
<remote-destination host="${jdg.remoting.hothod.node1.addr:127.0.0.1}" port="${jdg.remoting.hothod.node1.port:11822}"/>
</outbound-socket-binding>
Any thoughts on what the issue might be?
Thank you.