#1060381 tomcat10: catalina.out is not recreated after deletion

Package:
tomcat10
Source:
tomcat10
Submitter:
Daniel von Obernitz
Date:
2024-04-06 21:18:05 UTC
Severity:
normal
Tags:
#1060381#5
Date:
2024-01-10 11:42:34 UTC
From:
To:
Dear Maintainer,

when you stop tomcat10.service and delete the /var/log/tomcat10/catalina.out, the file will not be recreated after the next tomcat10.service start.


I tested the following scenarios:

Install tomcat10 package - stop tomcat10.service - delete catalina.out - restart tomcat10.service = catalina.out is NOT created anymore.

Purge tomcat10 package and all dependencies - reinstall tomcat10 package = catalina.out is present again.


When the rsyslog package is also installed, the catalina.out is created again if rsyslog.service and tomcat10.service are both restarted. But since we are not using rsyslog anymore I have not found a way to recreate the catalina.out yet.

Best regards
Daniel

#1060381#8
Date:
2024-04-06 11:54:45 UTC
From:
To:
Hello Daniel,
the file will not be recreated after the next tomcat10.service start.

[...]

I don't understand the problem here. You deliberately deleted catalina.out.
What stops you from using

 	touch /var/log/tomcat10/catalina.out

to recreate it?

Regards,

Markus

#1060381#15
Date:
2024-04-06 12:01:21 UTC
From:
To:
[already CCed the submitter but forgot to add the bug report]

Hello Daniel,
the file will not be recreated after the next tomcat10.service start.

[...]

I don't understand the problem here. You deliberately deleted catalina.out.
What stops you from using

        touch /var/log/tomcat10/catalina.out

to recreate it?

Regards,

Markus

#1060381#20
Date:
2024-04-06 21:07:48 UTC
From:
To:
Hello Markus,

thanks for your response.

Am Samstag, den 06.04.2024 um 13:54 schrieb Markus Koschany:

In my previous tests a recreation did not help, the file was never accessed by the tomcat service again.

But I tested a bit more and I think there has been a basic missunderstanding on my side regarding the creation of the 'catalina.out' in the first place.

In the Debian package the creation of the 'catalina.out' is not controlled by the tomcat configuration but by the 'rsyslog.conf.d/tomcatX.conf'. And in the case of Debian 12 where rsyslog is not installed by default anymore, the 'catalina.out' is not created at all. Default console log is sent directly to journald and a daily logfile 'catalina.YYYY-MM-DD.log' is created, as defined in the 'logging.properties'.

If you can confirm this, feel free to close this issue. I have been too fixated on the logfile which has been present all years and I also use some manual tomcat installation with the source package which handles the catalina.out differently.

Best regards
Daniel