CONFIDENTIAL & RESTRICTED AFAIK catalina.out is just written by redirecting Tomcat's stdout to that file. So if you run Tomcat from any kind of wrapper such as jsvc, what is this going to do to Tomcat's stdout?
See 'Considerations for production usage' on this page: https://tomcat.apache.org/tomcat-9.0-doc/logging.html#Considerations_for_production_usage As it also states that you end up with two copies of the same messages, you should not be really missing stuff but finding it in a different location. Hiran -----Original Message----- From: Paul Chauvet <chauv...@newpaltz.edu> Sent: Thursday, August 11, 2022 20:25 To: users@tomcat.apache.org Subject: Re: Issue with catalina.out not being generated (RHEL 7.9, tomcat 9.0.63) CAUTION: External mail. Be careful with links and attachments. Hi Chris, I honestly don't care if they are in catalina.out, /var/log/messages, or a file named 'awesomestuff.log' - I just know that things are MISSING. Let me be more specific - sorry if I'm not being clear here! Normal operation (running via systemd) - I get Tomcat startup/shutdown, and some other info in catalina-YYYY-MM-DD.log. I don't get the debug information for opensaml. When I start via startup.sh directly - a lot more is being logged to catalina.out than anywhere else I have been able to find. I tried starting Tomcat without using systemd by just doing the following - but still no catalina.out. /opt/tomcat/latest/bin/jsvc \ -Dcatalina.home=${CATALINA_HOME} \ -Dcatalina.base=${CATALINA_BASE} \ -Djava.awt.headless=true \ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ -Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties \ -Dlog4j2.FormatMsgNoLookups=true \ -cp ${CATALINA_HOME}/bin/commons-daemon.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar \ -pidfile ${CATALINA_PID} \ -java-home ${JAVA_HOME} \ -user tomcat \ $CATALINA_OPTS \ org.apache.catalina.startup.Bootstrap I ended up temporarily just starting via startup.sh just long enough to get the error logs I was looking for into catalina.out - then started it up again normally. Sorry to bother everyone with this - but I appreciate your assistance! ________________________________ From: Christopher Schultz <ch...@christopherschultz.net> Sent: Thursday, August 11, 2022 1:34 PM To: users@tomcat.apache.org <users@tomcat.apache.org> Subject: Re: Issue with catalina.out not being generated (RHEL 7.9, tomcat 9.0.63) CAUTION: Message from a non-New Paltz email server. Treat message, links, and attachments with extra caution. Paul, On 8/11/22 13:03, Paul Chauvet wrote: > Hi Noelette, > > Thanks for the reponse! > > It logs to catalina-YYYY-MM-DD.log, localhost.YY-MM-DD.log, > localhost_access_log.YYYY-MM-DD.txt - but it doesn't use catalina.out. > > When I temporarily started Tomcat via startup.sh it did create catalina.out > (and start logging the things that it wasn't logging into the other files, > /var/log/messages, or the systemd journal). > > I'll see if I can get my setup (at least temporarily) working with startup.sh. OH... you might just be misunderstanding what's happening. When you use catalina.sh start (or startup.sh), that script just does this: java [stuff] > ${CATALINA_BASE}/logs/catalina.out 2>&1 When you run with jsvc, it includes some built-in file-rotation and so catalina-[date].log is the same thing. Are you irritated that you can't read the logs, or are you irritated that the log file isn't specifically "catalina.out"? -chris > ________________________________ > From: Noelette Stout <noelettest...@isu.edu> > Sent: Thursday, August 11, 2022 12:35 PM > To: Tomcat Users List <users@tomcat.apache.org> > Subject: Re: Issue with catalina.out not being generated (RHEL 7.9, > tomcat 9.0.63) > > CAUTION: Message from a non-New Paltz email server. Treat message, links, and > attachments with extra caution. > > > We use systemd with jsvc and our tomcat instances write to > $CATALINA_BASE/logs by default. > > On Thu, Aug 11, 2022 at 10:10 AM Paul Chauvet <chauv...@newpaltz.edu> wrote: > >> Hello all, >> >> I haven't been able to figure this out - but a catalina.out file is >> not being generated for me. Sadly - I'm trying to troubleshoot an >> issue (with a vendor's saml implementation) which wants to write to >> that file (and doesn't seem to be writing what I need to >> catalina.YYYY-DD-MM.logs, /var/log/messages, or into the journal as >> seen by "journalctl --unit=tomcat.service"). >> >> >> My environment: >> >> * RHEL 7.9 (though the same happens on my RHEL 8 hosts) >> * Tomcat 9.0.63 (installed from the .tar.gz download from >> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftomcat.apache.org%2Fdownload-90.cgi&data=05%7C01%7C%7C635493c75456451807a508da7bc6d8da%7Cb3f4f7c272ce4192aba4d6c7719b5766%7C0%7C0%7C637958391211683913%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Vs0iZcNhDspIW1INGR8uI7wlXUdpA4ib67vhVolc5e8%3D&reserved=0 >> - not from the OS repository) >> * Using jsvc via a systemd startup script to start Tomcat (that script >> is at the bottom of this message). >> >> I've tried specifying CATALINA_OUT in setenv.sh, and in my systemd >> startup script. I've temporarily disabled SELinux to see if that >> makes a difference. Neither of those work. What does work, though I >> would like to avoid it, is if I start Tomcat via ./startup.sh. If I >> do that - catalina.out is generated but I'm not getting other >> settings I set in my systemd script (or having it tied to startup/shutdown >> of the OS). >> >> I don't know what I'm missing or doing wrong here, or if there's >> something about jsvc that is an issue here that I can't figure out. >> I've been unable to find anything related to this (lots of posts >> about catalina.out related to operating system distributed versions >> of Tomcat that don't appear to apply). >> >> Any advice here would be greatly appreciated! >> >> My systemd startup script is below. >> >> >> [Unit] >> Description=Apache Tomcat Web Application Container >> After=syslog.target network.target >> >> [Service] >> Type=forking >> PIDFile=/var/run/tomcat.pid >> UMask=0007 >> >> # Tomcat variables >> Environment='JAVA_HOME=/usr/lib/jvm/java-openjdk' >> Environment='CATALINA_PID=/var/run/tomcat.pid' >> Environment='CATALINA_HOME=/opt/tomcat/latest' >> Environment='CATALINA_BASE=/opt/tomcat/latest' >> Environment='CATALINA_OPTS=-Xms512M -Xmx2048M -XX:+UseParallelGC -server' >> Environment='CATALINA_OUT=/var/log/tomcat/catalina.out' >> >> # Needed to make use of Tomcat Native Library >> Environment='LD_LIBRARY_PATH=/opt/tomcat/latest/lib' >> >> ExecStart=/opt/tomcat/latest/bin/jsvc \ >> -Dcatalina.home=${CATALINA_HOME} \ >> -Dcatalina.base=${CATALINA_BASE} \ >> -Djava.awt.headless=true \ >> >> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ >> >> -Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties \ >> -Dlog4j2.FormatMsgNoLookups=true \ >> -cp >> ${CATALINA_HOME}/bin/commons-daemon.jar:${CATALINA_HOME}/bin/bootstra >> p.jar:${CATALINA_HOME}/bin/tomcat-juli.jar >> \ >> -pidfile ${CATALINA_PID} \ >> -java-home ${JAVA_HOME} \ >> -user tomcat \ >> $CATALINA_OPTS \ >> org.apache.catalina.startup.Bootstrap >> >> ExecStop=/opt/tomcat/latest/bin/jsvc \ >> -pidfile ${CATALINA_PID} \ >> -stop \ >> org.apache.catalina.startup.Bootstrap >> >> [Install] >> WantedBy=multi-user.target >> >> >> >> >> >> >> >> Paul Chauvet, CISSP >> >> Information Security Officer >> >> State University of New York at New Paltz >> >> chauv...@newpaltz.edu >> >> > > -- > Noelette Stout > ITS Enterprise Applications - Senior Application Administrator Idaho > State University > E-mail: stounoel "at" isu "dot" edu > Desk: 208-282-2554 > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org IMPORTANT - CONFIDENTIALITY NOTICE - This e-mail is intended only for the use of the individual or entity shown above as addressees . It may contain information which is privileged, confidential or otherwise protected from disclosure under applicable laws . If the reader of this transmission is not the intended recipient, you are hereby notified that any dissemination, printing, distribution, copying, disclosure or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this transmission in error, please immediately notify us by reply e-mail or using the address below and delete the message and any attachments from your system. Amadeus Data Processing GmbH Geschaftsfuhrer: Sven Fuhrmeister Sitz der Gesellschaft: Erding HR Munchen 212770 Berghamer Strasse 6 85435 Erding Germany. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org