Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-5511

MODCLUSTER-198 Can only rewrite from the root context in httpd if there is a root context deployed in JBoss

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • EAP_EWP 5.1.1
    • EAP_EWP 5.1.0
    • mod_cluster
    • None
    • Release Notes
    • Hide

      Make sure the ROOT.war is deployed or another dummy webapp with the / context, and remove the ROOT.war from the ignored contexts in mod_cluster.

      Show
      Make sure the ROOT.war is deployed or another dummy webapp with the / context, and remove the ROOT.war from the ignored contexts in mod_cluster.
    • Hide
      mod_rewrite could not rewrite from the root (/) in httpd if there was no ROOT context deployed in JBoss Enterprise Application Platform. This occurred because mod_cluster attempted to use the original URI instead of the URI provided by mod_rewrite. The rewrite rule now works regardless of whether the ROOT context is deployed to the platform.
      Show
      mod_rewrite could not rewrite from the root (/) in httpd if there was no ROOT context deployed in JBoss Enterprise Application Platform. This occurred because mod_cluster attempted to use the original URI instead of the URI provided by mod_rewrite. The rewrite rule now works regardless of whether the ROOT context is deployed to the platform.
    • Documented as Resolved Issue

      See: http://community.jboss.org/thread/159462

      ====
      I have a working mod_cluster 1.0.4 in front of EAP 5.1 (.com). I have been advised to use mod_rewrite and it works well. But i'm curious about the following scenario:

      mod_cluster set to expose ROOT. ROOT.war removed from JBoss. /sample deployed to jboss. mod_cluster INFO looks like:

      Node: [1],Name: redcloud:8009:jboss.web,Balancer: uat,Domain: ,Host: 192.168.235.128,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 88
      Vhost: [1:1:1], Alias: localhost
      Context: [1:1:1], Context: /sample, Status: ENABLED

      When i do:

      RewriteRule ^/sample/(.*)$ balancer://uat/sample/$1 [P,L]

      and ask for my.url/sample/ it works perfectly.

      If i do:

      RewriteRule ^/(.*)$ balancer://uat/sample/$1 [P,L]

      and go to my.url/ i get a 503 from apache and see

      [Wed Dec 01 07:37:20 2010] [debug] mod_proxy_cluster.c(962): get_balancer_by_node balancer NOT found
      [Wed Dec 01 07:37:20 2010] [debug] mod_proxy_cluster.c(962): get_balancer_by_node balancer NOT found
      [Wed Dec 01 07:37:20 2010] [debug] mod_proxy_cluster.c(1137): proxy: byrequests balancer FAILED
      [Wed Dec 01 07:37:20 2010] [error] proxy: CLUSTER: (balancer://uat). All workers are in error state

      in the apache logs.

      If i put ROOT.war back in, mod_cluster-manager INFO shows:

      Node: [1],Name: redcloud:8009:jboss.web,Balancer: uat,Domain: ,Host: 192.168.235.128,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 92
      Vhost: [1:1:1], Alias: localhost
      Context: [1:1:1], Context: /sample, Status: ENABLED
      Context: [1:1:2], Context: /, Status: ENABLED

      and my.url/ works (and serves the sameple app under root context).

      So, my question is has anyone seen this behavior with mod_cluster and mod_rewrite? I don't mind having a "dummy" app in to make ROOT visible but i don't necessarily want to have to.
      ====

              mbabacek1@redhat.com Karm Karm
              sjmenden_jira Samuel Mendenhall (Inactive)
              Laura Bailey Laura Bailey
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: