5 Replies Latest reply on Jul 9, 2003 7:43 AM by ged

    Session Replication

    ged Newbie

      Hello.
      Now I have this problem. I try to start to computers in a cluster and to achieve fail-over and load balancing, but they behave in strange ways.

      When everything is up and running I go through my proxy to one of my computers. So far so good. I log in and try to simulate an error by killing the app server. Now, instead of continuing my session in a calm, controlled way on my second computer I get this when I click on something in the webapp:

      HTTP ERROR: 500 Internal Server Error
      RequestURI=/menu.do

      And this is what I get in the other computers JBoss window:

      09:14:53,422 WARN [jbossweb] WARNING: Exception for /menu.do
      java.lang.NullPointerException
      at org.jboss.jetty.security.JBossUserRealm$JBossUserPrincipal.isAuthenticated(JBossUserRealm.java:89)
      at org.jboss.jetty.security.JBossUserRealm$JBossUserPrincipal.isAuthenticated(JBossUserRealm.java:172)
      at org.mortbay.jetty.servlet.FormAuthenticator.authenticated(FormAuthenticator.java:148)
      at org.mortbay.http.SecurityConstraint.check(SecurityConstraint.java:401)
      at org.mortbay.http.HttpContext.checkSecurityConstraints
      ...

      The computer I'm shutting down is running on RH9 and the other Win2k. Ohh, and if I remove the tag and do the same thing, I get redirected but instead of the error I just get kicked out again.

      Do you have any ideas?
      Regards,
      Daniel

        • 1. Re: Session Replication
          Sacha Labourey Master

          which version of jboss? try a 3.0.8 and if you still have the problem, make sure you do have session replication really working. It seems the credentials are simply not replicated between nodes.

          Cheers,


          sacha

          • 2. Re: Session Replication
            ged Newbie

            Hello.
            I'm using version 3.2.1. Hmm, well, maybe that could be it? That I haven't got it working. Do you know of aany good testtools to now I've got the clustering and replication working? The app I'm testing with is rather big and maybe the source of all my problems? So a small test app would be very nice. And I will also try with 3.0.8 if I find it.
            Thanks for the suggestions!
            Regards,
            Daniel

            • 3. Re: Session Replication
              ged Newbie

              Some more information. I just tried with Jboss 3.2.1 with tomcat, and well I get this information msgs:

              "[DefaultPartition:ReplicantManager] No responses from lookupLocalReplicants!"

              And on the other computer:

              "[DefaultPartition:Replicantmanager] lookupLocalReplicants size() = 1"

              And it is not working. The way I installed everything was just unzipping jboss tomcat, adding a realm in login-config.xml, adding oracle-ds.xml with right settings, adding to my webapp, and running all configuration. I can see the two computers reported when clustering is started. Mod:jk2 is working perfectly, allowing me to access the computers with just one ip, but the last bit of the puzzle, (with the configuration above) replication, is not yet working.

              My ifconfig on both computers is showing MULTICAST. I'm using the same hardware and same OS (RH 9). Hostname is addad to hosts and environment variables are setup.

              This is about everything I have done. If you need more information that can be helpful just ask!

              But I will prevail! I will fight! ;) Will try with the older version as you suggested.
              Thanks in advance,
              Daniel

              • 4. Re: Session Replication
                Sacha Labourey Master

                are you sure ipchains or equivalent is not started with your RH9, it is by default.

                cheers,

                sacha

                • 5. Re: Session Replication
                  ged Newbie

                  Hello again, and thank you for trying to help! =)

                  Ipchains is gone from both computers. BUT, the problems is partly solved! Today after many ugly words and desperate tries, we discovered that it was the NIC! So we switched to another card.

                  So now instead of not working it almost works. JK switches between the two computers without problem, but when I login to on one computer and then disconnect it I have to login again when JK switches over to the second one. And the session is not saved. But now it doesn't hang and that is good. =)

                  Are there any special things to think about or configure when you're dealing with session replication and accounts? (Except the usual jbossweb-jetty->jboss-service.xml, distributable, running all)
                  Regards,
                  Daniel