6 Replies Latest reply on Oct 31, 2012 1:13 PM by bsl.lacerda

    Problem with mod_cluster request processing

    bsl.lacerda

      Hi all!

      I have a problem in relation to the operation of mod_cluster.
      It seems that the flow of processing the request is being divided between the two JBoss instances on the cluster.
      When this happens, the UserPrincipal is null.

      The two JBoss instances have the same JBoss application deployed.
      If someone is willing to help me I can spend more information about the current configuration of the cluster in question.

       

      Thanks in advance!

        • 1. Re: Problem with mod_cluster request processing
          jfclere

          It seems you need to tell httpd you need sticky sessions.

          • 2. Re: Problem with mod_cluster request processing
            bsl.lacerda

            Whould you help me with this issue?

             

            With stiky session the user request is always pointed to the same node. Right?

            If this node fail, the session is replicated to other node?

             

            I have 4 applications that works togetter, app1, app2, app3 and app4. Shall I have to define one ProxyPass and ProxyPassReverse for each app?

            What is the correct to put on balancer directive on pProxyPass and ProxyReverse?

             

            This is my httpd mod_cluster configuration:

             

            <IfModule mpm_worker_module>

                ThreadLimit         120

                StartServers        8

                MinSpareThreads     5

                MaxSpareThreads     20

                MaxClients          1200

                ThreadsPerChild     120

                MaxRequestsPerChild 0

            </IfModule>

             

            LoadModule slotmem_module modules/mod_slotmem.so

            LoadModule manager_module modules/mod_manager.so

            LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

            LoadModule advertise_module modules/mod_advertise.so

             

            Listen 10.10.10.10:6666

            <VirtualHost 10.10.10.10:6666>

             

                <Directory />

                    Options FollowSymLinks

                    AllowOverride None

                    Order deny,allow

                    Deny from  all

                    Allow from server1

                    Allow from server2

                </Directory>

             

                #KeepAliveTimeout 60

                MaxKeepAliveRequests 0

             

                ManagerBalancerName my_cluster

             

                ServerAdvertise off

                #AdvertiseFrequency 5

                EnableMCPMReceive

                ProxyPass / balancer://10.10.10.10/ stickysession=JSESSIONID|jsessionid nofailover=On

                ProxyPassReverse / balancer://10.10.10.10/

             

            </VirtualHost>

            <Location /mod_cluster-manager>

                SetHandler mod_cluster-manager

                Order deny,allow

                Deny from all

                Allow from all

            </Location>

             

            Thanks for the Reply!

            • 3. Re: Problem with mod_cluster request processing
              jfclere

              first remove the:

              +++

                  ProxyPass / balancer://10.10.10.10/ stickysession=JSESSIONID|jsessionid nofailover=On

                  ProxyPassReverse / balancer://10.10.10.10/

              +++

              that make no sense here

               

              The session stickyness should be configured in the back end side. (See http://docs.jboss.org/mod_cluster/1.2.0/html/java.AS7config.html).

              • 4. Re: Problem with mod_cluster request processing
                bsl.lacerda

                I'm sorry if I did not mention but I am using JBoss AS 6 actually EAP5.

                Where the session stickyness should be set in this case?

                • 5. Re: Problem with mod_cluster request processing
                  rhusar

                  Bruno Lacerda wrote:

                   

                  I'm sorry if I did not mention but I am using JBoss AS 6 actually EAP5.

                  Where the session stickyness should be set in this case?

                  In EAP5 see http://docs.jboss.org/mod_cluster/1.1.0/html_single/#proxy

                   

                  So you add stickySession="true" which is true by default.

                  • 6. Re: Problem with mod_cluster request processing
                    bsl.lacerda

                    Thanks for the reply!

                    I will read the Documenation.