Bug 63783 - Apachectl configtest did not warn on a configuration error
Summary: Apachectl configtest did not warn on a configuration error
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4.6
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-29 18:56 UTC by Scott A. Wozny
Modified: 2019-09-29 18:56 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott A. Wozny 2019-09-29 18:56:37 UTC
While progressively disabling modules I don't need for my application, I found an issue with apachectl configtest returning Syntax OK, but the restart of httpd failing.

When I comment out:

LoadModule slotmem_shm_module modules/mod_slotmem_shm.so

And do a sudo apachectl configtest I get back "Syntax OK" but when I do a sudo apachectl restart I get back "Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details."

Now, neither of those locations gave me anything useful, but when I look at /var/log/httpd/error_log, I get back:

[Mon Sep 23 00:16:52.992948 2019] [core:notice] [pid 1467] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Mon Sep 23 00:16:52.994536 2019] [suexec:notice] [pid 1467] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Sep 23 00:16:53.008462 2019] [lbmethod_heartbeat:notice] [pid 1467] AH02281: Failed to lookup provider 'shm' for 'slotmem'. Maybe you need to load mod_slotmem_shm?
[Mon Sep 23 00:16:53.008478 2019] [proxy_balancer:emerg] [pid 1467] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
[Mon Sep 23 00:16:53.008485 2019] [:emerg] [pid 1467] AH00020: Configuration Failed, exiting

Now I am running (and will need to for my application) proxy_balancer and lbmethod_heartbeat and when I look at the Apache documentation for lbmethod_heartbeat I see the HeartbeatStorage directive offers an alternate location for heartbeat data, SHOULD mod_slotmem_shm not be loaded.

I believe apachectl configtest should have returned a syntax error in that mod_slotmem_shm wasn't loaded but there was no HearbeatStorage directive to make up for it.