Spectrum tomcat web server logs are not being removed
book
Article ID: 369352
calendar_today
Updated On:
Products
DX NetOpsCA Spectrum
Issue/Introduction
The tomcat and webtomcat logs are not rotating and archiving.
For webtomcat, the catalina.out log is not rotating, we are seeing entries going back over 60 days in the past when the install was done (our servers are rebooted every month, so webtomcat is restarted every month).
For both tomcat and webtomcat, we have the default log4j2 settings, however all the logs (ie catalina and localhost) are being retained for 3 months.
Environment
All supported DX NetOps Spectrum releases 23.3.4 and higher
Cause
Incorrectly configure log4j2.xml file installed with Spectrum OneClick tomcat web server
Resolution
To resolve this make the following changes to the $SPECROOT/tomcat/classes/log4j2.xml file.
Create a backup of the existing $SPECROOT/tomcat/classes/log4j2.xml file.
Open the log4j2.xml file for editing.
Find this section for the <RollingFile name="CATALINA" entry. Change it as follows: