Bug#1065440: tomcat10: /etc/cron.daily/tomcat10
Julien Savoie
julien at savoie.wtf
Fri May 15 03:24:31 BST 2026
I can confirm I've also been impacted by a similar issue. The issue
concerns the script /etc/cron.daily/tomcat10 will try to rotate files
that are empty and have never been written to.
Specifically:
find /var/log/$NAME/ -name \*.$EXT -daystart -mtime +0 -print0 -maxdepth 1 \
| xargs --no-run-if-empty -0 gzip -9 EXT=$EXT.gz
Adding a -size parameter, even a small one, could fix this:
find /var/log/$NAME/ -name \*.$EXT -daystart -mtime +0 -size +10c
-print0 -maxdepth 1 \
Because of how tomcat uses <TimeBasedTriggeringPolicy> a file may
never rotate until an event is triggered. This means the script may
try to compress the same rarely used application.log file over and
over again even if <TimeBasedTriggeringPolicy interval="1"
modulate="true"/> is defined.
This will trigger an error when gzip refuses to overwrite an existing file.
/etc/cron.daily/tomcat10:
gzip: /var/log/tomcat10/application.log.gz already exists; not overwritten
More information about the pkg-java-maintainers
mailing list