1

Recently, after some update to Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-57-generic x86_64), I noticed that after the rotation of Apache logs, my execution of:

sudo tail -n5000 -f /var/log/apache2/error.log

...would just sit and display nothing. Looking at error.log and access.log, the file size was 0. However, if I execute:

sudo apachectl stop

sudo apachectl start

...THEN the logs would begin collecting data. The log would then begin:

[ssl:warn] [pid 28707:tid 140000050390912] AH01909: ip-nnn-nn-nn-nn.ec2.internal:443:0 server certificate does NOT include an ID which matches the server name
[ssl:warn] [pid 28708:tid 140000050390912] AH01909: ip-nnn-nn-nn-nn.ec2.internal:443:0 server certificate does NOT include an ID which matches the server name
[mpm_event:notice] [pid 28708:tid 140000050390912] AH00489: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
 [core:notice] [pid 28708:tid 140000050390912] AH00094: Command line: '/usr/sbin/apache2'

This is running on an AWS EC2 instance (and has worked properly for years).

The Apache server appears to be connected to mod_wsgi properly, even though the logs are collecting no data.

Anyone have any idea what might have happened, and how best to fix it?

2
  • 2
    You can specify a post rotation command in logrotate.conf. Read man logrotate.conf. Use that to restart Apache. Read man apache2 apachectl to see if there's z signal you can send to make it restart logging
    – waltinator
    Dec 14, 2020 at 1:34
  • 1
    There is already a brief logrotate.conf in /etc. If possible, it would be good to understand WHY logging suddenly stopped. Dec 14, 2020 at 1:57

0

You must log in to answer this question.

Browse other questions tagged .