Hello Daniel,

Thank you very much for your advice. Based on it I modified the configuration:
<Proxy balancer://tomcat-cluster>
    BalancerMember https://192.168.1.40:8443 route=TOMCAT_SRV1 timeout=10 
retry=30
    BalancerMember https://192.168.1.50:8443 route=TOMCAT_SRV2 timeout=10 
retry=30
    ProxySet stickysession=JSESSIONID|jsessionid
    ProxySet lbmethod=byrequests
    ProxySet failontimeout=on
    ProxySet failonstatus=500,502,503
    ProxySet forcerecovery=off
    ProxySet nofailover=off
</Proxy>
I removed ping parameter because it does not work for GET requests.

Now when the first server is in "bad condition" (192.168.1.40:8443 is 
available, but the server does not respond), Apache waits 10 s and than it 
sends 502 error to client, instead of using the second server. What is wrong? 
Thanks in advance.

Best regards,
Fica

On 2023/11/01 10:24:54 Daniel Ferradal wrote:
> El mié, 1 nov 2023 a las 8:32, <fi...@seznam.cz> escribió:
>
> > Hello everybody.
> >
> > I use Apache 2.4.37 on Red Hat as balancer for two Tomcat servers. We have
> > this configuration of balancer:
> > <Proxy balancer://tomcat-cluster>
> >     BalancerMember https://192.168.1.40:8443 route=TOMCAT_SRV1 timeout=60
> > ping=1ms
> >     BalancerMember https://192.168.1.50:8443 route=TOMCAT_SRV2 timeout=60
> > ping=500ms
> >     ProxySet stickysession=JSESSIONID|jsessionid
> >     ProxySet lbmethod=byrequests
> >     ProxySet nofailover=off
> > </Proxy>
> > For testing reasons, I have reduced the ping value to 1 ms for one server.
> >
> > During test calls Load Balancer Manager shows server status "Init Err" and
> > Apache error log shows these errors:
> > [Tue Oct 31 17:01:38.075395 2023] [proxy_http:error] [pid 151375:tid 
> > 140535126157056] (70007)The timeout specified has expired: [client
> > xxx.xxx.xxx.xxx:33855] AH01102: error reading status line from remote 
> > server 192.168.1.40:8443, referer: https://xy
> > [Tue Oct 31 17:01:38.075453 2023] [proxy:error] [pid 151375:tid
> > 140535126157056] [client xxx.xxx.xxx.xxx:33855] AH00898: Timeout on 
> > 100-Continue returned by /tomcat, referer: https://xy
> >
> > But I can still see requests from Apache in the request log of the server
> > 192.168.1.40. How do I configure the load balancer to stop sending requests
> > to the server 192.168.1.40 for a defined period of time after detecting the
> > "Init Err" status and only send them to the other server in the cluster?
> > Thank you very much in advance for your help.
> >
> >
> "failontimeout" by default is off, you may want to turn it on for your 
> testing purposes.
>
>
> --
> Daniel Ferradal
> HTTPD Project
> #httpd help at Libera.Chat

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to