The /var/log/grpwise-tomcat directory is filling up over time

  • 7024702
  • 25-Jun-2020
  • 15-Jul-2020

Environment

GroupWise 18

Situation

The /var/log/grpwise-tomcat directory is filling up over time.

Only the catalina.out file will be rotated by default. The other files will not be rotated by default.

Resolution

1.Open the /etc/grpwise-tomcat/logging.properties file.

2.Locate the section named Handler specific properties.

Add the line 1catalina.org.apache.juli.AsyncFileHandler.rotatable = false to the appropriate block of lines.

Add the line 2localhost.org.apache.juli.AsyncFileHandler.rotatable = false to the appropriate block of lines.

3.The section named Handler specific properties should now resemble the example below.

1catalina.org.apache.juli.AsyncFileHandler.rotatable = false
1catalina.org.apache.juli.AsyncFileHandler.level = FINE
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.
1catalina.org.apache.juli.AsyncFileHandler.maxDays = 90
1catalina.org.apache.juli.AsyncFileHandler.encoding = UTF-8

2localhost.org.apache.juli.AsyncFileHandler.rotatable = false
2localhost.org.apache.juli.AsyncFileHandler.level = FINE
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.
2localhost.org.apache.juli.AsyncFileHandler.maxDays = 90
2localhost.org.apache.juli.AsyncFileHandler.encoding = UTF-8

4.Save the /etc/grpwise-tomcat/logging.properties file.

5.Open the /etc/grpwise-tomcat/server.xml file.

6.Locate the section named Access log processes all example.

7.Edit the section so it will resemble the example below.

        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" rotatable="false"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

8.Stop and start grpwise-tomcat.

9.Edit the /etc/logrotate.d/grpwise-tomcat file and add entries for the other files, similar to the example below.

/var/log/grpwise-tomcat/catalina.log {
  copytruncate
  daily
  rotate 7
  compress
  missingok
}
/var/log/grpwise-tomcat/localhost.log {
  copytruncate
  daily
  rotate 7
  compress
  missingok
}
/var/log/grpwise-tomcat/localhost_access_log.txt {
  copytruncate
  daily
  rotate 7
  compress
  missingok
}

10.Note that when installing grpwise-tomcat as part of WebAccess, the Calendar Publishing Host or Monitor, the /etc/logrotate.d/grpwise-tomcat file will be overwritten. Either restore the /etc/logrotate.d/grpwise-tomcat file or add entries for the other files to an a dditional file in the /etc/logrotate.d directory.

Additional Information

Installing grpwise-tomcat as part of either WebAccess, the Calendar Publishing Host or Monitor will overwrite the /etc/logrotate.d/grpwise-tomcat file. This has been reported in BUG1172529