JBoss Enterprise Web Server httpd does not write logs to new log file after after it is rotated by logrotate. Expected behavior is to write logs to new log file after rotated by logrotate. This occurs because the <filename>httpd.pid</filename> file path is incorrect in <filename>/etc/logrotate.d/httpd</filename> script.
This issue is fixed in JBoss Enterprise Web Server 2.0.1. The <filename>httpd.pid</filename> file path is now corrected in <filename>/etc/logrotate.d/httpd</filename> script. JBoss Enterprise Server httpd now writes logs to new log file after rotated by log rotate.
DescriptionDasharath Masirkar
2013-06-11 12:48:20 UTC
Description of problem:
httpd keeps writing logs to old log file after rotated by logrotate utility
Version-Release number of selected component (if applicable):
JBoss EWS 2.0.0
How reproducible:
Always
Steps to Reproduce:
1. Install jboss-ews 2.0 via rpm method e.g. $ yum groupinstall jboss-ews2
2. Navigate to httpd install path and check httpd.pid file location e.g.
$ cd /etc/httpd
$ pwd
/etc/httpd
lrwxrwxrwx 1 root root 19 Jan 23 17:54 run -> ../../var/run/httpd
3. Now check httpd script provided for logrotate utility by ews rmp package
# cat /etc/logrotate.d/httpd
/var/log/httpd/*log {
missingok
notifempty
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
}
4. To test if logrotation is working properly after configuring, run the below command.
$ logrotate -vf /etc/logrotate.conf
Actual results:
The httpd keeps writing logs to old log file after rotated by logrotate
Expected results:
The httpd should write logs to new log file after rotated by logrotate
Additional info:
The httpd.pid file path is incorrect in /etc/logrotate.d/httpd script. The workaround to this issue is to correct httpd.pid file path to "/var/run/httpd/httpd.pid" instead of "/var/run/httpd.pid"
Description of problem: httpd keeps writing logs to old log file after rotated by logrotate utility Version-Release number of selected component (if applicable): JBoss EWS 2.0.0 How reproducible: Always Steps to Reproduce: 1. Install jboss-ews 2.0 via rpm method e.g. $ yum groupinstall jboss-ews2 2. Navigate to httpd install path and check httpd.pid file location e.g. $ cd /etc/httpd $ pwd /etc/httpd lrwxrwxrwx 1 root root 19 Jan 23 17:54 run -> ../../var/run/httpd 3. Now check httpd script provided for logrotate utility by ews rmp package # cat /etc/logrotate.d/httpd /var/log/httpd/*log { missingok notifempty sharedscripts postrotate /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true endscript } 4. To test if logrotation is working properly after configuring, run the below command. $ logrotate -vf /etc/logrotate.conf Actual results: The httpd keeps writing logs to old log file after rotated by logrotate Expected results: The httpd should write logs to new log file after rotated by logrotate Additional info: The httpd.pid file path is incorrect in /etc/logrotate.d/httpd script. The workaround to this issue is to correct httpd.pid file path to "/var/run/httpd/httpd.pid" instead of "/var/run/httpd.pid"