-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Brian,
On 6/23/20 21:33, Brian wrote: > > > -----Original Message----- From: Emmanuel Bourg > <ebo...@apache.org> Reply-To: Tomcat Users List > <users@tomcat.apache.org> Date: Tuesday, June 23, 2020 at 20:01 To: > "users@tomcat.apache.org" <users@tomcat.apache.org> Subject: Re: > File "catalina.out" not being created/populated when using Tomcat > 9.0.31 + Ubuntu 20.04, and content goes to the Ubuntu syslog > instead? > > Le 24/06/2020 à 02:35, Brian a écrit : > >> Good news: I updated "/etc/tmpfiles.d/tomcat9.conf" (the file I >> created) with the new value of 2770. Deleted all the logs inside >> "/val/log/tomcat9" and restarted Ubuntu. "catalina.out" got >> created and populated. Bad news: Then I deleted all the logs >> inside "/val/log/tomcat9" and just restarted Tomcat (which is >> something I do sometimes, in production). "catalina.out" didn't >> get created this time. >> >> Just to confirm, again I deleted all the logs inside >> "/val/log/tomcat9" and restarted Ubuntu. "catalina.out" got >> created and populated again. >> >> Any ideas? > > The catalina.out file is held by rsyslogd and isn't recreated > unless you restart rsyslogd. Try this when you clean the logs and > restart Tomcat: > > systemctl restart rsyslog tomcat9 > > > Hi, > > I just realized that when the "bad news" experiment took place, in > the syslog there was NOT another of those " file > '/var/log/tomcat9/catalina.out': open error: Permission denied.." > errors, so I guess it was not a permissions issue anymore, which > makes me think that the "2770" value finally solved that issue. > That is nice, thanks! OK, I restarted rsyslog and the started again > Tomcat as you adviced and... you are right, the catalina.out file > got created again. So I think you are right about rsyslogd still > holding the log file. > > To be honest with you, I'm happy about the catalina.out file > finally getting created and I really appreciate your kind help, I > really do. But I'm not really happy about having to restart rsyslog > before every time I need to restart Tomcat. You don't have to restart rsyslog every time you restart Tomcat. You just have to restart if if you delete its log file out from underneath i t. > It is weird, and I guess a lot of users will never imagine that > they have to do that and they will not feel very pleased when they > realize that the catalina.out file doesn't get created after > restarting Tomcat. And probably most of them will not even notice > that the Tomcat log is being added to the syslog, for that matter. > This whole new relation between syslog and Tomcat is really weird > and I don't think the users are being warned about it. I have used > Tomcat+Ubuntu for several years and I haven't seen this > complication before. If there is an advantage about this relation > between syslog and Tomcat, I really can't see it. This is how logging is done with systemd for better or worse. - -chris -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl7zZ+kACgkQHPApP6U8 pFiD2xAApR/XqVexdg2uH/srGfUWL7DyRSebfAvf1fJuzLc+KlRSm205VeDl5KI3 P3Qoxdy7cHeW0GSQHpsf5Tdr9PqRyIN6hnCioFJMScNej1sqybjT9qeE43VVg4JY rSTplVfaPvw+61ukdXC8SKcJniQGzCWAn0bL7B9Ij7rltN//UjlYtV1N30dvYdpD 6c5+kQbp0CcS/wHGz01VwUFYPCde3wLpbZNcBO39/rriCsGjCoN97moAM5A6HtWk EYYXmByFrhbxjoQPiX/lqrJqVDRwCmGUcWdiv88qaZwlmKWgEUJEGpAROTGpBXWV DoWEQH5U7te59A/FPTcIAAb2zayNEvDfYqUuR/uwGppQ4cnCC6YX4jKJuKNWuuJe 2pYim+2jDZGggG/XGtmNYJY97JprQGjGw3XkMcnQadTrKcMZNL9BnDVOEhubQfVy dRQnq1vm1ObAW73xM38Sej2xL/llOOdkqr3icVenW31J02+RNf8Iu9gdxuXrls8P 3daaNZmlzPcgLVkKuOpprnpnCMd2z/RdiEQRhRO/jyj1HqB43KAauM+OPxh1Eq/a ez2/I4amw7p+nZzHPy5YZ6kdjuY59qTehAhYPZY+CD7qQ0n0JYhCw9cQ43isVXYq QnfY8fFvtOnc9Q6XuOdRz2BpmJwMD2mqq2GVlcOklvJcXyhnPV4= =c7Q2 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org