12 Replies Latest reply on Dec 9, 2002 12:27 PM by mschoning

    Apache + JBoss3.0.2/Jetty + load balance

    lcsorvasi

      I have installed and configurated 2 instances of JBoss3.0.2/Jetty running on the same Win2000 box.
      I configurated Apache/mod_jk to balance requests between these two servers, and when a requests reach to JBoss3.0.2/Jetty server the following message appears:

      09:17:25,404 WARN [jbossweb] WARNING: not implemented: route=ServerOne
      09:17:25,434 INFO [STDOUT] 09-12-2002 09:17| SearchSessionListener.java: Session
      n created - id = b4RH5tlYPJKVYALblMuHIg**

      And this message appears over and over, with different session id until I close the browser.

      Could somebody help me out wit this one?
      Thank You

      Lorand

        • 1. Re: Apache + JBoss3.0.2/Jetty + load balance

          The problem seems to be that you can't configure "jvmroute" in Jetty - at least as far as I could see. This is what tells Apache which AJP connection to use, see 3.2.1 on <http://www.ubeans.com/tomcat/>. So this is working fine with Tomcat, but doesn't seem to work with Jetty. :-\

          • 2. Re: Apache + JBoss3.0.2/Jetty + load balance
            lcsorvasi

            Yes, it is true. I already configurated and it is working.
            But there is a big problem with Jboss 3.0.1/Tomcat 4.0.4,
            getRealPath always returns null, even when I set
            unpackWars value to true. The unpackWars attribute value
            is not used, as I read in documentation!

            Lorand

            • 3. Re: Apache + JBoss3.0.2/Jetty + load balance

              The latest Jetty 4.1.0 RC 6 seems to handle "jvmRoute":

              + Extended Session API to pass request for jvmRoute handling

              <http://jetty.mortbay.org/jetty/versions.txt>

              • 4. Re: Apache + JBoss3.0.2/Jetty + load balance

                Guys,

                Mod_jk support is relatively new to Jetty and we are anxious that it be absolutely rock-solid.

                I'll get Greg, who is implementing it to give you a heads up.

                You should be able to get the latest Jetty, and just drop it into your jbossweb.sar (you may get some harmless warnings out of MANIFEST.MFs on startup...).

                We would be very interested to hear how it goes and whether you have any problems.

                I have been looking closely at bleeding/migrating sessions from a web-node in order to take it down, distributable sessions and other aspects of clustering the web-tier and would be happy to share my thoughts, if you were interested.


                Jules

                • 5. Re: Apache + JBoss3.0.2/Jetty + load balance
                  gregwilkins

                  Jetty now support jvmRoute or manual worker name
                  configuration (setWorkerName on the session manager),
                  with the jvmRoute name taking precidence.

                  I've been having problems making my mod_jk do cookie
                  based session affinity, but if I turn cookies off - this
                  certainly works. I'm sure that if your mod_jk is
                  behaiving with cookies, then that will also work.

                  This should have made it into 3.2.0beta else you can
                  drop a jetty 4.1.0RC6 jar (and the jmx one) into 3.0.2

                  Please tell me how you go....


                  • 6. Re: Apache + JBoss3.0.2/Jetty + load balance

                    Over the weekend Greg got cookie-based affinity going as well, and fixed a bug in the AJP13Listener. This now in Jetty CVS and will find it's way into a Jetty release over the next couple of days.

                    I have a solution for winding down sessions on one node, so it may be taken out of service without loss of user data. I am looking at implementing unsticking a session from one node and migrating and resticking it to another. Completely distributed sessions (i.e. no affinity, every change is immediately copied off-node) are already implemented and at their most mature in the 3.2beta.

                    Pleas come back with any further questions,


                    Jules

                    • 7. Re: Apache + JBoss3.0.2/Jetty + load balance

                      Over the weekend Greg got cookie-based affinity going as well, and fixed a bug in the AJP13Listener. This now in Jetty CVS and will find it's way into a Jetty release over the next couple of days.

                      I have a solution for winding down sessions on one node, so it may be taken out of service without loss of user data. I am looking at implementing unsticking a session from one node and migrating and resticking it to another. Completely distributed sessions (i.e. no affinity, every change is immediately copied off-node) are already implemented and at their most mature in the 3.2beta.

                      Pleas come back with any further questions,


                      Jules

                      • 8. Re: Apache + JBoss3.0.2/Jetty + load balance
                        lcsorvasi

                        Where do I set the WorkerName value.

                        Could you attach a jboss-service.xml that shows how to set the worker name?

                        Thank you.
                        Lorand

                        • 9. Re: Apache + JBoss3.0.2/Jetty + load balance
                          gregwilkins


                          The worker name can be set in the jbossweb service.xml
                          but I wont describe it here as it is better to use jvmRoute.

                          Note that there have been several problems detected in
                          the released version that will prevent it working.

                          Release 4.1.0 is coming out today and will propogate to
                          JBoss shortly. It has working AJP/mod_jk loadbalancing
                          that uses jvmRoute so the workerName does not need to
                          be set.

                          • 10. Re: Apache + JBoss3.0.2/Jetty + load balance
                            lcsorvasi

                            Thank you

                            Lorand

                            • 11. Re: Apache + JBoss3.0.2/Jetty + load balance
                              senthiln

                              I am using Apache->mod_jk2->Jetty->Jboss3.0.4 combination. Without session replication session stickiness works fine. If I enable session replication by setting the tag of the web.xml session stickiness disappears. But I need session stickiness with session state replication. How to make that happen? Pls advice me.

                              Thanks
                              Senthil

                              • 12. Re: Apache + JBoss3.0.2/Jetty + load balance
                                mschoning

                                What do I need to configure to use jvmroute?

                                thanks, Michael