Description of problem: This is a continuation of https://bz.apache.org/bugzilla/show_bug.cgi?id=60757. mod_proxy_hcheck is configured in VirtualHost. I expect a watchdog works for VirtualHost and shows a notification like: [Thu Jul 12 13:32:10.325851 2018] [proxy_hcheck:debug] [pid 2867] mod_proxy_hcheck.c(1033): AH03265: watchdog callback registered (_proxy_hcheck_ for 127.0.0.1) However, in fact it shows the failure message: [Thu Jul 12 13:39:13.729415 2018] [proxy_hcheck:trace4] [pid 2939] mod_proxy_hcheck.c(1018): AH10019: Missing unique per-server context: 127.0.0.1 (5563982bee48:556398236400) (no hchecks) The configuration is as follows: <VirtualHost 127.0.0.1:80> ProxyRequests off ProxyPreserveHost On ServerName 127.0.0.1 #ProxyHCExpr ok23 {%{REQUEST_STATUS} =~ /^[23]/} #ProxyHCTemplate hcinterval=5 <Proxy balancer://jbosscluster> BalancerMember http://redhat.com:80/ route=p01 hcmethod=TCP hcinterval=5 BalancerMember http://jboss.org:80/ route=p02 hcmethod=TCP hcinterval=5 ProxySet lbmethod=byrequests Require all granted </Proxy> ProxyPass / balancer://jbosscluster/ ProxyPassReverse / balancer://jbosscluster/ <Proxy *> Require all denied </Proxy> <Location ~ "/*"> Require all granted </Location> LogLevel proxy_hcheck:TRACE8 proxy:TRACE2 watchdog:TRACE2 </VirtualHost> Uncommenting ProxyHCExpr or ProxyHCTemplate, it works as expected. Version-Release number of selected component (if applicable): httpd24-httpd-2.4.27-8.el7.1.x86_64 How reproducible: Steps to Reproduce: 1. Add the above config in /opt/rh/httpd24/root/etc/httpd/conf.d/ 2. Restart the server 3. See error_log Actual results: [Thu Jul 12 13:32:10.325851 2018] [proxy_hcheck:debug] [pid 2867] mod_proxy_hcheck.c(1033): AH03265: watchdog callback registered (_proxy_hcheck_ for 127.0.0.1) Expected results: [Thu Jul 12 13:39:13.729415 2018] [proxy_hcheck:trace4] [pid 2939] mod_proxy_hcheck.c(1018): AH10019: Missing unique per-server context: 127.0.0.1 (5563982bee48:556398236400) (no hchecks) Additional info: If neither of the above 2 directive is defined in VirtualHost, hc_create_config is not invoked. As a result, the root sctx_t instance is reused for each VirtualHost: Breakpoint 1, hc_post_config (p=<optimized out>, plog=<optimized out>, ptemp=<optimized out>, main_s=<optimized out>) at mod_proxy_hcheck.c:1015 1015 if (s != ctx->s) { (gdb) print s.server_hostname $1 = 0x5555558a00b0 "172.17.0.2" (gdb) print s $2 = (server_rec *) 0x55555580b400 (gdb) print ctx.s $3 = (server_rec *) 0x55555580b400 (gdb) c Continuing. Breakpoint 1, hc_post_config (p=<optimized out>, plog=<optimized out>, ptemp=<optimized out>, main_s=<optimized out>) at mod_proxy_hcheck.c:1015 1015 if (s != ctx->s) { (gdb) print s.server_hostname $4 = 0x555555899ed0 "127.0.0.1" (gdb) print s $5 = (server_rec *) 0x555555893e48 (gdb) print ctx.s $6 = (server_rec *) 0x55555580b400 <<<<====reused (gdb)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (httpd24 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:5280