* Nicolas George [Tue Jul 08, 2025 at 11:54:10AM +0200]:

> The logrotate snippet for apache2 says:
> 
>       postrotate
>               if pgrep -f ^/usr/sbin/apache2 > /dev/null; then
>                       invoke-rc.d apache2 reload 2>&1 | logger -t 
> apache2.logrotate
>               fi
>       endscript
> 
> It is possible that invoke-rc.d is inhibited by
> policy-rcd-declarative-deny-all or an equivalent solution but apache2
> was enabled and started explicitly.
> 
> In that case, log rotation should happen, but it does not.
> 
> Since the call is already wrapped in a test that apache2 is running, I
> suggest to replace “invoke-rc.d apache2 reload” by “apache2ctl
> graceful”.

A "graceful reload" should also prevent failures to the apache2 service during
logrotate execution whenever new symbols are provided, as could be observed by
users of e.g. the checkmk monitoring system. There the apache2 web service
failed hard whenever new symbols showed up in apache2 packages, and logrotate
kicking in during the night then.

This happened in 2024 (2024-07-14), looking like this:

  apache2: Syntax error on line 126 of 
/omd/sites/monitoring/etc/apache/apache.conf: Cannot load 
/omd/sites/monitoring/lib/apache/modules/mod_headers.so into server: 
/omd/sites/monitoring/lib/apache/modules/mod_headers.so: undefined symbol: 
ap_set_content_type_ex

Then also in 2025 (2025-09-09):

  apache2: Syntax error on line 133 of 
/omd/sites/monitoring/etc/apache/apache.conf: Cannot load 
/omd/sites/monitoring/lib/apache/modules/mod_rewrite.so into server: 
/omd/sites/monitoring/lib/apache/modules/mod_rewrite.so: undefined symbol: 
ap_stat_check

And once again also in 2026 (2026-01-26):

  apache2: Syntax error on line 95 of 
/omd/sites/monitoring/etc/apache/apache.conf: Cannot load 
/omd/sites/monitoring/lib/apache/modules/mod_mpm_prefork.so into server: 
/omd/sites/monitoring/lib/apache/modules/mod_mpm_prefork.so: undefined symbol: 
ap_set_listentcpdeferaccept

Also see https://forum.checkmk.com/t/apache-failed-with-syntax-error/48244
for further user reports about this.

regards
-mika-

Attachment: signature.asc
Description: PGP signature

Reply via email to