4 Replies Latest reply on Oct 4, 2002 5:43 PM by elementoh

    HTTP Session Clustering

    sunnykhosa

      Hi,

      I am using the latest JBoss 3.0 build from Sourceforge for clustering. I have two JBoss servers setup on my network. When i start the servers, they do recognize each others existance on the network through JBoss clustering. But i am having issues with HttpSession clustering. I have done following for my app.
      1. I am using an Apache mod_jk load balancer in front of each Jboss instance.
      2. I have made my web app distributable in web.xml file.
      3. I have set in the the following enteries in jboss-service.xml file:
      request
      both.

      My understanding is that if one of my servers goes down, the client should be automatically redirected to the second server within same sessiocontext. But when i bring down one of my servers, it is not happening. I may mention that both of these JBoss instances have their own Apache web servers with following declarations for mod_jk in their individual httpd.conf files:

      ProxyRequests On
      ProxyPass /jboss http://10.1.1.62:8080/jboss
      ProxyPassReverse /jboss http://10.1.1.62:8080/jboss
      ProxyPass /jboss http://10.1.1.60:8080/jboss
      ProxyPassReverse /jboss http://10.1.1.60:8080/jboss

      Am I missing something in the whole set up to enable http session clustering? Any help will be appreciated.

      Thanks
      Sumeer.

        • 1. Re: HTTP Session Clustering
          joao.clemente

          Well, I'm not sure, but..
          Did apache notisted that JBoss went down?
          If not, you have a config problem in Apache and not JBoss..

          • 2. Re: HTTP Session Clustering
            sunnykhosa

            Apache gives me following message if i take down one of the severs.

            Proxy Error
            The proxy server received an invalid response from an upstream server.
            The proxy server could not handle the request GET /jboss/servlet/submit.

            Reason: Could not connect to remote machine: Unknown error

            But it does not redirect me to the other server listed in the httpd.conf file under mod_jk directive. Any clues what i might be doing wrong? I ahve put in the enteries in the httpd.conf on Apache for both of the servers.

            Thanks
            Sumeer.

            • 3. Re: HTTP Session Clustering
              deathstar

              I guess you should be putting the directives under mod_proxy not mod_jk.

              • 4. Re: HTTP Session Clustering

                I was able to do it in a different way.... i used the following configuration int the http.conf

                JkWorkersFile conf/workers.properties
                JkLogFile logs/jk.log
                JkLogLevel error
                JkMount /*.jsp loadbalancer
                JkMount /servlet/* loadbalancer
                JkMount /examples/* loadbalancer

                and doing the configuration of the loadbalancing in the workes.properties....