1 2 Previous Next 22 Replies Latest reply on Jun 21, 2017 7:09 AM by adityan Go to original post
      • 15. Re: Load Balancing Cluster not working with Apache HTTP Server 2.4.6 and JBoss EAP 7
        adityan

        Thanks for your response. Is there anyway to access JBoss EAP 7 session manager? Are there any configuration properties which can be accessed and modified for that?

        I consulted with my colleagues regarding Spring security. They are not changing session ID.

        • 16. Re: Load Balancing Cluster not working with Apache HTTP Server 2.4.6 and JBoss EAP 7
          pferraro

          Are you certain?  This is default behavior in spring security (as it is with WF's own security implementation), so you would have had to explicitly disable it.

          Spring Security Reference

          • 17. Re: Load Balancing Cluster not working with Apache HTTP Server 2.4.6 and JBoss EAP 7
            adityan

            Thanks for your response, I checked with my colleagues regarding Spring Security. 

            Following way it is implemented:

            1. No Session management filter is used, session id does not change and same session is maintained throughout.
            2. We are using CAS filters for authentication. We are extending org.jasig.cas.client.util.AbstractConfigurationFilter class provided CAS library.

             

             

            I searched if there are any issues CAS with JBoss EAP 7/Wildfly for sticky session, but have not found any such issue as yet. Are you aware of any such issue?

            This issue is not present for JBoss 6.x EAP.

             

            Reference:

            https://wiki.jasig.org/display/CAS/Home

            • 18. Re: Load Balancing Cluster not working with Apache HTTP Server 2.4.6 and JBoss EAP 7
              pferraro

              Aditya Neurgaonkar wrote:

              I read about distributable sessions, I am not maintaining it in my application so I removed it from my application.

              In EAP7, unless your web application is <distributable/>, the session ID will not be encoded into the JSESSIONID cookie and the load balancer will not be able to use sticky sessions.

              I don't fully understand why you removed this configuration from your application, but that is the source of your problem.

              • 19. Re: Load Balancing Cluster not working with Apache HTTP Server 2.4.6 and JBoss EAP 7
                adityan

                Thanks for your response.

                Why I do not use <distributable/> tag in my application?

                1. My application is not distributable.

                2. I am setting up cluster for load balancing and fail over.

                   So when one of the servers in cluster shuts down, the session is invalidated and users log in again.

                3. The transactions are balanced according to the strategy set for mod_cluster and/or mod_jk load balancer.

                 

                We have used CAS Filters for authenticating users on this application.

                Again, this combination worked on JBoss 6.x EAP in cluster configuration for standalone servers using external load balancer.

                 

                This combination fails to work on same configuration for JBoss 7.0 EAP though.

                So are there any issues documented for CAS Filters/Spring Filters on JBoss EAP 7?

                 

                I will also try the change you mentioned in your current response and let you know.

                • 20. Re: Load Balancing Cluster not working with Apache HTTP Server 2.4.6 and JBoss EAP 7
                  pferraro

                  pferraro wrote:

                  In EAP7, unless your web application is <distributable/>, the session ID will not be encoded into the JSESSIONID cookie and the load balancer will not be able to use sticky sessions.

                  I just re-read this sentence, and not only does it not make sense, but it says the opposite of what I meant to say.

                   

                  EAP7 encodes the route of the owner of the session into the JSESSIONID cookie regardless of whether a web application is distributable or not.  I had assumed you had configured EAP with single-sign on (unfortunately I conflated this issue with another in a similar thread), which is where an application must be distributable for load balancing to work (since requests for different applications sharing identity might be served by different nodes).

                   

                  I'll re-read the thread from the top and response separately.

                  • 21. Re: Load Balancing Cluster not working with Apache HTTP Server 2.4.6 and JBoss EAP 7
                    pferraro

                    OK - I've reread the thread and reacquainted myself with your setup. I have a few questions:

                    1. Aditya Neurgaonkar wrote:

                      One more thing, each JBoss EAP 7.0 instance has its own WAR file deployed.

                      What do you mean by this?
                    2. Are your nodes running on different hosts?  It looks like your undertow subsystem still include welcome content.  Is your web application deployed to a specific context path?  Are these context paths the same on each node?
                    3. According to your initial description, it seems that the request immediately following login is directed to a different node (and thus bounces back to the login page).  Did you look for a JSESSIONID cookie?  Do you see the route encoded into the session id?  Have you validated the state of your nodes with the load balancer?  Are they all active (OK status)?
                    4. Can you post your web.xml?

                     

                    Lastly, you have asked a few times whether there are any known issues with CAS filters in EAP7, and I have yet to give a direct answer.

                    There are none of which I am aware.

                    • 22. Re: Load Balancing Cluster not working with Apache HTTP Server 2.4.6 and JBoss EAP 7
                      adityan

                      Thanks for your response. The answers to your corresponding questions as follows:

                      1. I have deployed same WAR using JBoss Management Console UI on both JBoss EAP 7.0 standalone servers.

                      2. Due to resource issue, now I am running all the setup on same machine, but I have given different instance-ids and port numbers to JBoss EAP 7 servers.

                          My WAR is deployed using unmanaged deployment on both standalone servers. The WAR is copied and exploded in two different folders say node1 and node2, one for each JBoss.

                          So yes context paths are different but machine is same.

                          

                           For node1:

                            <deployments>

                                  <deployment name="MyApp.war" runtime-name="MyApp.war" enabled="false">

                                       <fs-exploded path="E:\AdityaCluster\ForEAP7\Node1\MyApp.war"/>

                                   </deployment>

                            <deployments>

                           For node2:

                            <deployments>

                                  <deployment name="MyApp.war" runtime-name="MyApp.war" enabled="false">

                                       <fs-exploded path="E:\AdityaCluster\ForEAP7\Node2\MyApp.war"/>

                                   </deployment>

                            <deployments>

                       

                             My external load balancer is also on the same machine along with JBoss Servers.

                       

                       

                      3. All nodes are active and have OK status. Regarding JSessionID, I checked log file on External load balancer:  "cluster: balancer://testcluster Found value 0EHu8FP4Mc6Ycrg9621o9SpU7UduAmsiDgI4WRGB.node1 for stickysession JSESSIONID|jsessionid"   Is this what you meant?

                      4. I am not sure if I can share the web.xml on this forum. Will check with my team leader and let you know. Exactly what content of web.xml are we looking into?

                       

                      Let me know if more configuration details are required.

                      1 2 Previous Next