5 Replies Latest reply on Feb 28, 2007 8:33 AM by alanmoor

    Resource Not Available during shutdown

    alanmoor

      I have a two-node cluster (Apache v2.2, JBoss 4.0.5.GA) with HTTP session replication set up per instructions in the JBoss documentation. Everything works great. Except... During the time that jboss is shutting down on one of the servers, Apache will still direct requests to it. Because my web app is no longer deployed, Tomcat sends a "Resource Not Available" error. If I wait for JBoss to quit, the session fails over to the other node, and everything is fine. Is there a way I can force Apache to stop sending requests to a Tomcat instance the instant JBoss starts shutting down?

        • 1. Re: Resource Not Available during shutdown
          alanmoor

          Anyone?

          • 2. Re: Resource Not Available during shutdown
            brian.stansberry

            Not the "instant" it shuts down.

            On Apache, in your workers.properties, for each node add the following:

            worker.nodeX.disabled=false
            worker.nodeX.stopped=false

            Also make sure you have a status worker.

            To quiesce a server (i.e. no new sessions go to it, but requests for sessions already pinned to the node still go to it) set disabled=true and save the file. Within 60 seconds Apache will pick up the change.

            To stop sending requests to a server, set stopped=true and save the file.

            There is work underway on a new mod_cluster that will provide a more robust feature set.

            I'd thought the AS shutdown hook was supposed to stop the Tomcat connector before removing the webapps, which would remove the 404 issue. Apparently not. :(

            • 3. Re: Resource Not Available during shutdown
              alanmoor

              Thank you for your response. It got me thinking, so I did a little digging. I found fail_on_status worker directive for the status worker. It should allow me to trap the 404 and 500 errors as failures, and automatically switch to another node. I'll report back results.

              Thanks again,
              Alan

              • 4. Re: Resource Not Available during shutdown
                ragini

                Hi Alan,

                Can you post the solution you found for this problem? I am also facing same problem but could not reach to any conclusion.

                It will be great if you provide the solution.

                Regards,
                Ragini

                • 5. Re: Resource Not Available during shutdown
                  alanmoor

                  Hi Ragini,
                  I am sorry, but we were not able to overcome this. So as not to waste a lot of time on it (time = money), we decided to just kill the JBoss process as opposed to allowing a graceful shutdown. This had the desired effect. There is, of course, some risk in this approach, but we deemed it justified. Normally, people should not be on the system during a scheduled outage anyway.