Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

147
Views
Authentication and session replication in tomcat cluster setup

I currently have basic tomcat cluster setup with Apache httpd server acting as load balancer(mod_proxy_balancer module)

I have also enabled sticky sessions (added addjvmRoute="server1" and addjvmRoute="server2" in respective configuration file)

I'm using UAA for Authentication in my web app.

I'm able to serve different user from both nodes of tomcat parallel but if one of the nodes goes down request are routed to the other node but those request fails with error "Access Denied: Insufficient privilages for the user"

Tomcat log entry 0:0:0:0:0:0:0:1 - - [11/Jul/2021:22:17:02 +0530] "POST /visualization/Query HTTP/1.1" 403 155
httpd log entry 10.181.113.122 - - [11/Jul/2021:22:16:32 +0530] "POST /visualization/Query HTTP/2.0" 403 144

And I don't see any other entries in log

Cluster configuration in server.xml

      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster">
        <Manager className="org.apache.catalina.ha.session.BackupManager"
                            expireSessionsOnShutdown="false"
                            notifyListenersOnReplication="true"/>
        
        <Channel className="org.apache.catalina.tribes.group.GroupChannel">
            <Membership className="org.apache.catalina.tribes.membership.McastService"
                        address="228.0.0.4"
                        port="45564"
                        frequency="500"
                        dropTime="3000"/>

            <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
                <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
            </Sender>
            
            <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                        address="auto"
                        port="4000"
                        autoBind="100"
                        selectorTimeout="5000"
                        maxThreads="6"/>
                    
            <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
        
            <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor"/>
        
        </Channel>
        
        <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>
    
        <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
    
        <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
        
      </Cluster>
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!