On 3/3/2020 2:45 PM, Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Jerry,
On 3/3/20 11:46, Jerry Malcolm wrote:
Where are the stdout and stderr log files written for tomcat in
AWS Linux?
Are you talking about a Tomcat installed from the package-manager
(yum), or one you installed yourself from an ASF distribution?
I installed Tomcat on AWS Linux2 EC2 instance using yum. I didn't do
any type of customization of the install. Basically out-of-the-box TC
8.5 via yum.
On windows, they are just part of the logs folder. But in AWS Linux
/var/log/Tomcat I get all of the other log files. But no
stdout/stderr.
On *NIX systems, this file is usually just called catalina.out
Most of the info is also in Catalina.out.
That's everything.
Thanks for the info. But I'm not seeing what you are describing.
I looked in context.xml for 'swallow output'. No reference to 'swallow
output' there.
I started looking for catalina.sh per Calder's suggestion. Apparently
this installation doesn't use a catalina.sh. Couldn't find it anywhere
in the EC2 instance.
When I run TC, I get sometimes a catalina.out in the log directory. At
the same time, I get a catalina.2020.03.09.out. When they are both
there, the dated version is always smaller. Never really paid much
attention to it. Now for some reason, catalina.out is not even
appearing in the log folder. catalina.2020.03.09.out contains all of the
TC startup stuff in it. But it does not have any of my
System.out.println(....) or System.err.println(....) output.
When I was looking for catalina.sh, I found a post on the web that
suggested running: "systemctl status tomcat.service -l" I ran that and
got a dump of the java startup command. But very strangely, after that,
it dumped all of my missing System.out and System.err println output.
Apparently, all of those println statements were being buffered
somewhere. But I have no clue what is going on.
If catalina.out stops disappearing and/or not appearing at all,
hopefully I can find the println output that I need there. But if
catalina.out continues to not be created, I guess I could run the
systemctl status command to see my output. But this it pretty convoluted.
I guess my real question now is what is causing catalina.out to not be
created (I've restarted TC several times). It used to be there. But
even when it was there for a while, I would notice it would disappear
kinda like a log-rotation thing. This may be some sort of linux
activity. But I still need guidance on what is going wrong. I need a
reliable way to see my System.out and System.err output. (I have another
tomcat installation on a separate EC2... It has a catalina.out with all
of System.out and System.err output. It also has a
catalina.2020.03.09.out that doesn't have my own println output.
How do I get catalina.out to be written?
Thanks.
Jerry
But just curious where stdout and stderr files have gone.
Away, because they really don't need to exist.
If you want them back, you can run jsvc and get separate streams.
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl5ewfAACgkQHPApP6U8
pFg+9Q//Zo0XB/QQF9//0F8DQtc86dBKrpkexM9LDvnyVRXluSQOze104oR2wiBs
jqHCwgwmXvvH4y7Q8lxCtUXlTFGqxcr6otZLjKUztlkb++gMYRtuj974WasTIJbI
4DPOJiuRQMQ4AlTQMXQB0sAbdjDzOiYP0Q1RjFRBgWoMS5JXgtv2SJFnHhonV8M8
/UfBwYUS0NoIYiPPshgPdu/LXVVZwyrjLOiV/4ngTtTMyBFvzI3zN7HwAdVEuMf5
JUz5fcvI7qR2sgAleRWn1cyYRNdsz37IqwMri363FZitCHRvCfp0h3hJBSukcbny
a53001IPrN/kU7exIrhO3TM5FvJExj+OsDXgeX6sOvS5roWKsnrXRqgbQxY3I65v
lcS+2al8nBn0wpv3kkTJ1wDNW+jTnN4GxA1WvGrXRPmbZG1+mmPl9iOr207MDWCO
GYr3sVe4EHxV8hFhR9AfcIJ5A7IjhcdkIlOhPAxdctUFWUS1KvHcX/Cb8cS6vPRe
79v/HlBw2QYB2M3N/8GgYFaKT44E0feQKRDTxmJogreVRyIcDUTkM8W2JN43Hmrb
Hdlr2h9b2enOhhCDnWJAjIIvXU70hHmmvJz3gyZduuKFrh2l9yau6ktp6wi6CgmG
6SoVSiWh0tEKskbYNNFElPkEKc/uxFu+qPnP3GwYlgieCjnDjNE=
=dukw
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org