You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by fi...@seznam.cz on 2023/11/01 07:32:21 UTC

[users@httpd] Apache 2.4 Balancer still sends requests to the server with status "Init Err"

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.

Best regards,

Fica

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


Re: [users@httpd] Apache 2.4 Balancer still sends requests to the server with status "Init Err"

Posted by Suvendu Sekhar Mondal <su...@gmail.com>.
On Wed, Nov 1, 2023 at 3:55 PM Daniel Ferradal <df...@apache.org> 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.
>>
This can be achieved by using the "retry" parameter. Apache will not
forward any request to the backend server(which is in error state)
until retry timeout expires. By default this value is 60 sec. You may
need to adjust it.

https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#balancermember

>
> "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-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache 2.4 Balancer still sends requests to the server with status "Init Err"

Posted by Daniel Ferradal <df...@apache.org>.
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