Question

I'm trying to use session replication using tomcat 7 and Apache server 2.2 in a spring security(version 3.1) app. I already set <distributable /> tag in web.xml and enabled session replication in server.xml for all nodes.
My apache configuration:

<Proxy balancer://myapp>
    BalancerMember ajp://127.0.0.1:8009 loadfactor=50 retry=10
    BalancerMember ajp://127.0.0.1:8010 loadfactor=50 retry=10
</Proxy>
ProxyPass / balancer://myapp/ nofailover=Off

I have two nodes tomcatA and tomcatB, when both are running, the session is replicate correctly, but after tomcatB is restarted the session is not replicated on tomcatB and user needs to login again.
Load balancing is working, I'm being redirect correctly to the second server, but the session is not replicated.
Any ideas why this is happening?

Was it helpful?

Solution

The issue was that a third tomcat was running on another machine and session was replicate from that tomcat. After I shutdown that tomcat the session was correctly replicated.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top