1 Reply Latest reply on Mar 10, 2006 7:10 PM by cuoz

    2 instances on one box: stop bouncing between them?

    squeak

      I have one box, that hosts both my dev and stage envionments. Both are different config directories inside of JBoss 4.0.3sp1. Each one is bound to a different IP address.

      I have turned on the jvmRoute for both instances.

      The domain names are dev.foobar.com and stage.foobar.com

      For some reason, while my URL in the browser will stay the same, it will flip between which JBoss instance is responding. And when I look at the cookies for each flip, they are the exact same (sometimes I will get a '.stage' appending, but be shown the dev site).

      I am using the default config, so clustering is not enabled (I think).

      I am fronting this with Apache 2.2, using the new mod_proxy_ajp settings.

      Here is the relelvant httpd.conf sections:

      <VirtualHost *>
      ServerName stage.foobar.com
      ErrorLog logs/stage-error_log.log
      CustomLog logs/stage-access.log combined
      
      ProxyPass /jcore ajp://192.168.2.87/jcore smax=5 max=20 ttl=30 retry=60 route=stage
      ProxyPreserveHost on
      </VirtualHost>
      
      
      <VirtualHost *>
      ServerName dev.foobar.com
      ErrorLog logs/stage-error_log.log
      CustomLog logs/stage-access.log combined
      
      ProxyPass /jcore ajp://192.168.2.85/jcore smax=5 max=20 ttl=30 retry=60 route=dev
      ProxyPreserveHost on
      </VirtualHost>
      




      There is no consistent nature to this. Anyone seen something like this before?

        • 1. Re: 2 instances on one box: stop bouncing between them?

          The only thing I can think of that is different than what I have done with Apache2 is that I don't use * in the VirtualHost directive. I have something like:

          <VirtualHost mydomain.com>
           ServerName mydomain.com
          ...
          ...
          </VirtualHost>
          


          I didn't think using * was allowed, but I could be wrong about that. I have also seen people specify the IP address instead of the domain name.

          Hope that helps,
          gary.