Score:0

mod_proxy_hcheck causes apache-2.4 startup-crash

cn flag

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 avatar
cn flag
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``
Score:0
cn flag

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.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.