2 Replies Latest reply on Dec 3, 2006 7:59 PM by nekop

    Non-sticky-session clustering not working for me in 4.0.5

    jon.brisbin

      I just downloaded JBoss 4.0.5 and thought I would try, yet again, to get non-sticky-session load-balancing working, but alas, I have failed again, for the 93rd time!

      I'm running 4.0.5 in the "all" configuration on two machines (my PowerBook and a Solaris 10 x86, not that it matters) on the LAN here. I have turned on using mod_jk in the Tomcat jboss-service.xml and enabled JBoss clustered SSO in the server.xml (as well as added jvmRoute to the Engine element). Then I tweaked tc5-cluster.sar to do REPL_SYNC and turned on buddy replication. The two servers find each other just fine and all my jars and wars are deployed across the cluster.

      When I try to log into the web app, though, it prompts me to log in twice, then gives me a 404 error. So, obviously, session replication is not happening (prompting me to log in once per node--last time I tried this with 4 nodes and I was prompted to log in 4 times) and there's something odd going on with the 404 error, given the URL I'm accessing is a virtual one and is recognized only by the servlet in my webapp. I know my webapp is being deployed, because the TomcatDeployer says so and it recognizes that I have "distributable" set in the web.xml.

      Any help you can give here would be greatly appreciated! I've included relevant snippets from my config files below:

      from jbossweb-tomcat55.sar/META-INF/jboss-service.xml...

      <attribute name="UseJK">true</attribute>


      jbossweb-tomcat55.sar/server.xml...

      <Engine name="jboss.web" defaultHost="localhost" jvmRoute="172.16.10.22">
      


      tc5-cluster.sar/META-INF/jboss-service.xml...

      <attribute name="CacheMode">REPL_SYNC</attribute>

      ...
      <!--FC max_credits="10000000" down_thread="false" up_thread="false"
       min_threshold="0.20"/-->

      ...
      <buddyReplicationEnabled>true</buddyReplicationEnabled>


      workers.properties...

      worker.list = router,status
      
      worker.localhost.type=ajp13
      worker.localhost.host=172.16.10.22
      worker.localhost.port=8009
      worker.localhost.lbfactor=5
      
      worker.portalvm.type=ajp13
      worker.portalvm.host=fc63r41
      worker.portalvm.port=8009
      worker.portalvm.lbfactor=3
      
      worker.router.type=lb
      worker.router.balance_workers=localhost,portalvm
      worker.router.sticky_session=false
      
      worker.status.type=status


      Everything else is stock.

      Thanks!

      Jon Brisbin
      Webmaster
      NPC International, Inc.