Proxy Load balance session replication issue - not working

Discussion in 'Apache' started by narayanab16, Oct 16, 2012.

  1. #1
    hi,


    Please help me to resolve
    proxy.conf
    ---------------
    <Proxy balancer://wwwcluster>
    BalancerMember ajp://192.z.y.x:8009 route=www1
    BalancerMember ajp://192.z.y.x:8009 route=www2
    ProxySet lbmethod=byrequests
    </Proxy>

    ProxyPass /test-app balancer://wwwcluster/test-app stickysession=JSESSIONID|jsessionid nofailover=Off scolonpathdelim=On

    <Location /balancer-manager>

    SetHandler balancer-manager
    #Order Deny,Allow
    #Deny from all
    #Allow from localhost
    AuthType Basic
    AuthName "Balancer Manager"
    AuthUserFile "/etc/httpd/htpasswd.users"
    Require valid-user

    </Location>

    Tomcat1 server.xml
    <Engine name="Catalina" defaultHost="server1" jvmRoute="www1"> ...<Host> <Cluster....> </Cluster></Host></Engine>
    Tomcat 2 server.xml
    <Engine name="Catalina" defaultHost="server2" jvmRoute="www2"> ...<Host> <Cluster....> </Cluster></Host></Engine>



    If tomcat1 and tomcat2 is running then request goes to tomcat 1 only if tomcat1 killed but session is not getting replicating and not reaching tomcat 2 if i enable route redirect to www2 from balance-manager also still no luck

    http://jee-bpel-soa.blogspot.in/2009/07/apache-tomcat-clustering-load-balancing.html

    http://localhost/test-app/

    error_log
    ------------
    Tue Oct 16 23:32:37 2012] [error] (111)Connection refused: proxy: AJP: attempt to connect to 192.x.x.4:8009 (192.x.x.4) failed
    [Tue Oct 16 23:32:37 2012] [error] ap_proxy_connect_backend disabling worker for (192.x.x.4)
    [Tue Oct 16 23:32:37 2012] [error] proxy: AJP: failed to make connection to backend: 192.x.x.4
    [Tue Oct 16 23:32:37 2012] [error] (111)Connection refused: proxy: AJP: attempt to connect to 192.x..x:8009 (192.x.x.2) failed
    [Tue Oct 16 23:32:37 2012] [error] ap_proxy_connect_backend disabling worker for (192.x.x.2)
    [Tue Oct 16 23:32:37 2012] [error] proxy: AJP: failed to make connection to backend: 192.x.x.2
     
    narayanab16, Oct 16, 2012 IP
  2. narayanab16

    narayanab16 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    Any tips and tricks appreciated as soon as possible?
    Im eagerly waiting for it.
     
    narayanab16, Oct 16, 2012 IP
  3. AnthonyG

    AnthonyG Well-Known Member

    Messages:
    114
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    135
    #3
    Yes, best tip is to get rid of apache & use a proper program like Nginx, lighter, faster & better overall.

    haproxy would be better as well, which gives yo ua front end gui that will allow you to do some work in it with your nodes.

    I still prefer nginx over haproxy by far, but its your choice.
     
    AnthonyG, Oct 16, 2012 IP
  4. narayanab16

    narayanab16 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi,Thanks for the reply.Can some try to help me here please.apache webserver hosted on CentOS <br/>

    tomcat 1 hosted on ubuntu_server1<br/>
    tomcat 2 hosted on ubuntu_server2 <br/>
    As stated above the configuration was.Those 3 hosts are able to connect to each other without any issues<br/>

    The below urls works as expected but load balance over session replication fails if any one of the back end server fails on route redirect mode<br/>
    http://host1:8080/test-app<br/>
    http://host2:8180/test-app<br/>

    Waiting.....Waiting......
     
    Last edited: Oct 16, 2012
    narayanab16, Oct 16, 2012 IP
  5. narayanab16

    narayanab16 Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi Forum Members,Is any help will be available or not for this query?Regards,Nar
     
    narayanab16, Oct 17, 2012 IP