0

I would like to create a load-balanced environment using Apache 2.4.43 (windows) and two Tomcats servers.
Using the "mod_proxy_hcheck" module some basic healthcheck operations should be implemented, which are based on the official documentation: https://httpd.apache.org/docs/2.4/mod/mod_proxy_hcheck.html

My config

ProxyHCExpr ok2 {%{REQUEST_STATUS} =~ /^[2]/}
<Proxy balancer://appcluster>
    BalancerMember http://localhost:8080/app-SNAPSHOT route=server1 secret=1337 hcmethod=HEAD hcexpr=ok2 hcinterval=10 hcpasses=2 hcfails=3
    BalancerMember http://localhost:9090/app-SNAPSHOT route=server2 secret=1337 hcmethod=HEAD hcexpr=ok2 hcinterval=10 hcpasses=2 hcfails=3
    ProxySet lbmethod=byrequests
    ProxySet stickysession=JSESSIONID|jsessionid
</Proxy>
ProxyPass /app-SNAPSHOT balancer://appcluster
ProxyPassReverse /app-SNAPSHOT balancer://appcluster

My problem: Whenever I use any parameter documented in the mod_proxy_hcheck docs, my Server fails to start. The following error-message is logged in the Winodws Event-Viewer The Apache service named reported the following error:

Invalid command 'ProxyHCExpr', perhaps misspelled or defined by a module not included in the server configuration.

I've played around and removed those mod_proxy_hcheck related params like ProxyHCExpr, hcfails, hcpasses, hcinterval, hcexpr, hcmethod, but whenever one is activated, the service crashes during startup.

What I've tried/searched:

  • I've searched for the mod_proxy_hcheck module in my httpd.conf file, but it is not listed here. So I have checked the <apacheInstallDir>\modules: The file mod_proxy_hcheck.so exists
  • I've added the line LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so to my httpd.conf, but service-startup fails.

Any ideas left?

schlomm
  • 101
  • 2
  • I was totally confused by my trail&error so I've missed the relevant hint in the ``error.log``-file: ``[Thu Aug 17 22:35:26.996830 2023] [proxy_hcheck:crit] [pid 19280:tid 768] AH03262: mod_watchdog is required`` – schlomm Aug 17 '23 at 21:04

1 Answers1

0

Ensure that LoadModule watchdog_module modules/mod_watchdog.so is also included in the httpd.conf file.
This is also mentioned in the official documentation https://httpd.apache.org/docs/2.4/mod/mod_proxy_hcheck.html#Summary unter the "Summary" section.

schlomm
  • 101
  • 2