Bug 973189 - EWS httpd keeps writing logs to old log file after rotated by logrotate
Summary: EWS httpd keeps writing logs to old log file after rotated by logrotate
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Web Server 2
Classification: JBoss
Component: httpd
Version: 2.0.1
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
: 2.0.1
Assignee: Weinan Li
QA Contact: Libor Fuka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-11 12:48 UTC by Dasharath Masirkar
Modified: 2018-12-02 17:01 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-01-03 12:58:28 UTC
Type: Bug
Embargoed:
weli: needinfo+


Attachments (Terms of Use)

Description Dasharath 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"

Comment 2 Mandar Joshi 2013-06-14 07:24:33 UTC
Doc Text added.

@Wei Nan Li,  can you please review the Doc Text content?

Comment 3 Weinan Li 2013-06-14 08:32:57 UTC
Document looks correct. Requested to include this into 2.0.1

Comment 6 Michal Haško 2013-06-26 14:08:39 UTC
VERIFIED on
httpd-2.2.22-23.ep6.el5
httpd-2.2.22-23.ep6.el6

Comment 7 Mandar Joshi 2013-07-01 06:25:18 UTC
Updated the doc text. Bug moved from known issue to fixed.

@lfuka,  can you please review the Doc Text content?

Comment 8 Mandar Joshi 2013-07-01 06:27:42 UTC
removing need info flag


Note You need to log in before you can comment on or make changes to this bug.