Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-261

segmentation fault with nofailover=On and proxy in virtual host

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Blocker
    • None
    • 1.1.3.Final
    • None
    • None

    Description

      we have

      • two clusters (2 JBoss instances for cluster1 (inst1 and inst2), 1 JBoss instance for cluster2 (inst3)). All instances run on the same machine (as) with binding manager
      • AJP on JBoss (port 8009 (inst1), 8109 (inst2), 8209 (inst3))
      • root context enabled, application is in ROOT.war
      • defined jvmRoute in server.xml (inst1 -Djboss.web.jvmRoute=as.jb1 , inst2 -Djboss.web.jvmRoute=as.jb2 , inst3 -Djboss.web.jvmRoute=as.cms1)
      • Apache HTTPD runs on separate machine (ws)

      we need

      • cluster1 has connection to inst1 and inst2 with sticky session (client with one session will be routed to one instance only)
      • cluster2 has connection to inst3

      We had tryed 2 solutions with no success:

      SOLUTION 1

      • all in virtual host

      <VirtualHost externalip:8080>
      ServerName web1
      <Proxy balancer://cluster1/>
      Order deny,allow
      Allow from all

      BalancerMember ajp://as:8009/ route=as.jb1
      BalancerMember ajp://as:8109/ route=as.jb2
      </Proxy>

      ProxyPass / balancer://cluster1/ stickysession=JSESSIONID|jsessionid nofailover=On
      ProxyPassReverse / balancer://cluster1/
      </VirtualHost>

      <VirtualHost externalip:8080>

      ServerName web2

      <Proxy balancer://cluster2/>
      Order deny,allow
      Allow from all

      BalancerMember ajp://as:8209/ route=as.cms1
      </Proxy>

      ProxyPass / balancer://cluster2/ stickysession=JSESSIONID|jsessionid nofailover=On
      ProxyPassReverse / balancer://cluster2/
      </VirtualHost>

      Result:
      Solution generate segmentation fault in error log, where somebody try to browse web. If we remove nofailover=On, all works fine except stick session - requests are splited to inst1 and inst2.

      SOLUTION2

      • apache wide configuration

      <Proxy balancer://cluster1/>
      Order deny,allow
      Allow from all

      BalancerMember ajp://as:8009/ route=as.jb1
      BalancerMember ajp://as:8109/ route=as.jb2
      </Proxy>

      <Proxy balancer://cluster2/>
      Order deny,allow
      Allow from all

      BalancerMember ajp://as:8209/ route=as.cms1
      </Proxy>

      <VirtualHost externalip:8080>
      ServerName web1

      ProxyPass / balancer://cluster1/ stickysession=JSESSIONID|jsessionid nofailover=On
      ProxyPassReverse / balancer://cluster1/
      </VirtualHost>

      <VirtualHost externalip:8080>

      ServerName web2

      ProxyPass / balancer://cluster2/ stickysession=JSESSIONID|jsessionid nofailover=On
      ProxyPassReverse / balancer://cluster2/
      </VirtualHost>

      Result:
      Sticky session works fine (no segmentation fault), but requests for web1 is routed to inst3 (cluster2) too and requests for web2 is routed to inst1 (cluster1) too. So there is problem with existence of two proxy cluster conffiguration directive.

      Attachments

        Activity

          People

            rhn-engineering-jclere Jean-Frederic Clere
            tomashuryn Tomas Huryn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: