1 Reply Latest reply on Aug 19, 2003 5:13 AM by mikefinn

    Session replication not working

    mikefinn

      JBoss 3.2.1/Jetty + RedHat 9 + Sun JDK 1.4.1 + (Apache 2.0.47 + mod_jk2 on separate box)

      Multicast is on
      IpChains is not there
      Multihomed box, but binding UDP to right interface

      Using JGStore replication. I cannot get session replication to work. Going through the jk2 load balancer, I successfully log in to app (gets node 1). When I drop node 1 (shut JBoss down), and access another page, I get the login prompt (on node 2). The following exception happens on node 2.

      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 ......

      So, it appears that the principal (on session obj) is not being replicated. Not sure if it's related or not, but I am getting a TON of these messages on node 2. I don't see these on node 1. Node 1 and 2 are identical Jboss wise (even did a deep copy of deploy to be sure), except for bind_addr setting in jbossweb-jetty.sar > jboss-service.xml.

      2003-08-18 08:57:09,628 WARN [org.javagroups.DefaultPartition] [Mon Aug 18 08:57:09 EDT 2003] [WARN] UDP.handleIncomingUdpPacket(): discarded message from different group (JETTY_HTTPSESSION_DISTRIBUTION:/sys-DefaultSubCluster). Sender was j2apptest02:32852
      2003-08-18 08:57:09,628 WARN [org.javagroups.DefaultPartition] [Mon Aug 18 08:57:09 EDT 2003] [WARN] UDP.handleIncomingUdpPacket(): discarded message from different group (JETTY_HTTPSESSION_DISTRIBUTION:/sys-DefaultSubCluster). Sender was j2apptest02:32852
      2003-08-18 08:57:09,717 WARN [org.javagroups.DefaultPartition] [Mon Aug 18 08:57:09 EDT 2003] [WARN] UDP.handleIncomingUdpPacket(): discarded message from different group (JETTY_HTTPSESSION_DISTRIBUTION:/stats-DefaultSubCluster). Sender was j2apptest02:32856
      2003-08-18 08:57:09,718 WARN [org.javagroups.DefaultPartition] [Mon Aug 18 08:57:09 EDT 2003] [WARN] UDP.handleIncomingUdpPacket(): discarded message from different group (JETTY_HTTPSESSION_DISTRIBUTION:/stats-DefaultSubCluster). Sender was j2apptest02:32856
      2003-08-18 08:57:09,718 WARN [org.javagroups.DefaultPartition] [Mon Aug 18 08:57:09 EDT 2003] [WARN] UDP.handleIncomingUdpPacket(): discarded message from different group (JETTY_HTTPSESSION_DISTRIBUTION:/stats-DefaultSubCluster). Sender was j2apptest02:32856
      2003-08-18 08:57:09,719 WARN [org.javagroups.DefaultPartition] [Mon Aug 18 08:57:09 EDT 2003] [WARN] UDP.handleIncomingUdpPacket(): discarded message from different group (JETTY_HTTPSESSION_DISTRIBUTION:/stats-DefaultSubCluster). Sender was j2apptest02:32856

      Any help is appreciated.

      TIA,
      Mike

        • 1. Re: Session replication not working
          mikefinn

          OK - reverted back to "all" configuration. The "discarded messages" log output is gone.

          I switched to JBoss HTTP replication, to see if it made a difference.

          It looks as if the session is being replicated, but not the security context on the session (?). Whenever the load balancer routes to the node that didn't do the authentication, it pukes with a NPE (shown in last post). As pages are being loaded, I can see the same session ID being looked up and loaded on both nodes.

          TIA,
          Mike