Hello,
I am running Tomcat 10.1.20 with Java 17
But our session data is being lost.
Here is snippet of the clustering I have defined..........
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="6">
<Manager className="org.apache.catalina.ha.session.DeltaManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"
maxActiveSessions="4096"
sessionAttributeNameFilter="uploader_redirect|phone_tree|soundhound.campaigndata|format|employee_id|customer|customer_id|nonidentifier_call_letters|call_letters|caller_id_enabled|ivr_system|ivr_system_id|zip_code|time_zone|is_trial_customer|delete_confirmation|download_settings|clustered_admin|wall_token|employee_first_name|logged_in_user|logged_in"
/>
<Channel className="org.apache.catalina.tribes.group.GroupChannel">
<Membership
className="org.apache.catalina.tribes.membership.McastService"
address="228.0.0.4"
port="45565"
frequency="500"
dropTime="3000"/>
<Receiver
className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="auto"
port="4001"
selectorTimeout="100"
maxThreads="6"/>
<Sender
className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
<Transport
className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
</Sender>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor"/>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
filter=".*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt|.*\.jsp"/>
<ClusterListener
className="org.apache.catalina.ha.session.ClusterSessionListener"/>
</Cluster>
Notice in sessionAttributeNameFilter that one of the session attributes I want
replicated is -> logged_in_user
We have to include the session data we want replicated here Correct?
logged_in_user is one we want replicated, its value is a String
When I run my app this code runs ->
public class Utils {
public static String getUserName( HttpServletRequest request )
{
return (String)
request.getSession().getAttribute("logged_in_user");
}
}
That code returns a null value, indicating that the session value is not found.
Does anyone see something wrong with how I defined the clustering?
This below comes from the Catalina.out log and indicates there is an issue with
clustering.......
SEVERE: Manager [##0001]: No session state sent at [4/16/24, 12:48 PM]
received, timing out after [60,074] ms.
Apr 16, 2024 12:49:54 PM org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions
WARNING: Manager [##0001]: Drop message [SESSION-GET-ALL] inside
GET_ALL_SESSIONS sync phase start date [4/16/24, 12:48 PM] message date
[4/16/24, 12:48 PM]
Our live environment has two app server machines being fed by one loadbalancer.
In our dev environment, that has just one machine, this same session data can
be extracted.
But not on the live 2 machine environment
Rick Noel
Systems Programmer | Westwood One
[email protected]