Bug 1701249
Summary: | tomcat doesn't clean own logs by logrotate | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Markus Schibli <mschibli> | ||||
Component: | tomcat | Assignee: | Coty Sutherland <csutherl> | ||||
Status: | CLOSED WONTFIX | QA Contact: | tomcat-qe | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.6 | CC: | cww | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2020-03-04 21:00:41 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1722607 | ||||||
Attachments: |
|
Description
Markus Schibli
2019-04-18 13:45:26 UTC
mentioned closed BZ was https://bugzilla.redhat.com/show_bug.cgi?id=1451314 I provided a patch suggestion on the rhel-6 issue, https://bugzilla.redhat.com/show_bug.cgi?id=1451314#c2. I'm not sure if it's feasible or not (it never got reviewed), but I'll look into it for rhel-7. The proposed solution from rhbz#1451314 was to add *.log to the logrotate configuration: ~~~ /var/log/tomcat/catalina.out /var/log/tomcat/*.log { copytruncate weekly rotate 52 compress missingok create 0644 tomcat tomcat } ~~~ Users are free to go that route, however it will likely interfere with tomcat's ability to rotate it's own logs. The better solution to the problem of having too many logs after long periods of time is to utilize the o.a.juli.FileHandler's maxDays attribute (see https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/juli/FileHandler.html) to limit the number of logs kept. By default it keeps them forever, which is why there are a lot of long files after several days. If users want to use logrotate instead, then they should set the rotatable attribute of the FileHandler to false rather than true which will prevent tomcat from rotating it's own logs and allow the file management to fall to logrotate. Development Management has reviewed and declined this request. You may appeal this decision by using your Red Hat support channels, who will make certain the issue receives the proper prioritization with product and development management. https://www.redhat.com/support/process/production/#howto |