Re: Rotating/archiving catalina.out
One option (hacky workaround) is to try using "swallowOutput" which may mitigate the worst of your issue. (Beyond a rewrite with a logging framework) https://tomcat.apache.org/tomcat-9.0-doc/config/context.html -Tim On Mon, Jan 29, 2024 at 3:28 PM Aryeh Friedman wrote: > We need to shrink the size of catalina.out but looking at the logging > documentation I do not see any way to do this with the standard > logging.properties (or else where). Due to the nature of the > production site we never bring it completely down unless we must (life > critical 24/7/365) > > Specifically we have a fair number of System.out.println's with > debugging information to it and we dumb stack traces into it also. > And without stopping and restarting tomcat we want to make it so there > is periodic rotation of catalina.out to some other file? (note stack > traces do go to the dated one but not the System.out.println's) > >
Re: Rotating/archiving catalina.out
On 2024/01/29 20:28:05 Aryeh Friedman wrote: > We need to shrink the size of catalina.out but looking at the logging > documentation I do not see any way to do this with the standard > logging.properties (or else where). Due to the nature of the > production site we never bring it completely down unless we must (life > critical 24/7/365) > > Specifically we have a fair number of System.out.println's with > debugging information to it and we dumb stack traces into it also. > And without stopping and restarting tomcat we want to make it so there > is periodic rotation of catalina.out to some other file? (note stack > traces do go to the dated one but not the System.out.println's) If you use the FreeBSD port, it will automatically use commons-daemon. JSVC does support SIGUSR1 with reopening logs: https://github.com/apache/commons-daemon/blob/6a95175ba875977a59fa4be2e99d80d2fa8d053a/src/native/unix/native/jsvc-unix.c#L124-L127 Then, you can use newsyslogd to rotate with SIGUSR1. This works for me for ages now: /usr/local/ldadocgen/prod/tomcat-1/logs/catalina.outldadocgen:ldadocgen 064030*@T00GBXP/var/run/tomcat_ldadocgen_prod_1.pid SIGUSR1 Michael - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Rotating/archiving catalina.out
Aryeh, On 1/29/24 15:28, Aryeh Friedman wrote: We need to shrink the size of catalina.out but looking at the logging documentation I do not see any way to do this with the standard logging.properties (or else where). Due to the nature of the production site we never bring it completely down unless we must (life critical 24/7/365) Specifically we have a fair number of System.out.println's with debugging information to it and we dumb stack traces into it also. And without stopping and restarting tomcat we want to make it so there is periodic rotation of catalina.out to some other file? (note stack traces do go to the dated one but not the System.out.println's) What OS is this? How do you launch Tomcat? When launched via command-line scripts, catalina.out is created using stdout redirection in the shell. There is not really any opportunity for rotation, there. Depending upon your environment, you may have some options. The best option is to stop using stdout. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Rotating/archiving catalina.out
We need to shrink the size of catalina.out but looking at the logging documentation I do not see any way to do this with the standard logging.properties (or else where). Due to the nature of the production site we never bring it completely down unless we must (life critical 24/7/365) Specifically we have a fair number of System.out.println's with debugging information to it and we dumb stack traces into it also. And without stopping and restarting tomcat we want to make it so there is periodic rotation of catalina.out to some other file? (note stack traces do go to the dated one but not the System.out.println's) -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Strange catalina.out not created issue
Thanks Chris, All I can do is recommend that to the team. It has to be something with how stuff is being started via suexec instead of doing direct su and then running the script. At leas that is what I think. Perhaps we can get them do some redirects of std-out and std-err to a log file when they run the scripts, so we can see what is happening. Thanks again. Dream * Excel * Explore * Inspire Jon McAlexander Senior Infrastructure Engineer Asst. Vice President He/His Middleware Product Engineering Enterprise CIO | EAS | Middleware | Infrastructure Solutions 8080 Cobblestone Rd | Urbandale, IA 50322 MAC: F4469-010 Tel 515-988-2508 | Cell 515-988-2508 jonmcalexan...@wellsfargo.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. > -Original Message- > From: Christopher Schultz > Sent: Monday, October 2, 2023 5:13 PM > To: users@tomcat.apache.org > Subject: Re: Strange catalina.out not created issue > > Jon, > > On 10/2/23 13:16, Mcalexander, Jon J. wrote: > > A little more info on this. The server rebooted last night and the > > auto-startup started the instance correctly, but the Catalina.out file > > was not created. It only appears to work properly if you log onto the > > server and su to the owner user, then run the stop and start scripts. > What does the suexec thing ultimately end up calling to launch Tomcat? > Does it call catalina.sh? What is the effective user-id at the time the > script is > invoked? > > Have you tried adding lots of debug logging to your script? > > -chris > > >> -Original Message- > >> From: Mcalexander, Jon J. > >> Sent: Monday, October 2, 2023 12:06 PM > >> To: users@tomcat.apache.org > >> Subject: Strange catalina.out not created issue > >> > >> Hi all, > >> It's me again with another issue that is probably obvious to y'all, > >> but I'm not seeing it. > >> We have Tomcat Instances on various services that if Tomcat is > >> started from the Command Line as the user that owns the Instance, > >> everything starts up properly and the catalina.out log file gets > >> created. However, if the restart is performed by a workflow that > >> calls the same scripts but via suexec, everything starts up properly > >> EXCEPT the catalina.out log file does NOT get created. Has anyone ran > >> into this before? Currently the instance is running on Tomcat 9.0.80. > >> > >> I don't have any log output to give you because ONLY the gc.log is > >> getting created when this happens. > >> > >> Thanks, > >> > >> Dream * Excel * Explore * Inspire > >> Jon McAlexander > >> Senior Infrastructure Engineer > >> Asst. Vice President > >> He/His > >> > >> Middleware Product Engineering > >> Enterprise CIO | EAS | Middleware | Infrastructure Solutions > >> > >> 8080 Cobblestone Rd | Urbandale, IA 50322 > >> MAC: F4469-010 > >> Tel 515-988-2508 | Cell 515-988-2508 > >> > >> > jonmcalexan...@wellsfargo.com<mailto:jonmcalexan...@wellsfargo.com> > >> This message may contain confidential and/or privileged information. > >> If you are not the addressee or authorized to receive this for the > >> addressee, you must not use, copy, disclose, or take any action based > >> on this message or any information herein. If you have received this > >> message in error, please advise the sender immediately by reply > >> e-mail and delete this message. Thank you for your cooperation. > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Strange catalina.out not created issue
Jon, On 10/2/23 13:16, Mcalexander, Jon J. wrote: A little more info on this. The server rebooted last night and the auto-startup started the instance correctly, but the Catalina.out file was not created. It only appears to work properly if you log onto the server and su to the owner user, then run the stop and start scripts. What does the suexec thing ultimately end up calling to launch Tomcat? Does it call catalina.sh? What is the effective user-id at the time the script is invoked? Have you tried adding lots of debug logging to your script? -chris -Original Message- From: Mcalexander, Jon J. Sent: Monday, October 2, 2023 12:06 PM To: users@tomcat.apache.org Subject: Strange catalina.out not created issue Hi all, It's me again with another issue that is probably obvious to y'all, but I'm not seeing it. We have Tomcat Instances on various services that if Tomcat is started from the Command Line as the user that owns the Instance, everything starts up properly and the catalina.out log file gets created. However, if the restart is performed by a workflow that calls the same scripts but via suexec, everything starts up properly EXCEPT the catalina.out log file does NOT get created. Has anyone ran into this before? Currently the instance is running on Tomcat 9.0.80. I don't have any log output to give you because ONLY the gc.log is getting created when this happens. Thanks, Dream * Excel * Explore * Inspire Jon McAlexander Senior Infrastructure Engineer Asst. Vice President He/His Middleware Product Engineering Enterprise CIO | EAS | Middleware | Infrastructure Solutions 8080 Cobblestone Rd | Urbandale, IA 50322 MAC: F4469-010 Tel 515-988-2508 | Cell 515-988-2508 jonmcalexan...@wellsfargo.com<mailto:jonmcalexan...@wellsfargo.com> This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Strange catalina.out not created issue
A little more info on this. The server rebooted last night and the auto-startup started the instance correctly, but the Catalina.out file was not created. It only appears to work properly if you log onto the server and su to the owner user, then run the stop and start scripts. Thanks, Dream * Excel * Explore * Inspire Jon McAlexander Senior Infrastructure Engineer Asst. Vice President He/His Middleware Product Engineering Enterprise CIO | EAS | Middleware | Infrastructure Solutions 8080 Cobblestone Rd | Urbandale, IA 50322 MAC: F4469-010 Tel 515-988-2508 | Cell 515-988-2508 jonmcalexan...@wellsfargo.com This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. > -Original Message- > From: Mcalexander, Jon J. > Sent: Monday, October 2, 2023 12:06 PM > To: users@tomcat.apache.org > Subject: Strange catalina.out not created issue > > Hi all, > It's me again with another issue that is probably obvious to y'all, but I'm > not > seeing it. > We have Tomcat Instances on various services that if Tomcat is started from > the Command Line as the user that owns the Instance, everything starts up > properly and the catalina.out log file gets created. However, if the restart > is > performed by a workflow that calls the same scripts but via suexec, > everything starts up properly EXCEPT the catalina.out log file does NOT get > created. Has anyone ran into this before? Currently the instance is running > on Tomcat 9.0.80. > > I don't have any log output to give you because ONLY the gc.log is getting > created when this happens. > > Thanks, > > Dream * Excel * Explore * Inspire > Jon McAlexander > Senior Infrastructure Engineer > Asst. Vice President > He/His > > Middleware Product Engineering > Enterprise CIO | EAS | Middleware | Infrastructure Solutions > > 8080 Cobblestone Rd | Urbandale, IA 50322 > MAC: F4469-010 > Tel 515-988-2508 | Cell 515-988-2508 > > jonmcalexan...@wellsfargo.com<mailto:jonmcalexan...@wellsfargo.com> > This message may contain confidential and/or privileged information. If you > are not the addressee or authorized to receive this for the addressee, you > must not use, copy, disclose, or take any action based on this message or any > information herein. If you have received this message in error, please advise > the sender immediately by reply e-mail and delete this message. Thank you > for your cooperation. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Strange catalina.out not created issue
Hi all, It's me again with another issue that is probably obvious to y'all, but I'm not seeing it. We have Tomcat Instances on various services that if Tomcat is started from the Command Line as the user that owns the Instance, everything starts up properly and the catalina.out log file gets created. However, if the restart is performed by a workflow that calls the same scripts but via suexec, everything starts up properly EXCEPT the catalina.out log file does NOT get created. Has anyone ran into this before? Currently the instance is running on Tomcat 9.0.80. I don't have any log output to give you because ONLY the gc.log is getting created when this happens. Thanks, Dream * Excel * Explore * Inspire Jon McAlexander Senior Infrastructure Engineer Asst. Vice President He/His Middleware Product Engineering Enterprise CIO | EAS | Middleware | Infrastructure Solutions 8080 Cobblestone Rd | Urbandale, IA 50322 MAC: F4469-010 Tel 515-988-2508 | Cell 515-988-2508 jonmcalexan...@wellsfargo.com<mailto:jonmcalexan...@wellsfargo.com> This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.
Re: Tomcat webserver is not logging any DEBUG or FINEST logs in catalina.out even after enabling FINEST in logging.proprties file(tomcat-8.5.79/conf/)
чт, 15 июн. 2023 г. в 13:27, Thomson Waghmare : > > I am facing an issue in Linux server that webserver service is restarting > automatically frequently. I tried to enable debug logs by changing the all > logging properties in tomcat-8.5.79/conf/logging.proprties. But I see only > INFO logs but no FINE or FINER or FINEST logs. > > *logging.properties* > > java.util.logging.ConsoleHandler.level = FINE > java.util.logging.ConsoleHandler.formatter = > org.apache.juli.OneLineFormatter > java.util.logging.ConsoleHandler.encoding = UTF-8 The "level" setting on Handlers is a filter. It filters what log messages are printed by this specific handler. But it does not affect the generation of those messages. Generation of messages is configured at a logger, using the name of a logger category and ".level" suffix. The logger categories are a hierarchy, with levels delimited by a dot. The root of the hierarchy has the name of an empty string ("") and its logging level is configured by default as .level = INFO (with a leading dot) See java.util.logging documentation and tutorials for details. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat webserver is not logging any DEBUG or FINEST logs in catalina.out even after enabling FINEST in logging.proprties file(tomcat-8.5.79/conf/)
On 15/06/2023 11:26, Thomson Waghmare wrote: I am facing an issue in Linux server that webserver service is restarting automatically frequently. I tried to enable debug logs by changing the all logging properties in tomcat-8.5.79/conf/logging.proprties. But I see only INFO logs but no FINE or FINER or FINEST logs. For Tomcat: DEBUG = FINE TRACE = FINEST You shouldn't need to change the handler configurations. Changing these only impact the container (web application) loggers. org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINEST org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = FINEST org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = FINEST If you want to impact debug logging for Tomcat's internals try something like: org.apache.catalina.core.level=ALL Be careful. Debug logging tends to impact performance. # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x7fe638000368, pid=54728, tid=0x7fe625309700 # # JRE version: Java(TM) SE Runtime Environment (8.0_333-b31) (build 1.8.0_333-b31) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.333-b31 mixed mode linux-amd64 compressed oops) # Problematic frame: # C 0x7fe638000368 # # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /tmp/hs_err_pid54728.log Debug logging probably isn't going to help debugging this issue. You want to look at that log file for the details. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat webserver is not logging any DEBUG or FINEST logs in catalina.out even after enabling FINEST in logging.proprties file(tomcat-8.5.79/conf/)
I am facing an issue in Linux server that webserver service is restarting automatically frequently. I tried to enable debug logs by changing the all logging properties in tomcat-8.5.79/conf/logging.proprties. But I see only INFO logs but no FINE or FINER or FINEST logs. *logging.properties* 1catalina.org.apache.juli.AsyncFileHandler.level = FINEST 1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs 1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina. 1catalina.org.apache.juli.AsyncFileHandler.encoding = UTF-8 2localhost.org.apache.juli.AsyncFileHandler.level = FINEST 2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs 2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost. 2localhost.org.apache.juli.AsyncFileHandler.encoding = UTF-8 3manager.org.apache.juli.AsyncFileHandler.level = FINEST 3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs 3manager.org.apache.juli.AsyncFileHandler.prefix = manager. 3manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8 4host-manager.org.apache.juli.AsyncFileHandler.level = FINEST 4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs 4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager. 4host-manager.org.apache.juli.AsyncFileHandler.encoding = UTF-8 java.util.logging.ConsoleHandler.level = FINE java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter java.util.logging.ConsoleHandler.encoding = UTF-8 # Facility specific properties. # Provides extra control for each logger. org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINEST org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = FINEST org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = FINEST org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler *catalina.out* # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x7fe638000368, pid=54728, tid=0x7fe625309700 # # JRE version: Java(TM) SE Runtime Environment (8.0_333-b31) (build 1.8.0_333-b31) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.333-b31 mixed mode linux-amd64 compressed oops) # Problematic frame: # C 0x7fe638000368 # # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /tmp/hs_err_pid54728.log [thread 140626492360448 also had an error] [thread 140626582980352 also had an error][thread 140626573510400 also had an error][thread 140626420045568 also had an error][thread 140626442094336 also had an error] [thread 140626437883648 also had an error] [thread 140626548127488 also had an error][thread 140626414782208 also had an error][thread 140626567083776 also had an error] # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # Jun 01, 2023 9:49:00 AM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server} Setting property 'command' to 'SHUTDOWN' did not find a matching property. Jun 01, 2023 9:49:00 AM org.apache.catalina.mbeans.AbcGlobalResourcesLifecycleListener INFO: AbcUserDatabaseMbean descriptor loaded Jun 01, 2023 9:49:00 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version name: Apache Tomcat Jun 01, 2023 9:49:00 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server built: May 16 2022 15:36:23 UTC Jun 01, 2023 9:49:00 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version number: 0.0.0.0 Jun 01, 2023 9:49:00 AM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Name: Linux Jun 01, 2023 9:49:00 AM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Version:3.10.0-1160.80.1.el7.x86_64 Jun 01, 2023 9:49:00 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Architecture: amd
Re: catalina.out, was Re: Connector definitions
On 3/8/23 4:06 PM, Christopher Schultz wrote: SOP for systemd is to redirect stdout/stderr for the process into its own logs similar to syslog (but different, of course, because #systemd). This could also happen on Linux is you are using "jsvc" to launch Tomcat. If you use the standard shell scripts to launch Tomcat, you'll get stdout/stderr redirected to catalina.out and it will grow indefinitely. If you use jsvc, you get log-file rotation out of the box. Instead of one giant catalina.out file, you'll get daily catalina-stdout.txt and catalina-stderr.txt files. I'm not sure why you have a zero-length catalina.out in those circumstances. Thank you very much. Especially given that I had no practical reason for knowing the answer, and had asked purely out of morbid curiosity. -- JHHL - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: catalina.out, was Re: Connector definitions
James, On 3/8/23 17:05, James H. H. Lampert wrote: On 3/8/23 1:34 PM, Zerro wrote: On the Linux box Tomcat is probably started by systemd, therefore no catalina.out Very likely, but can you elaborate on that? I'm much more of a DOS (to the point of having gone to great lengths to set up a refurbished vintage notebook as a functioning DOSbook) and OS/400 person. SOP for systemd is to redirect stdout/stderr for the process into its own logs similar to syslog (but different, of course, because #systemd). This could also happen on Linux is you are using "jsvc" to launch Tomcat. If you use the standard shell scripts to launch Tomcat, you'll get stdout/stderr redirected to catalina.out and it will grow indefinitely. If you use jsvc, you get log-file rotation out of the box. Instead of one giant catalina.out file, you'll get daily catalina-stdout.txt and catalina-stderr.txt files. I'm not sure why you have a zero-length catalina.out in those circumstances. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: catalina.out, was Re: Connector definitions
On 3/8/23 1:34 PM, Zerro wrote: On the Linux box Tomcat is probably started by systemd, therefore no catalina.out Very likely, but can you elaborate on that? I'm much more of a DOS (to the point of having gone to great lengths to set up a refurbished vintage notebook as a functioning DOSbook) and OS/400 person. -- JHHL - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: catalina.out, was Re: Connector definitions
On 3/8/23 20:54, James H. H. Lampert wrote: On 3/8/23 11:35 AM, Mark Thomas wrote: Check logging.properties and/or how you have stdout redirected in your start-up scripts. Thanks. All I see different in logging.properties is that on the Midrange box (installed from the ZIP file from Apache's Tomcat site), it has "catalina.org.apache.juli.AsyncFileHandler.maxDays = 90" clauses, whereas on the cloud Linux (probably installed with yum or apt), it doesn't. And if (adopting root authority) I do a "find -name catalina.sh" or a "find -name startup.sh" on a cloud Linux box, I find *nothing.* Which is remarkable in itself. Not that it's of more than academic interest. -- JHHL On the Linux box Tomcat is probably started by systemd, therefore no catalina.out ~Z - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: catalina.out, was Re: Connector definitions
On 3/8/23 13:47, Rob Sargent wrote: On 3/8/23 12:54, James H. H. Lampert wrote: On 3/8/23 11:35 AM, Mark Thomas wrote: Check logging.properties and/or how you have stdout redirected in your start-up scripts. Thanks. All I see different in logging.properties is that on the Midrange box (installed from the ZIP file from Apache's Tomcat site), it has "catalina.org.apache.juli.AsyncFileHandler.maxDays = 90" clauses, whereas on the cloud Linux (probably installed with yum or apt), it doesn't. And if (adopting root authority) I do a "find -name catalina.sh" or a "find -name startup.sh" on a cloud Linux box, I find *nothing.* Which is remarkable in itself. Assuming you're starting in the right place, try "find-name catalina.\*" "find -name" of course - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: catalina.out, was Re: Connector definitions
On 3/8/23 12:54, James H. H. Lampert wrote: On 3/8/23 11:35 AM, Mark Thomas wrote: Check logging.properties and/or how you have stdout redirected in your start-up scripts. Thanks. All I see different in logging.properties is that on the Midrange box (installed from the ZIP file from Apache's Tomcat site), it has "catalina.org.apache.juli.AsyncFileHandler.maxDays = 90" clauses, whereas on the cloud Linux (probably installed with yum or apt), it doesn't. And if (adopting root authority) I do a "find -name catalina.sh" or a "find -name startup.sh" on a cloud Linux box, I find *nothing.* Which is remarkable in itself. Assuming you're starting in the right place, try "find-name catalina.\*" Not that it's of more than academic interest. -- JHHL - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
catalina.out, was Re: Connector definitions
On 3/8/23 11:35 AM, Mark Thomas wrote: Check logging.properties and/or how you have stdout redirected in your start-up scripts. Thanks. All I see different in logging.properties is that on the Midrange box (installed from the ZIP file from Apache's Tomcat site), it has "catalina.org.apache.juli.AsyncFileHandler.maxDays = 90" clauses, whereas on the cloud Linux (probably installed with yum or apt), it doesn't. And if (adopting root authority) I do a "find -name catalina.sh" or a "find -name startup.sh" on a cloud Linux box, I find *nothing.* Which is remarkable in itself. Not that it's of more than academic interest. -- JHHL - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Issue with catalina.out not being generated (RHEL 7.9, tomcat 9.0.63)
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 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--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 Sent: Thursday, August 11, 2022 1:34 PM To: 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--MM-DD.log, localhost.YY-MM-DD.log, > localhost_access_log.-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 > Sent: Thursday, August 11, 2022 12:35 PM > To: Tomcat Users List > 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 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.-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 >> http
Re: Issue with catalina.out not being generated (RHEL 7.9, tomcat 9.0.63)
Hi Noelette, Definitely not a dumb question. Trust me - I've missed obvious things before. In this case though - Tomcat is definitely starting fine via systemd and has been running without issue (through various upgrades from 8.5.x and through 9.0.x versions, though I still need to upgrade to 9.0.64). Everything's working fine - except the catalina.out logging for opensaml (which we're trying to troubleshoot as we move from CAS to SAML for authentication - but without the logs for the saml issues the vendor couldn't assist). Now that I have those debug logs - it's in that vendor's hands as to find out what's wrong 🙂. I will look at the daemon startup method you list though - thank you! Paul Chauvet, CISSP Information Security Officer State University of New York at New Paltz chauv...@newpaltz.edu [cid:aaa5e02a-2ded-4434-b7d6-c140c723291e] Keep on a lookout for fraudulent emails! For examples reported to us - see the "New Paltz PhishBowl<https://www.newpaltz.edu/phishbowl>" From: Noelette Stout Sent: Thursday, August 11, 2022 2:52 PM To: Tomcat Users List 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. dumb question time -- Is tomcat actually starting up all the way when you run with systemd? One of the things that I ran into with tomcat and systemd was that the default service start timeout was not enough time for tomcat to start. Also, I'm not starting tomcat by calling jsvc directly; I'm using the daemon.sh script. Here's what one of my tomcat unit files looks like: [Unit] Description= CAS server (Tomcat) After=syslog.target network-online.target [Service] Type=forking User=tomcat Group=tomcat Environment=CATALINA_HOME=/var/local/tomcat/tomcat Environment=CATALINA_BASE=/var/local/tomcat/cas Environment=JAVA_HOME=/var/local/tomcat/java ExecStart=/var/local/tomcat/tomcat/bin/daemon.sh start ExecStop=/var/local/tomcat/tomcat/bin/daemon.sh stop RemainAfterExit=yes TimeoutSec=300 [Install] WantedBy=multi-user.target I also have a setenv.sh file in $CATALINA_BASE/bin with this (yes, it's a little redundant): export JAVA_HOME="/var/local/tomcat/java" export CATALINA_HOME="/var/local/tomcat/tomcat" export CATALINA_BASE="/var/local/tomcat/cas" CATALINA_PID="$CATALINA_BASE/logs/tomcat.pid" CATALINA_OPTS="-server -Xmx512m -Dlog4j2.formatMsgNoLookups=true" SERVICE_START_WAIT_TIME=300 I always get a catalina-daemon.out file when starting this way. On Thu, Aug 11, 2022 at 12:25 PM Paul Chauvet wrote: > 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--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 > Sent: Thursday, August 11, 2022 1:34 PM > To: 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 Noelet
Re: Issue with catalina.out not being generated (RHEL 7.9, tomcat 9.0.63)
dumb question time -- Is tomcat actually starting up all the way when you run with systemd? One of the things that I ran into with tomcat and systemd was that the default service start timeout was not enough time for tomcat to start. Also, I'm not starting tomcat by calling jsvc directly; I'm using the daemon.sh script. Here's what one of my tomcat unit files looks like: [Unit] Description= CAS server (Tomcat) After=syslog.target network-online.target [Service] Type=forking User=tomcat Group=tomcat Environment=CATALINA_HOME=/var/local/tomcat/tomcat Environment=CATALINA_BASE=/var/local/tomcat/cas Environment=JAVA_HOME=/var/local/tomcat/java ExecStart=/var/local/tomcat/tomcat/bin/daemon.sh start ExecStop=/var/local/tomcat/tomcat/bin/daemon.sh stop RemainAfterExit=yes TimeoutSec=300 [Install] WantedBy=multi-user.target I also have a setenv.sh file in $CATALINA_BASE/bin with this (yes, it's a little redundant): export JAVA_HOME="/var/local/tomcat/java" export CATALINA_HOME="/var/local/tomcat/tomcat" export CATALINA_BASE="/var/local/tomcat/cas" CATALINA_PID="$CATALINA_BASE/logs/tomcat.pid" CATALINA_OPTS="-server -Xmx512m -Dlog4j2.formatMsgNoLookups=true" SERVICE_START_WAIT_TIME=300 I always get a catalina-daemon.out file when starting this way. On Thu, Aug 11, 2022 at 12:25 PM Paul Chauvet wrote: > 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--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 > Sent: Thursday, August 11, 2022 1:34 PM > To: 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--MM-DD.log, localhost.YY-MM-DD.log, > localhost_access_log.-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 > > Sent: Thursday, August 11, 2022 12:35 PM > > To: Tomcat Users List > > Subject: Re: Issue with catalina.out not being generated (RHEL 7.9, > tomcat 9.0.63) > > > > CAUTIO
Re: Issue with catalina.out not being generated (RHEL 7.9, tomcat 9.0.63)
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--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 Sent: Thursday, August 11, 2022 1:34 PM To: 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--MM-DD.log, localhost.YY-MM-DD.log, > localhost_access_log.-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 > Sent: Thursday, August 11, 2022 12:35 PM > To: Tomcat Users List > 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 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.-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://tomcat.apache.org/download-90.cgi - 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 >> a
Re: Issue with catalina.out not being generated (RHEL 7.9, tomcat 9.0.63)
Paul, On 8/11/22 13:03, Paul Chauvet wrote: Hi Noelette, Thanks for the reponse! It logs to catalina--MM-DD.log, localhost.YY-MM-DD.log, localhost_access_log.-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 Sent: Thursday, August 11, 2022 12:35 PM To: Tomcat Users List 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 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.-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://tomcat.apache.org/download-90.cgi - 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/bootstrap.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
Re: Issue with catalina.out not being generated (RHEL 7.9, tomcat 9.0.63)
Hi Noelette, Thanks for the reponse! It logs to catalina--MM-DD.log, localhost.YY-MM-DD.log, localhost_access_log.-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. From: Noelette Stout Sent: Thursday, August 11, 2022 12:35 PM To: Tomcat Users List 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 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.-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://tomcat.apache.org/download-90.cgi - 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/bootstrap.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
Re: Issue with catalina.out not being generated (RHEL 7.9, tomcat 9.0.63)
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 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.-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://tomcat.apache.org/download-90.cgi - 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/bootstrap.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
Re: Issue with catalina.out not being generated (RHEL 7.9, tomcat 9.0.63)
Paul, On 8/11/22 12:09, Paul Chauvet 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.-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://tomcat.apache.org/download-90.cgi - not from the OS repository) * Using jsvc via a systemd startup script to start Tomcat (that script is at the bottom of this message). Typically, systemd captures stdout/stderr and sends it to journald or whatever. Writing to log files is apparently too quaint. 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). It seems that you are just resisting doing things the Systemd Way. Have you tried poking-around with journalctl to see if you can get the logs? If "catalina.sh start/run" works for you, then the issue lies with your systemd configuration/environment. -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Issue with catalina.out not being generated (RHEL 7.9, tomcat 9.0.63)
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.-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://tomcat.apache.org/download-90.cgi - 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/bootstrap.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
Re: Odd messages in catalina.out
James, On 12/10/21 11:52, James H. H. Lampert wrote: On 12/10/21 8:38 AM, Mark Thomas wrote: . . . The messages are there to warn you that you might have a malicious actor trying a brute force attack on your server. Can anybody point me to a good tutorial for constructing a regular expression for RemoteAddrValve? allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" obviously can't work for a server that's incapable of running a browser Anything can be a "browser" such as curl (a real HTTP client), telnet, nc, or openssl s_client. No GUI is required; only an available network connection. and at any rate, I can't make head or tail of the regular expression syntax in use here. The regular expression is pretty simple: Tomcat checks that the client's IP address "matches" the regular expression. In the expression above, the | characters separate alternatives: any of them could match, separately. The \ characters are escapes, turning a "." (which usually means "any character") into a literal dot. So this doesn't match if the client's IP address is (improbably) "127a1b1c1d1" but only matches legitimate (for now[1]) "local" 127.x.y.z IPv4 addresses. The addresses ::1 and 0:0:0:0:0:0:0:1 are aliases of each other and mean "localhost". So the pattern above says "anyone local matches this." Note that it's vitally important that if you have any reverse-proxies in front of Tomcat that the client's *real* IP address is being forwarded to Tomcat in a secure way. Otherwise, if you maybe had e.g. httpd running on the same host as Tomcat, all requests might look like they were coming "from" localhost instead of random.your.isp.net. Hope that helps, -chris [1] https://www.ietf.org/id/draft-schoen-intarea-unicast-127-00.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Odd messages in catalina.out
On 12/10/21 8:38 AM, Mark Thomas wrote: . . . The messages are there to warn you that you might have a malicious actor trying a brute force attack on your server. Can anybody point me to a good tutorial for constructing a regular expression for RemoteAddrValve? allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" obviously can't work for a server that's incapable of running a browser, and at any rate, I can't make head or tail of the regular expression syntax in use here. -- JHHL - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Odd messages in catalina.out
On 10/12/2021 16:25, James H. H. Lampert wrote: Could anybody here shed some light on this message? A whole bunch of them appeared in catalina.out. WARNING [https-jsse-nio-443-exec-29] org.apache.catalina.realm.LockOutRealm.filterLockedAccounts An attempt was made to authenticate the locked user [user] Someone has got their authentication credentials wrong too many times in a row and the LockOutRealm has locked them out. They need to stop trying for 5 minutes (by default) and then try again with the correct password. The user will have no idea what is going on as the response for "wrong password" and "locked user" is identical. The messages are there to warn you that you might have a malicious actor trying a brute force attack on your server. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Odd messages in catalina.out
Could anybody here shed some light on this message? A whole bunch of them appeared in catalina.out. WARNING [https-jsse-nio-443-exec-29] org.apache.catalina.realm.LockOutRealm.filterLockedAccounts An attempt was made to authenticate the locked user [user] -- JHHL - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Coty, On 7/7/20 15:23, Coty Sutherland wrote: > > > With this kind of service (and, similarly, Coty Sutherland's work > @ >> RedHat), I might re-think my policy of always using the vanilla >> packages from Apache. >> >> It's *really* nice when the package-manager can do it all. >> > > It really is ;) So why it RHEL dumping the Tomcat packages? Is it really because they just want to cut-down on the size of the package repository? They are going to have a lot of angry corporate clients (which is, of course, the entire user base of RHEL). - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl8E8wYACgkQHPApP6U8 pFg8ZBAAxOTvjZT8x6x18sS/ff6j6C57coNPsLohkFolvnL7CbJKJLY2ImKGYBD2 rciR0aUvxaMcyg4pobNmI8Ru3LNeMy07piNH3ZdpG4x9F3E6VNRDVASQIwWjdHoX 30Na9QgZ12DmWAypfhss1FZ1vcVynnxZ6mVDYtils40gcTNzjxDrr8gqPQz+N3RU 8c4+pE87uWsGok9mQ++Eq6XjgJsWYb8h2VKCJFgApPG6qKJnjqdkqjk2SAaY8Mig YKkCyFlAs5pLsLRXAhLxbTiEn7AeCyP5n6eetqtkgj+R/P4Eej7i6vOSGor73VEb rod88R5ph36IhgQH+US+qnk+C9q0+/uve0fiP/gHbZP2i3zW4X8g4fkyRwB+KPRG WsDpWLALSoW0QZhKOtIZPya2EGhVb5gcXWzvFXkzDmRcap551ObYhc/Zq38AHPYj FMgz20HDTILOr1VkLK1RViAGY1w+Gj/+UHIPNS9iDD4LG1VDUw6hembwTBowLANc M2TYndPcu3yOIfncq7jOBMENHY42jGELxSfGaWg+WFXcuAbQLcdDGJYVeDH4yvVD cyZ3X+y/qK7mcYWuwdLKY15vM7EeJ3E2knQhQ/nlZpWXqIfvqzRseeqcSF38dyPc xIwM3lB5H0YtS/yhhaAc83ZqiWhWYLg0ZIbExDOI9whR4hWhyCQ= =5mPo -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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?
With this kind of service (and, similarly, Coty Sutherland's work @ > RedHat), I might re-think my policy of always using the vanilla > packages from Apache. > > It's *really* nice when the package-manager can do it all. > It really is ;)
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 à 03:33, Brian a écrit : > 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. 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 weird I fully agree, and I'll try do to something better. There is a way to write to catalina.out without using rsyslogd, it's possible to instruct systemd to write the process output directly to the file by overriding the StandardOutput directive of the service file: StandardOutput=file:/var/log/tomcat9/catalina.out This would go in a /etc/systemd/system/tomcat9.service.d/override.conf file for example. The downside is that you can no longer access the Tomcat output with 'journalctl -t tomcat9', nor see the last lines of the log when displaying the status with 'systemctl status tomcat9'. Ideally systemd should support writing to the journal and to a file simultaneously, with something like StandardOutput=journal+file:... If there is no other way to achieve the same result I'll file an enhancement request on systemd. Emmanuel Bourg - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Brian, On 6/23/20 21:33, Brian wrote: > > > -Original Message- From: Emmanuel Bourg > Reply-To: Tomcat Users List > Date: Tuesday, June 23, 2020 at 20:01 To: > "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
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?
-Original Message- From: Emmanuel Bourg Reply-To: Tomcat Users List Date: Tuesday, June 23, 2020 at 20:01 To: "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. 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. Thanks again! Brian
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 Emmanuel Bourg - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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?
-Original Message- From: Emmanuel Bourg Reply-To: Tomcat Users List Date: Tuesday, June 23, 2020 at 19:02 To: "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 23/06/2020 à 19:48, Brian a écrit : > It seems that rsyslogd is still unable to deal with "/var/log/tomcat9/catalina.out". > What could be wrong now? Do you have any ideas? I got the permissions wrong, the adm group is now allowed to write to /var/log/tomcat9 but not to enter it. Try 2770 instead of 2760. Emmanuel Bourg Hi Emmanuel, 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? Brian
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 23/06/2020 à 19:48, Brian a écrit : > It seems that rsyslogd is still unable to deal with > "/var/log/tomcat9/catalina.out". > What could be wrong now? Do you have any ideas? I got the permissions wrong, the adm group is now allowed to write to /var/log/tomcat9 but not to enter it. Try 2770 instead of 2760. Emmanuel Bourg - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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?
I did this on my 18.04 [temporary test] system and it now works (catalina.out is written to) (the "ls" commands were for visual inspection on progress) calder@ren: ~$ sudo service tomcat9 stop calder@ren: ~$ sudo -u tomcat -g adm touch /var/log/tomcat9/catalina.out calder@ren: ~$ ls -l /var/log/tomcat9/ [...] calder@ren: ~$ sudo chown tomcat9:syslog /var/log/tomcat9 -R calder@ren: ~$ sudo chown tomcat:syslog /var/log/tomcat9 -R calder@ren: ~$ sudo ls -l /var/log [...] calder@ren: ~$ sudo chmod g+rwx /var/log/tomcat9/ calder@ren: ~$ sudo chmod g+rw /var/log/tomcat9/ -R calder@ren: ~$ sudo chmod g+s /var/log/tomcat9/ -R calder@ren: ~$ sudo service rsyslog restart calder@ren: ~$ sudo service tomcat9 start calder@ren: ~$ ls -l /var/log/tomcat9/ [...] calder@ren: ~$ sudo ls -l /var/log/tomcat9/ -rw-rwS--- 1 tomcat syslog 26276 Jun 23 21:31 catalina.2020-06-23.log -rw-rwSr-- 1 tomcat syslog 4125 Jun 23 21:31 catalina.out -rw-rwS--- 1 tomcat syslog 0 Jun 23 19:51 localhost.2020-06-23.log -rw-rwS--- 1 tomcat syslog 1462 Jun 23 20:53 localhost_access_log.2020-06-23.txt calder@ren: ~$ sudo cat /var/log/tomcat9/catalina.out [2020-06-23 21:30:57] [info] Server version name: Apache Tomcat/9.0.31 (Ubuntu) [2020-06-23 21:30:57] [info] Server built: Feb 24 2020 22:37:00 UTC [2020-06-23 21:30:57] [info] Server version number: 9.0.31.0 [2020-06-23 21:30:57] [info] OS Name: Linux [2020-06-23 21:30:57] [info] OS Version:5.4.0-37-generic [2020-06-23 21:30:57] [info] Architecture: amd64 [2020-06-23 21:30:57] [info] Java Home: /usr/lib/jvm/java-11-openjdk-amd64 [2020-06-23 21:30:57] [info] JVM Version: 11.0.7+10-post-Ubuntu-3ubuntu1 [ . . . ] [2020-06-23 21:30:59] [info] Deployment of web application archive [/var/lib/tomcat9/webapps/ourtest.war] has finished in [1,563] ms [2020-06-23 21:31:00] [info] Starting ProtocolHandler ["http-nio-8080"] [2020-06-23 21:31:00] [info] Server startup in [2,549] milliseconds - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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?
-Original Message- From: Emmanuel Bourg Date: Monday, June 22, 2020 at 18:14 To: Tomcat Users List , Brian 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 22/06/2020 à 18:43, Brian a écrit : > I'm not really an expert with Linux. It would seem to me that the "adm" group (to which syslog seems to belong) lacks a write permission Indeed, rsyslog in Ubuntu runs as syslog:adm and needs special permissions to write to /var/log/tomcat9. This issue should be reported to Ubuntu. The tomcat9 package in Debian isn't affected by this issue because rsyslogd runs as root. > OK, I did it and the write permission was added to the adm group. I restarted Tomcat and it worked, the catalina.out file got created! However, after I restarted the whole Ubuntu, I discovered that the permissions went back to how there were (not write for adm). Why is that? The permissions on this directory are managed by systemd-tmpfiles. The tomcat9 package defines the expected permissions in /usr/lib/tmpfiles.d/tomcat9.conf and the permissions are enforced when the system starts. It's possible to override the default settings, you have to copy the configuration file to /etc/tmpfiles.d/ and change the permissions on /var/log/tomcat9 from 2750 to 2760: cp /usr/lib/tmpfiles.d/tomcat9.conf /etc/tmpfiles.d/ sed -i s/2750/2760/ /etc/tmpfiles.d/tomcat9.conf The write permissions for the adm group will then be persistent. Hi Emmanuel, Thanks a lot for your help, but unfortunately I think that something is still not working. I copied the file running the cp command, and then edited the created file to replace "2750" with "2760", then restarted Ubuntu But I still have the same problem, catalina.out never gets created. Then I tried editing the original file (/usr/lib/tmpfiles.d/tomcat9.conf) replacing "2750" with "2760", then restarted Ubuntu But I still have the same problem. I verified that the permissions stay correct, I mean giving write permission to the adm group after I restart Ubuntu, and that DOES work! When I perform a "ls -l /var/log/", this is what I see for the "tomcat9" directory: drwxrwS--- 3 tomcatadm4096 Jun 23 11:31 tomcat9 Finally, I checked the syslog and this is what I found: Jun 23 12:27:43 ip-172-31-92-155 systemd[1]: Starting Apache Tomcat 9 Web Application Server... Jun 23 12:27:43 ip-172-31-92-155 systemd[1]: Started Apache Tomcat 9 Web Application Server. Jun 23 12:27:43 ip-172-31-92-155 tomcat9[594]: NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED Jun 23 12:27:43 ip-172-31-92-155 rsyslogd: file '/var/log/tomcat9/catalina.out': open error: Permission denied [v8.2001.0 try https://www.rsyslog.com/e/2433 ] Jun 23 12:27:44 ip-172-31-92-155 tomcat9[594]: Jun 23, 2020 12:27:44 PM org.apache.catalina.startup.VersionLoggerListener log Jun 23 12:27:44 ip-172-31-92-155 tomcat9[594]: INFO: Server version name: Apache Tomcat/9.0.31 (Ubuntu) . It seems that rsyslogd is still unable to deal with "/var/log/tomcat9/catalina.out". What could be wrong now? Do you have any ideas? Brian Emmanuel Bourg - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Emmanuel, On 6/22/20 19:14, Emmanuel Bourg wrote: > Le 22/06/2020 à 18:43, Brian a écrit : > >> I'm not really an expert with Linux. It would seem to me that the >> "adm" group (to which syslog seems to belong) lacks a write >> permission > > Indeed, rsyslog in Ubuntu runs as syslog:adm and needs special > permissions to write to /var/log/tomcat9. This issue should be > reported to Ubuntu. > > The tomcat9 package in Debian isn't affected by this issue because > rsyslogd runs as root. > > >> OK, I did it and the write permission was added to the adm group. >> I restarted Tomcat and it worked, the catalina.out file got >> created! However, after I restarted the whole Ubuntu, I >> discovered that the permissions went back to how there were (not >> write for adm). Why is that? > > The permissions on this directory are managed by systemd-tmpfiles. > The tomcat9 package defines the expected permissions in > /usr/lib/tmpfiles.d/tomcat9.conf and the permissions are enforced > when the system starts. > > It's possible to override the default settings, you have to copy > the configuration file to /etc/tmpfiles.d/ and change the > permissions on /var/log/tomcat9 from 2750 to 2760: > > cp /usr/lib/tmpfiles.d/tomcat9.conf /etc/tmpfiles.d/ sed -i > s/2750/2760/ /etc/tmpfiles.d/tomcat9.conf > > The write permissions for the adm group will then be persistent. > > >> In any case, why is this permission required in my new VPS, if >> the old one lacks it and catalina.out works perfectly? > > I guess your older VPS had the tomcat8 package installed. The > tomcat9 package is different as it leverages several systemd > features to improve the security and the reliability. With this kind of service (and, similarly, Coty Sutherland's work @ RedHat), I might re-think my policy of always using the vanilla packages from Apache. It's *really* nice when the package-manager can do it all. - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl7yHp4ACgkQHPApP6U8 pFjrOg//akrAF8ZQlS2d5943zClVfwoddOW+I2clK7IYqJcu4LIIMm07v73aVVhe eAYLQLOZTXM6u3SHI4rsobGDO5QBb4wa0xxKEZFcq+pr809zzwvwd9gufuYfuNFj xa37zyzQzv0vuhfHZNYy6eUhThVS9eSPLu0vZQnLxNExoMiVM3BNMm0evYjQHwO2 97BtwhTP9IBPjRFLvzyKCmhcotNbqY+bnn5610k5+rgBz5A/Az/ZBLHOhOb5cjWZ 1L/Ue2P86WWl2/5Dqu4IVrN1TQldyr2RQtCbcWjR4LhTKZoBNc+vyhFu/LExfexy 18mvoUY7jNKTwoJ7CiC0p7iy6Se89DzNqUzlCqUC6/1P9pRi9oYDBmeEUEnjaQ7E tlw/GQbgALk8X+gq0hNMS9HOvlyZOZlN5iBS56cYFOje8iJrasDhxDcqWdhRqpsg F1S42eGVk37oBpnY7dZcf/SoAmp/vIesGZ5iVi9qKSLgLbmmKGZo2/C4OnyMVkdD +zMbcK6ClHCGK5lDVys0Hobc8gblLkUc2PY9yOxxD7Cyyml4hQ+0DzQYDbNwggAn BAuElpOUDyzjyHYkLD12IP8ZC3ZcSZA/MnR1hHU6pbAC4tXA0sjhU6WaWP2wDIyS hixxYgF8PoM9CwdHHnw6/ROpiqCZeIBn1NYNWcQmxMZALBWOUZ0= =72na -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] File "catalina.out" not being created/populated when using Tomcat 9.0.31 + Ubuntu 20.04, and content goes to the Ubuntu syslog instead?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Emmanuel, On 6/22/20 16:36, Emmanuel Bourg wrote: > Le 22/06/2020 à 20:03, Christopher Schultz a écrit : > >> It looks like whoever is responsible for packing Tomcat for >> Ubuntu has something missing, there. I suggest you file a bug >> with Ubuntu. > > That must be me :) I'll get a look. I didn't want to be presumptuous :) - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIyBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl7yHdsACgkQHPApP6U8 pFjuPA/2Of4P1VBPvcTa+0bv7zmWeYSzpHDy39sGL72Wqn0r2FvrUUGMJEUiWPi4 W9IhbUXBmv9yfvvhPkvDOwpXa7eakI9X7V4GwPxnScgG/Ha9Jpa3lugQOSGeEnwl hdWB1c+NGgoL/4R9V7A8FnL3kAz8mRxPD4ghNG/MxakRRTcYjUYm5BDvNBMUz/uq fnG0DeI9fgCv5HzBHGY2/qVw75BcRemj5MWV+BKBAlUjIEvfummfTxcKRSxI4A65 RXk+gJYhIB+/2SHZL5WGtMaNO7WIl4QLKyqd1rTL0fBUh8e9SPxWt+QtNN5RS21e S+sSyCav+DheOCQK9OzmXZTReLKjOge5jUo0F2PDvY4j9jzkGBimXJj3ltqTcNA9 ps8l4WocZPUJsAw78XCPVNSmjHaAliZAhvdcaD4WQnsPMbswvAJKORanty/GTS42 fsnO6bcHmiIigHyzEhLU1wAr+tX239Ib1BbiNRGQn3h96/0dhY4vnDoan2Cm/wXQ C7Bt1EXE75XPcrbN9Lqdu4F4mOSaOY0cP3wcpJSxfnJf8TI/ex7xNX9xwx30mBo6 TsjI9zN09U+eE80TO4gWUd+8GrCqTa40sTLrtMSv19daJOTYiYtSn7gjMTDvWNbU PZPMP0IX0WuJPkDIHmZGTAI1qDsAvR5sWyt9qitrG4W4rfZwfA== =8eW4 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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 23/06/2020 à 02:53, Brian a écrit : > Please do! It definitely looks like a bug. > I just reported the bug here: > https://bugs.launchpad.net/ubuntu/+source/tomcat9/+bug/1884591 I've just uploaded tomcat9/9.0.36-1 in Debian and changed the permissions [1] on the log directory. This will propagate to Ubuntu sooner or later. Emmanuel Bourg [1] https://salsa.debian.org/java-team/tomcat9/-/commit/51128fe9 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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?
-Original Message- From: Emmanuel Bourg Reply-To: Tomcat Users List Date: Monday, June 22, 2020 at 15:36 To: "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 22/06/2020 à 20:03, Christopher Schultz a écrit : > It looks like whoever is responsible for packing Tomcat for Ubuntu has > something missing, there. I suggest you file a bug with Ubuntu. That must be me :) I'll get a look. Emmanuel Bourg Hi Emmanuel, Please do! It definitely looks like a bug. I just reported the bug here: https://bugs.launchpad.net/ubuntu/+source/tomcat9/+bug/1884591 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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 22/06/2020 à 18:43, Brian a écrit : > I'm not really an expert with Linux. It would seem to me that the "adm" group > (to which syslog seems to belong) lacks a write permission Indeed, rsyslog in Ubuntu runs as syslog:adm and needs special permissions to write to /var/log/tomcat9. This issue should be reported to Ubuntu. The tomcat9 package in Debian isn't affected by this issue because rsyslogd runs as root. > OK, I did it and the write permission was added to the adm group. I restarted > Tomcat and it worked, the catalina.out file got created! However, after I > restarted the whole Ubuntu, I discovered that the permissions went back to > how there were (not write for adm). Why is that? The permissions on this directory are managed by systemd-tmpfiles. The tomcat9 package defines the expected permissions in /usr/lib/tmpfiles.d/tomcat9.conf and the permissions are enforced when the system starts. It's possible to override the default settings, you have to copy the configuration file to /etc/tmpfiles.d/ and change the permissions on /var/log/tomcat9 from 2750 to 2760: cp /usr/lib/tmpfiles.d/tomcat9.conf /etc/tmpfiles.d/ sed -i s/2750/2760/ /etc/tmpfiles.d/tomcat9.conf The write permissions for the adm group will then be persistent. > In any case, why is this permission required in my new VPS, if the old one > lacks it and catalina.out works perfectly? I guess your older VPS had the tomcat8 package installed. The tomcat9 package is different as it leverages several systemd features to improve the security and the reliability. Emmanuel Bourg - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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 22/06/2020 à 10:44, calder a écrit : > However, this is one reason we do not use "distro-specific" Tomcat > installations (to include implementations of WebSphere and WebLogic). > . > For example, we grab the plain vanilla Tomcat ZIP and extract it to "/opt/" > (as in "/opt/tomcat/") - we now have complete control over its > configuration and runtime instantiation. This is a valid strategy, but you miss the tight integration with the system that comes out of the box with a distro specific package (proper system service, started on boot, restarted on crashes, run by a non privileged user allowed to bind to ports below 1024, sandboxed, with logs in a consistent location). And you are still able to override some aspects of the default configuration you might not like. Emmanuel Bourg - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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 22/06/2020 à 20:03, Christopher Schultz a écrit : > It looks like whoever is responsible for packing Tomcat for Ubuntu has > something missing, there. I suggest you file a bug with Ubuntu. That must be me :) I'll get a look. Emmanuel Bourg - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Brian, On 6/22/20 12:43, Brian wrote: > > -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 > > Brian, > > On 6/22/20 02:04, Brian wrote: >> Hello, >> >> I have been using Tomcat for about 18 years. As far as I can >> remember, everything that I leave on the log with >> System.out.println() has been found inside the file >> "catalina.out" which has been nice. However, this seems to have >> changed. I just migrated to Ubuntu 20.04 + Tomcat 9.0.31, and >> installed Tomcat doing a "sudo apt install tomcat9". Now I see >> that the file "catalina.out" never gets created, and that >> everything that had been sent there is now being sent to the >> Ubuntu/Linux/Debian log "syslog". I don't like that, I want to >> keep having a separate/dedicated log for Tomcat (which is >> something I check very often) and not havoing to search for it >> inside syslog (which is something I rarely inspect). >> >> I have done some research, and this is what I have discovered (if >> I understood everything correctly): >> >> - Tomcat now runs as a service inside something called "systemsd" >> - For some reason, the people at Ubuntu/Debian/Linux decided >> that Tomcat's log should be found inside syslog, instead of >> staying independent inside "catalina.out". Why is that? I don't >> know and I don't like it! - The other files inside >> /var/log/tomcat get created, including the >> "catalina.-MM-DD.log" files. But I dont' find my >> "System.out.println()" messages there, which has always been the >> case. - I have found, however, that syslog tries to create and >> populate the "catalina.out" file as well, since I have found an >> error inside syslog that says something like "rsyslogd: file >> '/var/log/tomcat9/catalina.out': open error: Permission denied". >> - I have also found a file "/etc/rsyslog.d/tomcat9.conf" which, >> indeed, seams to indicate syslog that the file >> "/var/log/tomcat9/catalina.out" must be populated. Which makes >> sense and should solve my needs. - Considering the "Permission >> denied" error message, I started playing with the permissions >> (something that I really don't have much experience with). If I >> remember correctly, I created the file "catalina.out" manually, >> and the modified its properties so the owners are "tomcat/adm", >> since the "syslog" process/user seems to be inside the "adm" >> group. Restarted everything... and the "catalina.out" file got >> created and populated!!! So it seems that the main obstacle here >> is a lack of correct permissions so syslog can do what has been >> told and populate the "catalina.out" file. Did I get it right? - >> However, when I delete all the log files (which I do every once >> in a while), the permissions that I assigned get lost and the >> file doesn't get created anymore. >> >> What are we supposed to do to deal with this problem? Can/should >> we do something so the Tomcat log doesn't go to syslog? If not, >> and considering that it seems that syslog is trying to populate >> the "catalina.out" file as it has been told, what should we do >> to correct the permissions problem? > > What are the permissions of the /var/log/tomcat directory? > > Hello Chris, > > I did a "ls -l /var/log/". According to that, this is what I see > for "/var/log/tomcat9": drwxr-s--- 3 tomcatadm > 4096 Jun 22 10:51 tomcat9 > > I'm not really an expert with Linux. It would seem to me that the > "adm" group (to which syslog seems to belong) lacks a write > permission, but in my old instance (Tomcat 8.5.39 + Ubuntu 18.04) > the "catalina.out" file works perfectly (gets created and > populated) and this is what I see there, it doesn't seem to me that > the adm group has a write permission there either: drwxr-x--- 3 > tomcat8 adm 4096 Jun 22 10:00 tomcat8 > > Perhaps you need to chmod g+w /var/log/tomcat ? - -chris > > OK, I did it and the write permission was added to the adm group. I > restarted Tomcat and it worked, the catalina.out file got > created! However, after I restarted the whole Ubuntu, I discovered > that the permissions went back to how there were (not write for > adm). Why is that? In fact, now I remember that I tried this > before, but since I restarted the whole Ubuntu instead of jus
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?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Brian, On 6/22/20 02:04, Brian wrote: > Hello, > > I have been using Tomcat for about 18 years. As far as I can > remember, everything that I leave on the log with > System.out.println() has been found inside the file "catalina.out" > which has been nice. However, this seems to have changed. I just > migrated to Ubuntu 20.04 + Tomcat 9.0.31, and installed Tomcat > doing a "sudo apt install tomcat9". Now I see that the file > "catalina.out" never gets created, and that everything that had > been sent there is now being sent to the Ubuntu/Linux/Debian log > "syslog". I don't like that, I want to keep having a > separate/dedicated log for Tomcat (which is something I check very > often) and not havoing to search for it inside syslog (which is > something I rarely inspect). > > I have done some research, and this is what I have discovered (if I > understood everything correctly): > > - Tomcat now runs as a service inside something called "systemsd" - > For some reason, the people at Ubuntu/Debian/Linux decided that > Tomcat's log should be found inside syslog, instead of staying > independent inside "catalina.out". Why is that? I don't know and I > don't like it! - The other files inside /var/log/tomcat get > created, including the "catalina.-MM-DD.log" files. But I dont' > find my "System.out.println()" messages there, which has always > been the case. - I have found, however, that syslog tries to create > and populate the "catalina.out" file as well, since I have found an > error inside syslog that says something like "rsyslogd: file > '/var/log/tomcat9/catalina.out': open error: Permission denied". - > I have also found a file "/etc/rsyslog.d/tomcat9.conf" which, > indeed, seams to indicate syslog that the file > "/var/log/tomcat9/catalina.out" must be populated. Which makes > sense and should solve my needs. - Considering the "Permission > denied" error message, I started playing with the permissions > (something that I really don't have much experience with). If I > remember correctly, I created the file "catalina.out" manually, and > the modified its properties so the owners are "tomcat/adm", since > the "syslog" process/user seems to be inside the "adm" group. > Restarted everything... and the "catalina.out" file got created and > populated!!! So it seems that the main obstacle here is a lack of > correct permissions so syslog can do what has been told and > populate the "catalina.out" file. Did I get it right? - However, > when I delete all the log files (which I do every once in a while), > the permissions that I assigned get lost and the file doesn't get > created anymore. > > What are we supposed to do to deal with this problem? Can/should we > do something so the Tomcat log doesn't go to syslog? If not, and > considering that it seems that syslog is trying to populate the > "catalina.out" file as it has been told, what should we do to > correct the permissions problem? What are the permissions of the /var/log/tomcat directory? Hello Chris, I did a "ls -l /var/log/". According to that, this is what I see for "/var/log/tomcat9": drwxr-s--- 3 tomcatadm4096 Jun 22 10:51 tomcat9 I'm not really an expert with Linux. It would seem to me that the "adm" group (to which syslog seems to belong) lacks a write permission, but in my old instance (Tomcat 8.5.39 + Ubuntu 18.04) the "catalina.out" file works perfectly (gets created and populated) and this is what I see there, it doesn't seem to me that the adm group has a write permission there either: drwxr-x--- 3 tomcat8 adm 4096 Jun 22 10:00 tomcat8 Perhaps you need to chmod g+w /var/log/tomcat ? - -chris OK, I did it and the write permission was added to the adm group. I restarted Tomcat and it worked, the catalina.out file got created! However, after I restarted the whole Ubuntu, I discovered that the permissions went back to how there were (not write for adm). Why is that? In fact, now I remember that I tried this before, but since I restarted the whole Ubuntu instead of just Tomcat, I never saw any progress. I didn't notice that it would have worked if I just restarted Tomcat. In any case, why is this permission required in my new VPS, if the old one lacks it and catalina.out works perfectly?
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?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Brian, On 6/22/20 02:04, Brian wrote: > Hello, > > I have been using Tomcat for about 18 years. As far as I can > remember, everything that I leave on the log with > System.out.println() has been found inside the file "catalina.out" > which has been nice. However, this seems to have changed. I just > migrated to Ubuntu 20.04 + Tomcat 9.0.31, and installed Tomcat > doing a "sudo apt install tomcat9". Now I see that the file > "catalina.out" never gets created, and that everything that had > been sent there is now being sent to the Ubuntu/Linux/Debian log > "syslog". I don't like that, I want to keep having a > separate/dedicated log for Tomcat (which is something I check very > often) and not havoing to search for it inside syslog (which is > something I rarely inspect). > > I have done some research, and this is what I have discovered (if I > understood everything correctly): > > - Tomcat now runs as a service inside something called "systemsd" - > For some reason, the people at Ubuntu/Debian/Linux decided that > Tomcat's log should be found inside syslog, instead of staying > independent inside "catalina.out". Why is that? I don't know and I > don't like it! - The other files inside /var/log/tomcat get > created, including the "catalina.-MM-DD.log" files. But I dont' > find my "System.out.println()" messages there, which has always > been the case. - I have found, however, that syslog tries to create > and populate the "catalina.out" file as well, since I have found an > error inside syslog that says something like "rsyslogd: file > '/var/log/tomcat9/catalina.out': open error: Permission denied". - > I have also found a file "/etc/rsyslog.d/tomcat9.conf" which, > indeed, seams to indicate syslog that the file > "/var/log/tomcat9/catalina.out" must be populated. Which makes > sense and should solve my needs. - Considering the "Permission > denied" error message, I started playing with the permissions > (something that I really don't have much experience with). If I > remember correctly, I created the file "catalina.out" manually, and > the modified its properties so the owners are "tomcat/adm", since > the "syslog" process/user seems to be inside the "adm" group. > Restarted everything... and the "catalina.out" file got created and > populated!!! So it seems that the main obstacle here is a lack of > correct permissions so syslog can do what has been told and > populate the "catalina.out" file. Did I get it right? - However, > when I delete all the log files (which I do every once in a while), > the permissions that I assigned get lost and the file doesn't get > created anymore. > > What are we supposed to do to deal with this problem? Can/should we > do something so the Tomcat log doesn't go to syslog? If not, and > considering that it seems that syslog is trying to populate the > "catalina.out" file as it has been told, what should we do to > correct the permissions problem? What are the permissions of the /var/log/tomcat directory? Perhaps you need to chmod g+w /var/log/tomcat ? - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl7w0hUACgkQHPApP6U8 pFgABA/7BwxNOI313uSbRMSFPpdilpxhTkmujrvcit+A8lpre0hSNOUw2Q6i38L6 uT536ff2TwrFoizfEz/ydEW8lZQoEOWejlXPU8eO3/ehi7Gpat645+a559rCjr3m S5vfKw1UqrjKQXkeSlFGH1SFaKJfEnSKyjeH+/5yWVTL0z4G6Zatt9iZyUdHbPKh cuTrSpgfuOlsPdqKvO/7Y7gWoLqb52+17gawN6rrviRHs6U1S9EIgTWk0of1JYe/ K2l2ob9DfuVJCW+byL5FPE0AEwzyWMfh1W1yEMRGJKsUHFv+5BaXXRyc/yh9/E/l vqf+7OJPJ2V5Kp9KasX6NxBiyCGxH910lfyooeEIRAYmiWx61FD6OTcrklm5boEN fT7KyeuujIhnQSIq+c+0rKX+t2DtyQCuqP/e5SFiUt4WL4xH85e5FaoExk2ZlOoP E5phuijWPJakSTiXBG4cKRQyFqzLVqHSl6VbCHEzbj6rDHaiqOW0Wqs+Z2OV5q1k c7vMiHbawiqlo+5NzB/kVG+HISMQvK0lmuLsZOUaGFv2E5L85UuQhp2KLD01j0AF iEizODrxbs3AVs3+jx/LM6mXhqb6oCq93DLbWwuV0mhOTX6Dj1VxqkSUUiyyElD5 bCFl5dfyc0gc+daEAj32gshL9MBDPCkkyvBKO/N3Wdy2YnLP4GM= =ltDw -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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?
> On Jun 22, 2020, at 4:44 AM, calder wrote: > > On Mon, Jun 22, 2020, 01:04 Brian wrote > > [ snip ] > > - For some reason, the people at Ubuntu/Debian/Linux decided that Tomcat's >> log should be found inside syslog, instead of staying independent inside >> "catalina.out". Why is that? I don't know and I don't like it! > > [ snip ] > . > Sorry - don't have a specific answer for your Ubuntu implementation. > . > However, this is one reason we do not use "distro-specific" Tomcat > installations (to include implementations of WebSphere and WebLogic). > . > For example, we grab the plain vanilla Tomcat ZIP and extract it to "/opt/" > (as in "/opt/tomcat/") - we now have complete control over its > configuration and runtime instantiation. +1 Also it is far better to use a logging framework than writing directly to System.out as you have more control over when and where the logs are written. You can use java.util.logging (juli) directly or even a facade like SLF4j and then use whatever implementation you like behind it. The advantage of the facade is that the implementation (logback, log4j, juli) can be changed with configuration and a new jar instead of code changes everywhere you write to the logs. With either method you can write logs at different levels (trace, debug, info, warn error - juli does use different names though, same idea) and turn them on/off in configuration and even dynamically. Chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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?
On Mon, Jun 22, 2020, 01:04 Brian wrote [ snip ] - For some reason, the people at Ubuntu/Debian/Linux decided that Tomcat's > log should be found inside syslog, instead of staying independent inside > "catalina.out". Why is that? I don't know and I don't like it! [ snip ] . Sorry - don't have a specific answer for your Ubuntu implementation. . However, this is one reason we do not use "distro-specific" Tomcat installations (to include implementations of WebSphere and WebLogic). . For example, we grab the plain vanilla Tomcat ZIP and extract it to "/opt/" (as in "/opt/tomcat/") - we now have complete control over its configuration and runtime instantiation.
File "catalina.out" not being created/populated when using Tomcat 9.0.31 + Ubuntu 20.04, and content goes to the Ubuntu syslog instead?
Hello, I have been using Tomcat for about 18 years. As far as I can remember, everything that I leave on the log with System.out.println() has been found inside the file "catalina.out" which has been nice. However, this seems to have changed. I just migrated to Ubuntu 20.04 + Tomcat 9.0.31, and installed Tomcat doing a "sudo apt install tomcat9". Now I see that the file "catalina.out" never gets created, and that everything that had been sent there is now being sent to the Ubuntu/Linux/Debian log "syslog". I don't like that, I want to keep having a separate/dedicated log for Tomcat (which is something I check very often) and not havoing to search for it inside syslog (which is something I rarely inspect). I have done some research, and this is what I have discovered (if I understood everything correctly): - Tomcat now runs as a service inside something called "systemsd" - For some reason, the people at Ubuntu/Debian/Linux decided that Tomcat's log should be found inside syslog, instead of staying independent inside "catalina.out". Why is that? I don't know and I don't like it! - The other files inside /var/log/tomcat get created, including the "catalina.-MM-DD.log" files. But I dont' find my "System.out.println()" messages there, which has always been the case. - I have found, however, that syslog tries to create and populate the "catalina.out" file as well, since I have found an error inside syslog that says something like "rsyslogd: file '/var/log/tomcat9/catalina.out': open error: Permission denied". - I have also found a file "/etc/rsyslog.d/tomcat9.conf" which, indeed, seams to indicate syslog that the file "/var/log/tomcat9/catalina.out" must be populated. Which makes sense and should solve my needs. - Considering the "Permission denied" error message, I started playing with the permissions (something that I really don't have much experience with). If I remember correctly, I created the file "catalina.out" manually, and the modified its properties so the owners are "tomcat/adm", since the "syslog" process/user seems to be inside the "adm" group. Restarted everything... and the "catalina.out" file got created and populated!!! So it seems that the main obstacle here is a lack of correct permissions so syslog can do what has been told and populate the "catalina.out" file. Did I get it right? - However, when I delete all the log files (which I do every once in a while), the permissions that I assigned get lost and the file doesn't get created anymore. What are we supposed to do to deal with this problem? Can/should we do something so the Tomcat log doesn't go to syslog? If not, and considering that it seems that syslog is trying to populate the "catalina.out" file as it has been told, what should we do to correct the permissions problem? Thanks in advance! Brian
catalina.out on AWS Linux 2 (resolved) (was: stdout / stderr on AWS Linux)
I finally figured out what is going on. One point of confusion was that the catalina.out processing is different on AWS Linux 1 vs AWS Linux 2. In AWS Linux 1, catalina.out exists and is actively being written to. When TC is installed on AWS Linux 2, a catalina.out file is created in the /var/log/tomcat folder. But it's an old file with one line that says "Tomcat installed...". catalina.out on AWS linux 2 is never touched again. Erase it, and it never comes back. The reason for all of this is linux's journalctl service that came into play in AWS Linux 2. Apparently, there's no options on whether to use this or not. All 'system level' logs (i.e. catalina.out) get routed to journalctl. The only way to access it is using the journalctl command: "#journalctl -u tomcat.service --since today". The good news is that I finally found the output I've been desperately looking for. The bad news is that I realized I've been getting a bunch of exception stack traces in my code that I was not aware of that I now have to investigate and fix... :-( Thanks for the info that got me directed into the right area to figure this out. Jerry On 3/9/2020 4:58 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jerry, On 3/9/20 16:35, Jerry Malcolm wrote: On 3/3/2020 2:45 PM, Christopher Schultz wrote: 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. It's systemd hand-wavy magic. Isn't is great? 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? Tomcat doesn't ship with a systemd control file, so this is likely to be either a RedHat- or Amazon-sourced control file. Coty lurks here, and manages those packages for RedHat. I'm not sure what happens downstream. I'm not aware of any Amazon folks who hang out around here, but I think you might have to ask them directly. Not a satisfying answer, I know, but an accurate one. - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl5mvAsACgkQHPApP6U8 pFhjdQ/9EklsKbnex9N1xT3MgyoPtI/MotGdCATHTxunSaNvAon36fvXcK1tZL55 sCJlKoX16ZN4cqCxfdAbf/0OUdprfimCwN+4OsDFjNSb
Re: host [:] is not valid error in catalina.out
Thanks Chris for your quick response. Please accept my apology for delayed response as I was out of town. As per my design we are already using nginx in front of tomcat. So a request from browser will land on nginx & then it will redirect it to tomcat. We are having a location in nginx where we are appending $host & $sever_port in host separated by :. What we have observed that, when a request will come from browser then we are properly getting hostname and server port. And hence we are getting proper url. We do have a healthcheck call internally originated from nginx to tomcat to check the health of the system, in this case we are not having any valid $host & $server_port and hence only static : is passing to tomcat. In our earlier version i.e. 8.5.24 it was supporting :, but now in 9.0.29 it is not allowing and hence throwing 404. So my ask is that if there is any flag or way by which we can handle this specific scenario then it will be a great help. Your thoughts and inputs are highly welcome. On Fri, Dec 6, 2019, 3:41 AM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Mark and Kushagra, > > On 12/5/19 13:11, Mark Thomas wrote: > > On 05/12/2019 17:10, Kushagra Bindal wrote: > >> Thanks Mark for your response. > >> > >> In which version tomcat has introduced these restrictions > > > > Check the changelog. Look for "validation". > > > >> and is there any available documentation around such cases which > >> could help me in understanding the nature of restrictions. > > > > RFC 3986, section 3.2.2 and references. > > You may be able to work-around these issues with a reverse-proxy such > as Apache httpd, nginx, etc. > > Using tools such as mod_rewrite (or simple tools, depending upon your > needs), you should be able to "fix" broken clients' requests before > they get to Tomcat. > > The real solution is to fix your apparently very broken clients. > > - -chris > > >> On Thu, Dec 5, 2019, 10:31 PM Mark Thomas > >> wrote: > >> > >>> On 05/12/2019 16:58, Kushagra Bindal wrote: > >>>> Hi Mark > >>>> > >>>> Yes that's correct that we are getting this error after > >>>> startup. Actually in one of my url I am having extra : and > >>>> thus resulting in failure. Same url was working properly in > >>>> 8.5.24 version. Actually I can understand > >>> that > >>>> this is not a good practice to have extra : but making such > >>>> changes could result into regression in application. > >>>> > >>>> So is there a way by which I can apply some setting like > >>>> escape character or something which could help me in > >>>> resolving this issue? > >>> > >>> Sorry, no. Requests with invalid host names are always > >>> rejected. > >>> > >>> Mark > >>> > >>> > >>>> > >>>> On Wed, Dec 4, 2019, 4:23 PM Mark Thomas > >>>> wrote: > >>>> > >>>>> On 04/12/2019 05:19, Kushagra Bindal wrote: > >>>>>> Hi, > >>>>>> > >>>>>> I tried to upgrade my tomcat on OpenAM from 8.5.24 to > >>>>>> 9.0.29 version > >>> and > >>>>> I > >>>>>> got below error in catalina.out during startup itself. > >>>>> > >>>>> That stack trace shows that this error is in response to an > >>>>> incoming request, not part of the start-up sequence. > >>>>> > >>>>>> [http-nio-8080-exec-7] > >>>>>> org.apache.coyote.AbstractProcessor.parseHost > >>> The > >>>>>> host [:] is not valid > >>>>> > >>>>> You have a broken client that is presenting an invalid Host > >>>>> header. If you want the error to go away, fix the broken > >>>>> client. > >>>>> > >>>>> Mark > >>>>> > >>>>> -- > - --- > >>>>> > >>>>> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > >>>>> For additional commands, e-mail: > >>>>> users-h...@tomcat.apache.org > >>>>> > >>>>> > >>>> > >>> > >>> > >>> -
Re: host [:] is not valid error in catalina.out
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark and Kushagra, On 12/5/19 13:11, Mark Thomas wrote: > On 05/12/2019 17:10, Kushagra Bindal wrote: >> Thanks Mark for your response. >> >> In which version tomcat has introduced these restrictions > > Check the changelog. Look for "validation". > >> and is there any available documentation around such cases which >> could help me in understanding the nature of restrictions. > > RFC 3986, section 3.2.2 and references. You may be able to work-around these issues with a reverse-proxy such as Apache httpd, nginx, etc. Using tools such as mod_rewrite (or simple tools, depending upon your needs), you should be able to "fix" broken clients' requests before they get to Tomcat. The real solution is to fix your apparently very broken clients. - -chris >> On Thu, Dec 5, 2019, 10:31 PM Mark Thomas >> wrote: >> >>> On 05/12/2019 16:58, Kushagra Bindal wrote: >>>> Hi Mark >>>> >>>> Yes that's correct that we are getting this error after >>>> startup. Actually in one of my url I am having extra : and >>>> thus resulting in failure. Same url was working properly in >>>> 8.5.24 version. Actually I can understand >>> that >>>> this is not a good practice to have extra : but making such >>>> changes could result into regression in application. >>>> >>>> So is there a way by which I can apply some setting like >>>> escape character or something which could help me in >>>> resolving this issue? >>> >>> Sorry, no. Requests with invalid host names are always >>> rejected. >>> >>> Mark >>> >>> >>>> >>>> On Wed, Dec 4, 2019, 4:23 PM Mark Thomas >>>> wrote: >>>> >>>>> On 04/12/2019 05:19, Kushagra Bindal wrote: >>>>>> Hi, >>>>>> >>>>>> I tried to upgrade my tomcat on OpenAM from 8.5.24 to >>>>>> 9.0.29 version >>> and >>>>> I >>>>>> got below error in catalina.out during startup itself. >>>>> >>>>> That stack trace shows that this error is in response to an >>>>> incoming request, not part of the start-up sequence. >>>>> >>>>>> [http-nio-8080-exec-7] >>>>>> org.apache.coyote.AbstractProcessor.parseHost >>> The >>>>>> host [:] is not valid >>>>> >>>>> You have a broken client that is presenting an invalid Host >>>>> header. If you want the error to go away, fix the broken >>>>> client. >>>>> >>>>> Mark >>>>> >>>>> -- - --- >>>>> >>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>>> For additional commands, e-mail: >>>>> users-h...@tomcat.apache.org >>>>> >>>>> >>>> >>> >>> >>> - - >>> >>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>> For additional commands, e-mail: users-h...@tomcat.apache.org >>> >>> >> > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl3pgIwACgkQHPApP6U8 pFjrrw/7BM39u/Z8BhWNOUKrKubmO9ENKV0ldCdSa/qoxTwPKXmDMa05Iiy1iQne OAp8SA3AfZMpAoTvfCEOy7ncB4rOdJTo+bSgOfErVdiBdYokkUehEFkYzaiaUpEA CknCzfcyWPM8rDZG1mCYm76kOe017sDCrcnV/nUcsdVqQ7fMY28k2PYBSrAziOfG rDSALl3DFObYDoznvV/qwfNP2Ns6Utd9+2qXctMFtjDrQDOY5j9Rn2BPJaCeqgOo HbjJYecC+dx9fV+v4Dc4CoC64u1LQzunBy7KIE/f9tuYoWtBur0xMoMc1+CqzSAQ fhWQtfcSUsvqVNh4OFvxJc0kvPZSkB6QDVpOAo74nKhe4PcnWfoMg0Lx6EtCjaUO 5JoLew404q+pKyhb/0txmrMsrAF+GCPXs4q6ft4bi7HjIirQUAgYc8Mk1WMI9cDx APN7G6FrU8Mcfg5qEaTywl0X5su5i+2XxXvOz6py5si2RZe0l7Gc4iLbml10SG+X cAIAh+QSCCZfCd7DNCPNrsrzFI0h2xgst8NKdL1pOjkK/40GMEi0voDktzjDhw+6 S9GdGE9DTl/z3Mxtd52tlyqvFRenS7VYv6ftHyhx0doAxC+4ozBEDh/qInmmeMhH 2/IKZ3CqDfnfasUjNxsuqg/DXjWekzwkDrHkSYMif0SJZAg8zQA= =QpXg -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: host [:] is not valid error in catalina.out
On 05/12/2019 17:10, Kushagra Bindal wrote: > Thanks Mark for your response. > > In which version tomcat has introduced these restrictions Check the changelog. Look for "validation". > and is there any > available documentation around such cases which could help me in > understanding the nature of restrictions. RFC 3986, section 3.2.2 and references. Mark > > On Thu, Dec 5, 2019, 10:31 PM Mark Thomas wrote: > >> On 05/12/2019 16:58, Kushagra Bindal wrote: >>> Hi Mark >>> >>> Yes that's correct that we are getting this error after startup. Actually >>> in one of my url I am having extra : and thus resulting in failure. Same >>> url was working properly in 8.5.24 version. Actually I can understand >> that >>> this is not a good practice to have extra : but making such changes could >>> result into regression in application. >>> >>> So is there a way by which I can apply some setting like escape character >>> or something which could help me in resolving this issue? >> >> Sorry, no. Requests with invalid host names are always rejected. >> >> Mark >> >> >>> >>> On Wed, Dec 4, 2019, 4:23 PM Mark Thomas wrote: >>> >>>> On 04/12/2019 05:19, Kushagra Bindal wrote: >>>>> Hi, >>>>> >>>>> I tried to upgrade my tomcat on OpenAM from 8.5.24 to 9.0.29 version >> and >>>> I >>>>> got below error in catalina.out during startup itself. >>>> >>>> That stack trace shows that this error is in response to an incoming >>>> request, not part of the start-up sequence. >>>> >>>>> [http-nio-8080-exec-7] org.apache.coyote.AbstractProcessor.parseHost >> The >>>>> host [:] is not valid >>>> >>>> You have a broken client that is presenting an invalid Host header. If >>>> you want the error to go away, fix the broken client. >>>> >>>> Mark >>>> >>>> - >>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>> >>>> >>> >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: host [:] is not valid error in catalina.out
Thanks Mark for your response. In which version tomcat has introduced these restrictions and is there any available documentation around such cases which could help me in understanding the nature of restrictions. On Thu, Dec 5, 2019, 10:31 PM Mark Thomas wrote: > On 05/12/2019 16:58, Kushagra Bindal wrote: > > Hi Mark > > > > Yes that's correct that we are getting this error after startup. Actually > > in one of my url I am having extra : and thus resulting in failure. Same > > url was working properly in 8.5.24 version. Actually I can understand > that > > this is not a good practice to have extra : but making such changes could > > result into regression in application. > > > > So is there a way by which I can apply some setting like escape character > > or something which could help me in resolving this issue? > > Sorry, no. Requests with invalid host names are always rejected. > > Mark > > > > > > On Wed, Dec 4, 2019, 4:23 PM Mark Thomas wrote: > > > >> On 04/12/2019 05:19, Kushagra Bindal wrote: > >>> Hi, > >>> > >>> I tried to upgrade my tomcat on OpenAM from 8.5.24 to 9.0.29 version > and > >> I > >>> got below error in catalina.out during startup itself. > >> > >> That stack trace shows that this error is in response to an incoming > >> request, not part of the start-up sequence. > >> > >>> [http-nio-8080-exec-7] org.apache.coyote.AbstractProcessor.parseHost > The > >>> host [:] is not valid > >> > >> You have a broken client that is presenting an invalid Host header. If > >> you want the error to go away, fix the broken client. > >> > >> Mark > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > >> For additional commands, e-mail: users-h...@tomcat.apache.org > >> > >> > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: host [:] is not valid error in catalina.out
On 05/12/2019 16:58, Kushagra Bindal wrote: > Hi Mark > > Yes that's correct that we are getting this error after startup. Actually > in one of my url I am having extra : and thus resulting in failure. Same > url was working properly in 8.5.24 version. Actually I can understand that > this is not a good practice to have extra : but making such changes could > result into regression in application. > > So is there a way by which I can apply some setting like escape character > or something which could help me in resolving this issue? Sorry, no. Requests with invalid host names are always rejected. Mark > > On Wed, Dec 4, 2019, 4:23 PM Mark Thomas wrote: > >> On 04/12/2019 05:19, Kushagra Bindal wrote: >>> Hi, >>> >>> I tried to upgrade my tomcat on OpenAM from 8.5.24 to 9.0.29 version and >> I >>> got below error in catalina.out during startup itself. >> >> That stack trace shows that this error is in response to an incoming >> request, not part of the start-up sequence. >> >>> [http-nio-8080-exec-7] org.apache.coyote.AbstractProcessor.parseHost The >>> host [:] is not valid >> >> You have a broken client that is presenting an invalid Host header. If >> you want the error to go away, fix the broken client. >> >> Mark >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: host [:] is not valid error in catalina.out
Hi Mark Yes that's correct that we are getting this error after startup. Actually in one of my url I am having extra : and thus resulting in failure. Same url was working properly in 8.5.24 version. Actually I can understand that this is not a good practice to have extra : but making such changes could result into regression in application. So is there a way by which I can apply some setting like escape character or something which could help me in resolving this issue? On Wed, Dec 4, 2019, 4:23 PM Mark Thomas wrote: > On 04/12/2019 05:19, Kushagra Bindal wrote: > > Hi, > > > > I tried to upgrade my tomcat on OpenAM from 8.5.24 to 9.0.29 version and > I > > got below error in catalina.out during startup itself. > > That stack trace shows that this error is in response to an incoming > request, not part of the start-up sequence. > > > [http-nio-8080-exec-7] org.apache.coyote.AbstractProcessor.parseHost The > > host [:] is not valid > > You have a broken client that is presenting an invalid Host header. If > you want the error to go away, fix the broken client. > > Mark > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: host [:] is not valid error in catalina.out
On 04/12/2019 05:19, Kushagra Bindal wrote: > Hi, > > I tried to upgrade my tomcat on OpenAM from 8.5.24 to 9.0.29 version and I > got below error in catalina.out during startup itself. That stack trace shows that this error is in response to an incoming request, not part of the start-up sequence. > [http-nio-8080-exec-7] org.apache.coyote.AbstractProcessor.parseHost The > host [:] is not valid You have a broken client that is presenting an invalid Host header. If you want the error to go away, fix the broken client. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
host [:] is not valid error in catalina.out
Hi, I tried to upgrade my tomcat on OpenAM from 8.5.24 to 9.0.29 version and I got below error in catalina.out during startup itself. [http-nio-8080-exec-7] org.apache.coyote.AbstractProcessor.parseHost The host [:] is not valid Note: further occurrences of request parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException at org.apache.tomcat.util.http.parser.Host.parse(Host.java:78) at org.apache.tomcat.util.http.parser.Host.parse(Host.java:45) at org.apache.coyote.AbstractProcessor.parseHost(AbstractProcessor.java:294) at org.apache.coyote.http11.Http11Processor.prepareRequest(Http11Processor.java:759) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:343) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1591) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Can someone please help in identifying the actual root cause of the failure. -- Regards, Kushagra Bindal
Re: Configuring log format for console output (catalina.out)
Thanks Guido, I hope that with the rsyslog magic (see startmsg.regex="^[[:digit:]]{2}-[[:alpha:]]{3}-[[:digit:]]{4} [[:digit:]]{1,2}:[[:digit:]]{1,2}:[[:digit:]]{1,2}\\.[[:digit:]]{3}" for the reference), I will be able to group this messages, otherwise I'll jump into your solution. Joan Missatge de Jäkel, Guido del dia dc., 22 de maig 2019 a les 8:55: > Dear Joan, > > by use of the common scripts, the file catalina.out will contain the > console output (stdout/tderr) of the *JVM* process and -- if not configured > in another way -- of the applications. Therefore, you have to deal with the > features of output formatting of current JVMs. Or -- as me -- you might > pipe this file descriptors through a tiny script that will prepend a > timestamp in a format of your choice. This will have the advantage that it > also handle "console" output of Java application; despite of the fact that > using stdout/stderr instead of a java logging mechanism is a very bad style. > > If you don't need to process thousands of lines per second, a simple shell > script may do the job: > > while read line; do echo "`date -Ins` $line"; done > > To avoid "double-stamping", you may add an heuristic check of the incoming > line; please adjust the RegExpr to your neeeds > > while read line; do [[ ! "$line" =~ ^\d\d\d\d ]] && echo -n > "[`date -Ins`] "; echo $line; done > > > Guido >
RE: Configuring log format for console output (catalina.out)
Dear Joan, by use of the common scripts, the file catalina.out will contain the console output (stdout/tderr) of the *JVM* process and -- if not configured in another way -- of the applications. Therefore, you have to deal with the features of output formatting of current JVMs. Or -- as me -- you might pipe this file descriptors through a tiny script that will prepend a timestamp in a format of your choice. This will have the advantage that it also handle "console" output of Java application; despite of the fact that using stdout/stderr instead of a java logging mechanism is a very bad style. If you don't need to process thousands of lines per second, a simple shell script may do the job: while read line; do echo "`date -Ins` $line"; done To avoid "double-stamping", you may add an heuristic check of the incoming line; please adjust the RegExpr to your neeeds while read line; do [[ ! "$line" =~ ^\d\d\d\d ]] && echo -n "[`date -Ins`] "; echo $line; done Guido
Re: Configuring log format for console output (catalina.out)
Thanks a lot for your answer Chris > > I am trying to forward the logs generated on a server to a > > centralized log collector (using rsyslog), one of the features I > > would like to use the ability to group messages by using their > > timestamp as the start of the message. By reading the documentation > > at https://tomcat.apache.org/tomcat-9.0-doc/logging.html#Console, I > > can't see the proper way to get a common format (preferably with > > timestamp), or ar tleast save the outputs into three different > > types in different files? > > I think you are being confused by the fact that the default log > pattern contains a newline character. For example, these are the first > two entries in my local catalina.out file: > > Apr 12, 2019 1:55:03 PM org.apache.coyote.AbstractProtocol init > INFO: Initializing ProtocolHandler ["ajp-nio-8215"] > Apr 12, 2019 1:55:03 PM org.apache.tomcat.util.net.NioSelectorPool > getSharedSelector > INFO: Using a shared selector for servlet write/read > Apr 12, 2019 1:55:03 PM org.apache.coyote.AbstractProtocol init > > (Apologies for the word-wrapping) > > The first entry is [Apr 12, 2019 1:55:03 PM] and the text ends with > ["ajp-nio-8215"] > > The second entry has the same timestmp and the text ends with > "AbstractProtocol init" > > Stack traces are always impossible to handle when looking at the > resulting file, since they almost always span multiple lines of text > - -- that is, they have embedded newlines in the message. > > Are you asking about how to make sense of the log file, how to send > log messages to a central server, or how to coalesce log messages by > timestamp? > Rsyslog allows to read multiline messages by matching a regular expression (see https://www.rsyslog.com/doc/v8-stable/configuration/modules/imfile.html#startmsg-regex), this allow the messages to be forwarded to a third party (graylog, logstash, ..) as a a single message. So my intention would be to be able to make all the messages to start with a timestamp (or a defined format) After your message I undertand that this is a single message (I didn't realize it) and all the messages in catalina.out are obeying the same format. Being the next lines a single message, am I right? 19-May-2019 06:25:20.937 INFO [localhost-startStop-1] > org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned > for TLDs yet contained no TLDs. Enable debug logging for this logger for a > comple > te list of JARs that were scanned but no TLDs were found in them. Skipping > unneeded JARs during scanning can improve startup time and JSP compilation > time. > [ERROR] Unable to find config file. Creating new servlet engine config > file: /WEB-INF/server-config.wsdd > [WARN] Web application uses > org.apache.axis2.transport.http.AxisAdminServlet; please update web.xml to > use org.apache.axis2.webapp.AxisAdminServlet instead > [WARN] Unable to load manifest for StAX implementation at jrt:/java.xml/ > [INFO] Clustering has been disabled > Thanks, Joan > >
Re: Configuring log format for console output (catalina.out)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Joan, On 5/21/19 09:11, Joan wrote: > Hi all, > > I am trying to forward the logs generated on a server to a > centralized log collector (using rsyslog), one of the features I > would like to use the ability to group messages by using their > timestamp as the start of the message. By reading the documentation > at https://tomcat.apache.org/tomcat-9.0-doc/logging.html#Console, I > can't see the proper way to get a common format (preferably with > timestamp), or ar tleast save the outputs into three different > types in different files? I think you are being confused by the fact that the default log pattern contains a newline character. For example, these are the first two entries in my local catalina.out file: Apr 12, 2019 1:55:03 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-nio-8215"] Apr 12, 2019 1:55:03 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO: Using a shared selector for servlet write/read Apr 12, 2019 1:55:03 PM org.apache.coyote.AbstractProtocol init (Apologies for the word-wrapping) The first entry is [Apr 12, 2019 1:55:03 PM] and the text ends with ["ajp-nio-8215"] The second entry has the same timestmp and the text ends with "AbstractProtocol init" Stack traces are always impossible to handle when looking at the resulting file, since they almost always span multiple lines of text - -- that is, they have embedded newlines in the message. Are you asking about how to make sense of the log file, how to send log messages to a central server, or how to coalesce log messages by timestamp? - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlzkEO8ACgkQHPApP6U8 pFg8EA/+KsH4JGirKakL+/OxqAz1W7T7MoR2QE9Y1Tk26FL6XI+VITk11gqLegH5 yx3zwmXLS9v2XilppnSvRB9xPd073Uf4v0NPSjCt1vSY7obPHYcRSIuA43QU9Pqb 7pEgxuGn+uUifRRK+DLd6Wcd3IkFo2hfKG/YHFL5McKxqsrEvPsspWU7uLRHoKML BR1MM5iKbsiBEJfncfyZqeGY2Yq4HOarcp//iv5bC20RgakLxlSjiWAyJqC77PKH 3dy9XaV/VyQpjEQe8/ADt1NqhF6qBVj/KcKeA41AAwL7grxX0R23ZeSQsKJeulgf jnXcK8mHWXs4Dybu7hhUbkS47whbfW6M3H4ZhGYutsoOB58shzbVR0MUtEYlOBMg GbpCt5xPW6NZ5LMbEDTMlQW95XBnrLdxe8dFdTo+qgEdSoe3o4mdvGUtrlgAxZlq Ay28U+/maI84StrScDwfC96chakdaGj/4CxyFwoj+5uVeeiBbglubR1gCghqVjM7 MQWDKrTACmcEu4ZbLy1sgNtBb/xjCYRtp05JrB531E9Py7//f6qprIKjAYOBLcxF uWDKP204C3UlC3/mQt6Ewd6QzQM0xCXPm0k+6817wf3xIaN/aST4R0kbR0OjkB6F CfAm8Qf2FVgRHOP4zzKHvm82wjET2FJmcw38do2ki89yml1iKXg= =UolI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Configuring log format for console output (catalina.out)
Hi all, I am trying to forward the logs generated on a server to a centralized log collector (using rsyslog), one of the features I would like to use the ability to group messages by using their timestamp as the start of the message. By reading the documentation at https://tomcat.apache.org/tomcat-9.0-doc/logging.html#Console, I can't see the proper way to get a common format (preferably with timestamp), or ar tleast save the outputs into three different types in different files? Some of the logs are displayed like this (severity in brackets but no timestamp) > > [WARN] Web application uses > org.apache.axis2.transport.http.AxisAdminServlet; please update web.xml to > use org.apache.axis2.webapp.AxisAdminServlet instead > [INFO] Clustering has been disabled > [INFO] Deploying module: script-1.6.2 - > file:/var/lib/tomcat8/webapps/WS_Revisiones/WEB-INF/modules/scripting-1.6.2.mar > Stack traces are displayed like this (no severity and no timestamp) > MultiException stack 1 of 2 > java.lang.NoClassDefFoundError: javax/activation/DataSource > at java.base/java.lang.Class.getDeclaredConstructors0(Native > Method) > at > java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137) > at > java.base/java.lang.Class.getDeclaredConstructors(Class.java:2357) > at org.jvnet.hk2.internal.Utilities$3.run(Utilities.java:1306) > at org.jvnet.hk2.internal.Utilities$3.run(Utilities.java:1302) > at java.base/java.security.AccessController.doPrivileged(Native > Method) > Also some other are like this (timestamp with ms + severity + context in brackets > 21-May-2019 13:03:22.474 INFO [localhost-startStop-1] > org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned > for TLDs yet contained no TLDs. Enable debug logging for this logger for a > complete list of JARs that were scanned but no TLDs were found in them. > Skipping unneeded JARs during scanning can improve startup time and JSP > compilation time. >
AW: [eX-Bulk]: Problem with catalina.out
Hey, do you have an example of your log4j-File(s)? An example from one of my webservices: %d %p %c{1.} [%t] %m%n greetings -Ursprüngliche Nachricht- Von: Hélène Ortiz [mailto:ort...@ill.fr] Gesendet: Montag, 23. April 2018 16:55 An: users@tomcat.apache.org Betreff: [eX-Bulk]: Problem with catalina.out Hi, I'm working with Tomcat8 on Linux Debian. My web application uses log4j to define logging policy in a specific file (which rotates every day): myapp.log. My problem is that Tomcat logs both in my file and in catalina.out ; the latter grows very quickly and I didn't manage to find a solution. I tried to modify logging.properties to remove Console handler but it does not work. Thanks a lot for your help - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problem with catalina.out
Hi, I'm working with Tomcat8 on Linux Debian. My web application uses log4j to define logging policy in a specific file (which rotates every day): myapp.log. My problem is that Tomcat logs both in my file and in catalina.out ; the latter grows very quickly and I didn't manage to find a solution. I tried to modify logging.properties to remove Console handler but it does not work. Thanks a lot for your help - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Worker0 ( catalina.out)
Thanks Christopher On Mon, Apr 16, 2018 at 11:29 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Loai, > > Unfortunately, there really isn't enough information in your question > to help you out. > > But it's fairly clear this is a problem with your application's use of > Grails and/or Spring. Someone here might be able to help, but you are > likely better off asking on a Grails or Spring-related forum. > > Thanks, > - -chris > > On 4/16/18 3:45 PM, Loai Abdallatif wrote: > > Also this error occurred in the same file ( catalina.out) > > > > > > java.io.IOException: Did not receive successful HTTP response: > > status code = 500, status message = [Internal Server Error] at > > org.springframework.remoting.httpinvoker. > > SimpleHttpInvokerRequestExecutor.validateResponse( > > SimpleHttpInvokerRequestExecutor.java:186) at > > org.springframework.remoting.httpinvoker. > > SimpleHttpInvokerRequestExecutor.doExecuteRequest( > > SimpleHttpInvokerRequestExecutor.java:93) > > > > > > On Mon, Apr 16, 2018 at 10:43 PM, Loai Abdallatif > > >> wrote: > > > >> Hello every one > >> > >> I have deployed Core app in worker 0 and got the following error > >> > >> > >> Receive call from the ESB. consumerKey > >> SC-serviceName RemotePersonService-methodName getPerson > >> --- serviceName > >> RemotePersonService-methodNamegetPerson-Error- > >> METHOD_NOT_FOUND(SC,RemotePersonService,getPerson) > >> - ERROR StackTrace - Full Stack Trace: > >> java.io.InvalidClassException: > >> org.grails.datastore.gorm.support.BeforeValidateHelper; local > >> class incompatible: stream classdesc serialVersionUID = 1, local > >> class serialVersionUID = -8212532861964790326 > >> > >> ERROR org.grails.web.errors.GrailsExceptionResolver - > >> InvalidClassException occurred when processing request: [POST] > >> /ServiceCatalog/httpinvoker/RemoteESBService > >> org.grails.datastore.gorm.support.BeforeValidateHelper; local > >> class incompatible: stream classdesc serialVersionUID = 1, local > >> class serialVersionUID = -8212532861964790326. Stacktrace > >> follows: java.io.InvalidClassException: > >> org.grails.datastore.gorm.support.BeforeValidateHelper; local > >> class incompatible: stream classdesc serialVersionUID = 1, local > >> class serialVersionUID = -8212532861964790326 at > >> java.io.ObjectStreamClass.initNonProxy( > >> ObjectStreamClass.java:687) > >> > >> > >> > > > -BEGIN PGP SIGNATURE- > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrVB7QACgkQHPApP6U8 > pFgSog/+OxhhPnje3Xrattf3qGunpG57/rJ9X1UBLGsQjX2voqg1l1LT/uYXRor8 > 8C7Wgv9IAEtRrxnPYzi5nxm38pSJ89bjbY+UiWxOFmVd0bj1WZH3QgGKjI64jtCg > Sep0aDqOi3QgA0G7C7JAY3lw7FHudWgnt2sfvU2R/3XBHNUKwqZetWSd+oJ5lGuv > 5ZN4S7XpyUJ3AO8WpaPi4+/xxK/nfPXdOeDSEQxTNjv4TFgeoCYkVE6POd2Pubhh > M1HK+QhgWdu/kc/YNewYw1/pWxYs8ahYAYy5GIzo2I+O/6OfObqA2YOKxZXc77HT > diwTCM2Bk15AwodX212IxnHNHPYCnuRdcTKCcC7gLyH1DfUG0Y32Ys2MXq3HOhew > khJCshesG1gGLVBE96VxoLN+xM//rdlfEC7x6/tRHQJE3aw1FaTDw/g9h9Cl9i3x > 6O5Sdd+biwB1i9MGQsoI9dvUHlcWg3I8/4UP52HVB2Hg+XOhluV4KON1z4f4DGR0 > 5EnK94cTsKlDKFOMlaTaM85HxeCT/Tz1lmCdo7yhwz8hxa+jTomGuak9r3AUxx4A > /9XLmk0yk3X2kO5xKXKu3EKnhwXKNC+Fgro/hx5GS5wSY3f35vVpS9PpJXZYAWQ6 > PpoHbUClhReBHC1lB0UZ7//BRS/6i/atU/ddFQRPD0Mb+JUklm8= > =riTx > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Worker0 ( catalina.out)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Loai, Unfortunately, there really isn't enough information in your question to help you out. But it's fairly clear this is a problem with your application's use of Grails and/or Spring. Someone here might be able to help, but you are likely better off asking on a Grails or Spring-related forum. Thanks, - -chris On 4/16/18 3:45 PM, Loai Abdallatif wrote: > Also this error occurred in the same file ( catalina.out) > > > java.io.IOException: Did not receive successful HTTP response: > status code = 500, status message = [Internal Server Error] at > org.springframework.remoting.httpinvoker. > SimpleHttpInvokerRequestExecutor.validateResponse( > SimpleHttpInvokerRequestExecutor.java:186) at > org.springframework.remoting.httpinvoker. > SimpleHttpInvokerRequestExecutor.doExecuteRequest( > SimpleHttpInvokerRequestExecutor.java:93) > > > On Mon, Apr 16, 2018 at 10:43 PM, Loai Abdallatif > > wrote: > >> Hello every one >> >> I have deployed Core app in worker 0 and got the following error >> >> >> Receive call from the ESB. consumerKey >> SC-serviceName RemotePersonService-methodName getPerson >> --- serviceName >> RemotePersonService-methodNamegetPerson-Error- >> METHOD_NOT_FOUND(SC,RemotePersonService,getPerson) >> - ERROR StackTrace - Full Stack Trace: >> java.io.InvalidClassException: >> org.grails.datastore.gorm.support.BeforeValidateHelper; local >> class incompatible: stream classdesc serialVersionUID = 1, local >> class serialVersionUID = -8212532861964790326 >> >> ERROR org.grails.web.errors.GrailsExceptionResolver - >> InvalidClassException occurred when processing request: [POST] >> /ServiceCatalog/httpinvoker/RemoteESBService >> org.grails.datastore.gorm.support.BeforeValidateHelper; local >> class incompatible: stream classdesc serialVersionUID = 1, local >> class serialVersionUID = -8212532861964790326. Stacktrace >> follows: java.io.InvalidClassException: >> org.grails.datastore.gorm.support.BeforeValidateHelper; local >> class incompatible: stream classdesc serialVersionUID = 1, local >> class serialVersionUID = -8212532861964790326 at >> java.io.ObjectStreamClass.initNonProxy( >> ObjectStreamClass.java:687) >> >> >> > -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrVB7QACgkQHPApP6U8 pFgSog/+OxhhPnje3Xrattf3qGunpG57/rJ9X1UBLGsQjX2voqg1l1LT/uYXRor8 8C7Wgv9IAEtRrxnPYzi5nxm38pSJ89bjbY+UiWxOFmVd0bj1WZH3QgGKjI64jtCg Sep0aDqOi3QgA0G7C7JAY3lw7FHudWgnt2sfvU2R/3XBHNUKwqZetWSd+oJ5lGuv 5ZN4S7XpyUJ3AO8WpaPi4+/xxK/nfPXdOeDSEQxTNjv4TFgeoCYkVE6POd2Pubhh M1HK+QhgWdu/kc/YNewYw1/pWxYs8ahYAYy5GIzo2I+O/6OfObqA2YOKxZXc77HT diwTCM2Bk15AwodX212IxnHNHPYCnuRdcTKCcC7gLyH1DfUG0Y32Ys2MXq3HOhew khJCshesG1gGLVBE96VxoLN+xM//rdlfEC7x6/tRHQJE3aw1FaTDw/g9h9Cl9i3x 6O5Sdd+biwB1i9MGQsoI9dvUHlcWg3I8/4UP52HVB2Hg+XOhluV4KON1z4f4DGR0 5EnK94cTsKlDKFOMlaTaM85HxeCT/Tz1lmCdo7yhwz8hxa+jTomGuak9r3AUxx4A /9XLmk0yk3X2kO5xKXKu3EKnhwXKNC+Fgro/hx5GS5wSY3f35vVpS9PpJXZYAWQ6 PpoHbUClhReBHC1lB0UZ7//BRS/6i/atU/ddFQRPD0Mb+JUklm8= =riTx -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Worker0 ( catalina.out)
Also this error occurred in the same file ( catalina.out) java.io.IOException: Did not receive successful HTTP response: status code = 500, status message = [Internal Server Error] at org.springframework.remoting.httpinvoker. SimpleHttpInvokerRequestExecutor.validateResponse( SimpleHttpInvokerRequestExecutor.java:186) at org.springframework.remoting.httpinvoker. SimpleHttpInvokerRequestExecutor.doExecuteRequest( SimpleHttpInvokerRequestExecutor.java:93) On Mon, Apr 16, 2018 at 10:43 PM, Loai Abdallatif wrote: > Hello every one > > I have deployed Core app in worker 0 and got the following error > > > Receive call from the ESB. > consumerKey SC-serviceName RemotePersonService-methodName getPerson > --- > serviceName RemotePersonService-methodNamegetPerson-Error- > METHOD_NOT_FOUND(SC,RemotePersonService,getPerson) > - > ERROR StackTrace - Full Stack Trace: > java.io.InvalidClassException: > org.grails.datastore.gorm.support.BeforeValidateHelper; > local class incompatible: stream classdesc serialVersionUID = 1, local > class serialVersionUID = -8212532861964790326 > > ERROR org.grails.web.errors.GrailsExceptionResolver - > InvalidClassException occurred when processing request: [POST] > /ServiceCatalog/httpinvoker/RemoteESBService > org.grails.datastore.gorm.support.BeforeValidateHelper; local class > incompatible: stream classdesc serialVersionUID = 1, local class > serialVersionUID = -8212532861964790326. Stacktrace follows: > java.io.InvalidClassException: > org.grails.datastore.gorm.support.BeforeValidateHelper; > local class incompatible: stream classdesc serialVersionUID = 1, local > class serialVersionUID = -8212532861964790326 > at java.io.ObjectStreamClass.initNonProxy( > ObjectStreamClass.java:687) > > >
Worker0 ( catalina.out)
Hello every one I have deployed Core app in worker 0 and got the following error Receive call from the ESB. consumerKey SC-serviceName RemotePersonService-methodName getPerson --- serviceName RemotePersonService-methodNamegetPerson-Error-METHOD_NOT_FOUND(SC,RemotePersonService,getPerson) - ERROR StackTrace - Full Stack Trace: java.io.InvalidClassException: org.grails.datastore.gorm.support.BeforeValidateHelper; local class incompatible: stream classdesc serialVersionUID = 1, local class serialVersionUID = -8212532861964790326 ERROR org.grails.web.errors.GrailsExceptionResolver - InvalidClassException occurred when processing request: [POST] /ServiceCatalog/httpinvoker/RemoteESBService org.grails.datastore.gorm.support.BeforeValidateHelper; local class incompatible: stream classdesc serialVersionUID = 1, local class serialVersionUID = -8212532861964790326. Stacktrace follows: java.io.InvalidClassException: org.grails.datastore.gorm.support.BeforeValidateHelper; local class incompatible: stream classdesc serialVersionUID = 1, local class serialVersionUID = -8212532861964790326 at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:687)
Re: Catalina.out not updating
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Akhilesh, On 3/6/18 7:31 AM, Akhilesh ET wrote: > We are facing a situation wherein one of our production servers > running tomcat 6.0.18 is unable to generate logs after service > startup. Logging just stops after service start up. Maybe it's dying of old age. Since you aren't using a package-managed version of Tomcat (and aren't at the mercy of the package-manager), why not upgrade to a version of Tomcat that is riddled with fewer security problems than 6.0.18? Maybe like 6.0.53, released during the current decade. Better yet, upgrade to Tomcat 8.5. If you aren't able to do this now, you should really start looking at doing it in dev/test environments so you can upgrade in the near-future. > The setup is such a way that the control flows from a Apache > Webserver to Jboss application server to Tomcat server. The tomcat > server will connect to the external API URLs and logs should be > generated for the same which is not working from past one week. Just checking: this is tomcat inside JBoss, right? Or do you really have a separate Tomcat that JBoss is talking to (JBoss being a reverse-proxy, or something similar)? > Just to give you an insight we are using source code based tomcat > server and not rpm based. So the service startup is done using > startup.sh script. > > We tried swapping the IP of the server with the one that was > working with no luck (The status was reversed with the server with > same IP still not working). Which means there is something to do > with the IP which is causing that issue (our assumption). Weird. You just swapped the IP addresses of two servers and the problem "moved" along with the IP to the other server? > Please let me know what else needs to checked in order to make > this working. The application itself is working fine. However the > issue is with only the log generation which is very critical for > tracking the application. Are you getting no logs from the application, Tomcat, or both? Tomcat isn't very chatty in catalina.out once it starts up. Really, you should only be seeing critical errors, or notices about application (re)deploying, etc. Does your application log to System.out? If not, I wouldn't expect application logs to go to catalina.out. > Details of troubleshooting done so far : > > 1. Cleared the logs, restarted the service – No luck. > > 2. Cleared the cache of the server and restarted the service > – No luck. > > 3. Rebooted the server multiple times – No Luck. > > 4. Tried starting tomcat from different web root and > upgrading java – No Luck. > > 5. Gave full permissions to tomcat folder and log files – No > Luck Thanks for providing that information. If you are talking about application-logs, you're going to need to provide more information, such as how the application performs logging in general. Are you using an API/framework such as log4j or slf4j? Probably not, if you are using an ancient version of Tomcat like that. Java-logging using java.util.logging? Hmm... also probably not. Are you using ServletContext.log() to perform logging? If so, those logs should be going to an application-specific log in the logs/ directory. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqfAkMdHGNocmlzQGNo cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFiknw/+K+Su0g4BKhbS/ESk xZtqVjDhdd3besh07OukFdquxUzPKottHTPk7Xex7DWwOreOYb3Qtho1UvCpeYOt s2JxsEFGSIIZZlJrlJtoEwfmhsbw1dIocMfSygXtKOH4JrlQOypcoT2sS2Fj5Dql ATIgjvGehZptSKV9R1kwStfVxSrXuiTu281UImwx0wigRM5sw1nZRQBHZ5mDy9VE sVZFNjjpzdP9HpL0g5ZsXM37bDQfsRYlauhvQf1oyDHRu8cMpBOLwm7tpgHat68z DmDHGMtoUalr+TI7zObvmncyuBE70JRj9/MDlo8v/8XqlLwj/12TGcE59KoO2SsC VU8Gp4+FvtaBTlvLukZNgjtkhuJAPhzIG+QpPX7OxNLV2/h56Ej3nAMB5S2WYFJx gESk7bbwSd38rvaIpu3uN9HKQZhq+HYYbZ3grygpjpsPk9t75ihp5EhpLkwtXNiw I76Exu6TTlEWUx1CUso7sfGmgxsslPBPaNKmilQb+hgjoieiH1ulqBQ+HW5fpeZ2 8XTPvysyr/sw6+k8nIsUbE4QEyO+4tpNjMaZjrLMEOr5oOoC/SWzIs9g/NwGANWP hKTa1WJQXk7IhafLDjTCzJcC6WVtGmb+nbtyLNCSOPbl6oVLScLYPHLfbEpU91zG 8rhxWavnYzmJYlqBybjnqgFszvU= =w3Oa -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Catalina.out not updating
Hi Thomas, Thanks for the reply. Yes we have checked that it is fine. Also the same server with the same configuration and permissions is working fine if we change the IP address. Thanks & Regards Akhilesh.E.T ITC Infotech India Ltd., ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005 Mob : +91-9591116360 -Original Message- From: Thomas Rohde [mailto:t...@ordix.de] Sent: Tuesday, March 06, 2018 6:15 PM To: 'Tomcat Users List' Subject: AW: Catalina.out not updating ** This mail has been sent from an external source ** Hi Akhilesh, have you checked your file system permissions? Has the Tomcat runtime user the permissions to write into the log directory? Regards, Thomas BTW: Tomcat 6 ist end of life since 31 December 2016 (https://tomcat.apache.org/tomcat-60-eol.html). Please consider upgrading to Tomcat 9. Von: Akhilesh ET [mailto:akhilesh...@itcinfotech.com] Gesendet: Dienstag, 6. März 2018 13:31 An: users@tomcat.apache.org Betreff: Catalina.out not updating Hi All, We are facing a situation wherein one of our production servers running tomcat 6.0.18 is unable to generate logs after service startup. Logging just stops after service start up. The setup is such a way that the control flows from a Apache Webserver to Jboss application server to Tomcat server. The tomcat server will connect to the external API URLs and logs should be generated for the same which is not working from past one week. Just to give you an insight we are using source code based tomcat server and not rpm based. So the service startup is done using startup.sh script. We tried swapping the IP of the server with the one that was working with no luck (The status was reversed with the server with same IP still not working). Which means there is something to do with the IP which is causing that issue (our assumption). Please let me know what else needs to checked in order to make this working. The application itself is working fine. However the issue is with only the log generation which is very critical for tracking the application. Details of troubleshooting done so far : 1. Cleared the logs, restarted the service – No luck. 2. Cleared the cache of the server and restarted the service – No luck. 3. Rebooted the server multiple times – No Luck. 4. Tried starting tomcat from different web root and upgrading java – No Luck. 5. Gave full permissions to tomcat folder and log files – No Luck Thanks & Regards Akhilesh.E.T ITC Infotech India Ltd., ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005 Disclaimer: This communication is for the exclusive use of the intended recipient(s) and shall not attach any liability on the originator or ITC Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group Companies. If you are the addressee, the contents of this e-mail are intended for your use only and it shall not be forwarded to any third party, without first obtaining written authorization from the originator or ITC Infotech India Ltd./ its Holding company/its Subsidiaries/ its Group Companies. It may contain information which is confidential and legally privileged and the same shall not be used or dealt with by any third party in any manner whatsoever without the specific consent of ITC Infotech India Ltd./ its Holding company/ its Subsidiaries/ its Group Companies. Disclaimer: This communication is for the exclusive use of the intended recipient(s) and shall not attach any liability on the originator or ITC Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group Companies. If you are the addressee, the contents of this e-mail are intended for your use only and it shall not be forwarded to any third party, without first obtaining written authorization from the originator or ITC Infotech India Ltd./ its Holding company/its Subsidiaries/ its Group Companies. It may contain information which is confidential and legally privileged and the same shall not be used or dealt with by any third party in any manner whatsoever without the specific consent of ITC Infotech India Ltd./ its Holding company/ its Subsidiaries/ its Group Companies.
AW: Catalina.out not updating
Hi Akhilesh, have you checked your file system permissions? Has the Tomcat runtime user the permissions to write into the log directory? Regards, Thomas BTW: Tomcat 6 ist end of life since 31 December 2016 (https://tomcat.apache.org/tomcat-60-eol.html). Please consider upgrading to Tomcat 9. Von: Akhilesh ET [mailto:akhilesh...@itcinfotech.com] Gesendet: Dienstag, 6. März 2018 13:31 An: users@tomcat.apache.org Betreff: Catalina.out not updating Hi All, We are facing a situation wherein one of our production servers running tomcat 6.0.18 is unable to generate logs after service startup. Logging just stops after service start up. The setup is such a way that the control flows from a Apache Webserver to Jboss application server to Tomcat server. The tomcat server will connect to the external API URLs and logs should be generated for the same which is not working from past one week. Just to give you an insight we are using source code based tomcat server and not rpm based. So the service startup is done using startup.sh script. We tried swapping the IP of the server with the one that was working with no luck (The status was reversed with the server with same IP still not working). Which means there is something to do with the IP which is causing that issue (our assumption). Please let me know what else needs to checked in order to make this working. The application itself is working fine. However the issue is with only the log generation which is very critical for tracking the application. Details of troubleshooting done so far : 1. Cleared the logs, restarted the service – No luck. 2. Cleared the cache of the server and restarted the service – No luck. 3. Rebooted the server multiple times – No Luck. 4. Tried starting tomcat from different web root and upgrading java – No Luck. 5. Gave full permissions to tomcat folder and log files – No Luck Thanks & Regards Akhilesh.E.T ITC Infotech India Ltd., ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005 Disclaimer: This communication is for the exclusive use of the intended recipient(s) and shall not attach any liability on the originator or ITC Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group Companies. If you are the addressee, the contents of this e-mail are intended for your use only and it shall not be forwarded to any third party, without first obtaining written authorization from the originator or ITC Infotech India Ltd./ its Holding company/its Subsidiaries/ its Group Companies. It may contain information which is confidential and legally privileged and the same shall not be used or dealt with by any third party in any manner whatsoever without the specific consent of ITC Infotech India Ltd./ its Holding company/ its Subsidiaries/ its Group Companies.
Catalina.out not updating
Hi All, We are facing a situation wherein one of our production servers running tomcat 6.0.18 is unable to generate logs after service startup. Logging just stops after service start up. [cid:image001.png@01D3B575.098BBBF0] The setup is such a way that the control flows from a Apache Webserver to Jboss application server to Tomcat server. The tomcat server will connect to the external API URLs and logs should be generated for the same which is not working from past one week. Just to give you an insight we are using source code based tomcat server and not rpm based. So the service startup is done using startup.sh script. We tried swapping the IP of the server with the one that was working with no luck (The status was reversed with the server with same IP still not working). Which means there is something to do with the IP which is causing that issue (our assumption). Please let me know what else needs to checked in order to make this working. The application itself is working fine. However the issue is with only the log generation which is very critical for tracking the application. Details of troubleshooting done so far : 1. Cleared the logs, restarted the service - No luck. 2. Cleared the cache of the server and restarted the service - No luck. 3. Rebooted the server multiple times - No Luck. 4. Tried starting tomcat from different web root and upgrading java - No Luck. 5. Gave full permissions to tomcat folder and log files - No Luck Thanks & Regards Akhilesh.E.T ITC Infotech India Ltd., ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005 Disclaimer: This communication is for the exclusive use of the intended recipient(s) and shall not attach any liability on the originator or ITC Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group Companies. If you are the addressee, the contents of this e-mail are intended for your use only and it shall not be forwarded to any third party, without first obtaining written authorization from the originator or ITC Infotech India Ltd./ its Holding company/its Subsidiaries/ its Group Companies. It may contain information which is confidential and legally privileged and the same shall not be used or dealt with by any third party in any manner whatsoever without the specific consent of ITC Infotech India Ltd./ its Holding company/ its Subsidiaries/ its Group Companies.
Re: No entries being written to catalina.out !!!
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Praveen, On 3/1/18 5:00 AM, Praveen KC wrote: > Dear All - We are seeing a strange behavior in one of our > Production environment since last 2 days. > > The catalina.out file is not getting updated with the application > debug information, we can see only startup messages. This was > working fine and there has been no changes done to the system so > far.> Tomcat version: 6 Upgrade: Tomcat 6 is EOL. How are you launching Tomcat? - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqYEUMACgkQHPApP6U8 pFgIfA//dJn4OC0M7u/s6kA5nD/RDo1pdp3YpEgeA5hSWVsiK6TFE03qkqUzzTiO jokEYIbBTmVSqw51g9W9zY9Uu77Y0y50eRCUcmgNHpsYsEOQfRlut7mM0ud92w3Q hCWEeO731DBmdXH4ebIbgZX0WEW7n/Z34UUAMqN6zGYIJ4dGSIWTGVkEr8KkMQsc Gv2/rON1onHcovu8YRWm7Nty9jOvXoWzDpoWZTp/XDzvnrusppRqdFe44GkUDSQP F50WJ62EpLnG6YcRehPgYp0qFYnVT49v7mCPbYJZRS0uduRo0fCkf+8i/SE000Wn 06BvkhgdVSMYjniAMj9FIHLOXj99M+M52QFGGuNDYAKLdDbhWtZGfC6c29N9l6A5 yFYjZzcmhzITywSQk78Z2XYZ2mzcS8I7CZByJrfUtnycJP7Miw6Ml2nNXJzCnuVF Ow3sZIyUIDrRjFqqxZixJWhcQG6j81eHBi7PidRwVgXbWb8zSoa4kYjhTsKv3eYh ON3Nngr5HPBz851+tO1N1iwKkzKqzB02J1ssIiMdPdrex3B/71tKvA79GmfCB6qd Mv37s3anLHAClC1/XDDMi6P+ybgkLipTS31TaPRvS1GiY8YFvUJJ8BXJA0VlFSnS pzghPPmnZppMmCBz+pPazUUPEwBcCQQIrZiXdJkgOvqUwlIFP8o= =azu4 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: No entries being written to catalina.out !!!
Ramesh - As requested, please find the application log path below: /GDSlogs/GDSCurrentAppLogs Regards, Praveen KC Operations Manager - Infrastructure Services ITC Infotech India Ltd., ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005 Direct : +91-80-2298 9625 Mobile: +91-9886319345 -Original Message- From: Praveen KC Sent: Thursday, March 01, 2018 3:41 PM To: users@tomcat.apache.org Subject: RE: No entries being written to catalina.out !!! Thanks Satish for the quick response. We have already tried below few times, but unsuccessful. Regards, Praveen KC Operations Manager - Infrastructure Services ITC Infotech India Ltd., ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005 Direct : +91-80-2298 9625 Mobile: +91-9886319345 -Original Message- From: Satish Chhatpar 02 [mailto:chhatp...@cpwplc.com] Sent: Thursday, March 01, 2018 3:35 PM To: users@tomcat.apache.org Subject: Re: No entries being written to catalina.out !!! ** This mail has been sent from an external source ** Try this 1. stop tomcat 2. take backup of all logs 3. deleted all logs 4. start tomcat Regards Satish Chhatpar From: Praveen KC Sent: Thursday, March 1, 2018 3:30:51 PM To: users@tomcat.apache.org Subject: No entries being written to catalina.out !!! Dear All - We are seeing a strange behavior in one of our Production environment since last 2 days. The catalina.out file is not getting updated with the application debug information, we can see only startup messages. This was working fine and there has been no changes done to the system so far. Tomcat version: 6 Has anyone faced this issue before? Please advise. Regards, Praveen KC Operations Manager - Infrastructure Services ITC Infotech India Ltd., ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005 Direct : +91-80-2298 9625 Mobile: +91-9886319345 Disclaimer: This communication is for the exclusive use of the intended recipient(s) and shall not attach any liability on the originator or ITC Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group Companies. If you are the addressee, the contents of this e-mail are intended for your use only and it shall not be forwarded to any third party, without first obtaining written authorization from the originator or ITC Infotech India Ltd./ its Holding company/its Subsidiaries/ its Group Companies. It may contain information which is confidential and legally privileged and the same shall not be used or dealt with by any third party in any manner whatsoever without the specific consent of ITC Infotech India Ltd./ its Holding company/ its Subsidiaries/ its Group Companies. ::DISCLAIMER:: Confidentiality Notice from Dixons Carphone plc (registered in England & Wales No.07105905) of 1 Portal Way, London, W3 6RS ("Dixons Carphone"). The information contained in this e-mail and any attachments may be legally privileged, proprietary and/or confidential. If you received this e-mail in error, please notify the sender by return, permanently delete the e-mail and destroy all hard copies immediately. No warranty is made as to the completeness or accuracy of the information contained in this e-mail. Opinions, conclusions and statements of intent in this e-mail are those of the sender and will not bind any Dixons Carphone group company (Dixons Carphone Group) unless confirmed by an authorised representative independently of this e-mail. We do not accept responsibility for viruses; you must scan for these. E-mails sent to and from Dixons Carphone Group are routinely monitored for record keeping, quality control, training purposes, to ensure regulatory compliance and to prevent viruses and unauthorised use of our computer systems. The Carphone Warehouse Limited (registered in England & Wales No.02142673) is a member of the Dixons Carphone Group and is authorised and regulated by the Financial Conduct Authority. Disclaimer: This communication is for the exclusive use of the intended recipient(s) and shall not attach any liability on the originator or ITC Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group Companies. If you are the addressee, the contents of this e-mail are intended for your use only and it shall not be forwarded to any third party, without first obtaining written authorization from the originator or ITC Infotech India Ltd./ its Holding company/its Subsidiaries/ its Group Companies. It may contain information which is confidential and legally privileged and the same shall not be used or dealt with by any third party in any manner whatsoever without the specific consent of ITC Infote
RE: No entries being written to catalina.out !!!
Thanks Satish for the quick response. We have already tried below few times, but unsuccessful. Regards, Praveen KC Operations Manager - Infrastructure Services ITC Infotech India Ltd., ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005 Direct : +91-80-2298 9625 Mobile: +91-9886319345 -Original Message- From: Satish Chhatpar 02 [mailto:chhatp...@cpwplc.com] Sent: Thursday, March 01, 2018 3:35 PM To: users@tomcat.apache.org Subject: Re: No entries being written to catalina.out !!! ** This mail has been sent from an external source ** Try this 1. stop tomcat 2. take backup of all logs 3. deleted all logs 4. start tomcat Regards Satish Chhatpar From: Praveen KC Sent: Thursday, March 1, 2018 3:30:51 PM To: users@tomcat.apache.org Subject: No entries being written to catalina.out !!! Dear All - We are seeing a strange behavior in one of our Production environment since last 2 days. The catalina.out file is not getting updated with the application debug information, we can see only startup messages. This was working fine and there has been no changes done to the system so far. Tomcat version: 6 Has anyone faced this issue before? Please advise. Regards, Praveen KC Operations Manager - Infrastructure Services ITC Infotech India Ltd., ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005 Direct : +91-80-2298 9625 Mobile: +91-9886319345 Disclaimer: This communication is for the exclusive use of the intended recipient(s) and shall not attach any liability on the originator or ITC Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group Companies. If you are the addressee, the contents of this e-mail are intended for your use only and it shall not be forwarded to any third party, without first obtaining written authorization from the originator or ITC Infotech India Ltd./ its Holding company/its Subsidiaries/ its Group Companies. It may contain information which is confidential and legally privileged and the same shall not be used or dealt with by any third party in any manner whatsoever without the specific consent of ITC Infotech India Ltd./ its Holding company/ its Subsidiaries/ its Group Companies. ::DISCLAIMER:: Confidentiality Notice from Dixons Carphone plc (registered in England & Wales No.07105905) of 1 Portal Way, London, W3 6RS ("Dixons Carphone"). The information contained in this e-mail and any attachments may be legally privileged, proprietary and/or confidential. If you received this e-mail in error, please notify the sender by return, permanently delete the e-mail and destroy all hard copies immediately. No warranty is made as to the completeness or accuracy of the information contained in this e-mail. Opinions, conclusions and statements of intent in this e-mail are those of the sender and will not bind any Dixons Carphone group company (Dixons Carphone Group) unless confirmed by an authorised representative independently of this e-mail. We do not accept responsibility for viruses; you must scan for these. E-mails sent to and from Dixons Carphone Group are routinely monitored for record keeping, quality control, training purposes, to ensure regulatory compliance and to prevent viruses and unauthorised use of our computer systems. The Carphone Warehouse Limited (registered in England & Wales No.02142673) is a member of the Dixons Carphone Group and is authorised and regulated by the Financial Conduct Authority. Disclaimer: This communication is for the exclusive use of the intended recipient(s) and shall not attach any liability on the originator or ITC Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group Companies. If you are the addressee, the contents of this e-mail are intended for your use only and it shall not be forwarded to any third party, without first obtaining written authorization from the originator or ITC Infotech India Ltd./ its Holding company/its Subsidiaries/ its Group Companies. It may contain information which is confidential and legally privileged and the same shall not be used or dealt with by any third party in any manner whatsoever without the specific consent of ITC Infotech India Ltd./ its Holding company/ its Subsidiaries/ its Group Companies. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: No entries being written to catalina.out !!!
Try this 1. stop tomcat 2. take backup of all logs 3. deleted all logs 4. start tomcat Regards Satish Chhatpar From: Praveen KC Sent: Thursday, March 1, 2018 3:30:51 PM To: users@tomcat.apache.org Subject: No entries being written to catalina.out !!! Dear All - We are seeing a strange behavior in one of our Production environment since last 2 days. The catalina.out file is not getting updated with the application debug information, we can see only startup messages. This was working fine and there has been no changes done to the system so far. Tomcat version: 6 Has anyone faced this issue before? Please advise. Regards, Praveen KC Operations Manager - Infrastructure Services ITC Infotech India Ltd., ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005 Direct : +91-80-2298 9625 Mobile: +91-9886319345 Disclaimer: This communication is for the exclusive use of the intended recipient(s) and shall not attach any liability on the originator or ITC Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group Companies. If you are the addressee, the contents of this e-mail are intended for your use only and it shall not be forwarded to any third party, without first obtaining written authorization from the originator or ITC Infotech India Ltd./ its Holding company/its Subsidiaries/ its Group Companies. It may contain information which is confidential and legally privileged and the same shall not be used or dealt with by any third party in any manner whatsoever without the specific consent of ITC Infotech India Ltd./ its Holding company/ its Subsidiaries/ its Group Companies. ::DISCLAIMER:: Confidentiality Notice from Dixons Carphone plc (registered in England & Wales No.07105905) of 1 Portal Way, London, W3 6RS ("Dixons Carphone"). The information contained in this e-mail and any attachments may be legally privileged, proprietary and/or confidential. If you received this e-mail in error, please notify the sender by return, permanently delete the e-mail and destroy all hard copies immediately. No warranty is made as to the completeness or accuracy of the information contained in this e-mail. Opinions, conclusions and statements of intent in this e-mail are those of the sender and will not bind any Dixons Carphone group company (Dixons Carphone Group) unless confirmed by an authorised representative independently of this e-mail. We do not accept responsibility for viruses; you must scan for these. E-mails sent to and from Dixons Carphone Group are routinely monitored for record keeping, quality control, training purposes, to ensure regulatory compliance and to prevent viruses and unauthorised use of our computer systems. The Carphone Warehouse Limited (registered in England & Wales No.02142673) is a member of the Dixons Carphone Group and is authorised and regulated by the Financial Conduct Authority.
No entries being written to catalina.out !!!
Dear All - We are seeing a strange behavior in one of our Production environment since last 2 days. The catalina.out file is not getting updated with the application debug information, we can see only startup messages. This was working fine and there has been no changes done to the system so far. Tomcat version: 6 Has anyone faced this issue before? Please advise. Regards, Praveen KC Operations Manager - Infrastructure Services ITC Infotech India Ltd., ITC Infotech Park, #18 Banaswadi Main Road, Bangalore - 560005 Direct : +91-80-2298 9625 Mobile: +91-9886319345 Disclaimer: This communication is for the exclusive use of the intended recipient(s) and shall not attach any liability on the originator or ITC Infotech India Ltd./its Holding company/ its Subsidiaries/ its Group Companies. If you are the addressee, the contents of this e-mail are intended for your use only and it shall not be forwarded to any third party, without first obtaining written authorization from the originator or ITC Infotech India Ltd./ its Holding company/its Subsidiaries/ its Group Companies. It may contain information which is confidential and legally privileged and the same shall not be used or dealt with by any third party in any manner whatsoever without the specific consent of ITC Infotech India Ltd./ its Holding company/ its Subsidiaries/ its Group Companies.
Re: Tomcat 7 giving java.lang.OutOfMemoryError: unable to create new native thread Exception in Catalina.out after upgrading to RHEL 7.4
On Tue, Sep 19, 2017 at 9:53 AM, Suvendu Sekhar Mondal wrote: > Radhika, > > On Tue, Sep 19, 2017 at 2:21 PM, Peddi, Radhika (Radhika) > wrote: >> Hi, >> >> We have upgraded RHEL 7.2 to RHEL 7.4. After upgrade when we are running >> performance testing of our application we are seeing below error in >> catalina.out. >> >> java.lang.OutOfMemoryError: unable to create new native thread Exception in >> Catalina.out after upgrading to RHEL 7.4 As stated before, this is a limitation on the number of threads spawned by the process imposed by the OS. In order to resolve it, you need to either increase nproc/nofile or decrease the number of threads that the Tomcat process is spawning. Check the ulimit for your user and compare that to the number of threads that you have configured. If you're on a 32-bit machine, it may be a problem with the process size, but RHEL-7 is only on 64-bit AFAIK so that shouldn't be your issue :) > > This simply indicates that JVM was trying to create a new thread and > OS can't create any new thread simply because native memory space was > exhausted. This limit is very much platform dependent. > > Is your app opening too many threads? On my Windows 10 laptop with > 32GB RAM and JDK 1.8, I can open 53+ threads before run into this > OOM problem. You can find it by monitoring Tomcat instance. So far I > ran into this problem one time - couple of years ago. We got away > after adding some memory and by reducing thread stack size. > > Another thing can happen, you might have lost some OS setting(which > was used to bump up the default OS limit) while upgrading from one > version to another; which was preventing this issue from occurring so > far - just speculating. And this is not a Tomcat's problem. :) > >> Attached is the thread dump. >> >> We are using Tomcat 7.0.69. >> >> As per REDHAT we have increased tomcat5 user which used to run Tomcat >> process in /etc/security/limits.d/20-nproc.conf like below >> >> * soft nproc 4096 >> root soft nproc unlimited >> tomcat5 soft nproc 8192 >> >> All the processes are used by Tomcat. If we increase the value to 16K or 32K >> all threads are consumed and they are in Waiting(Parking) state. >> >> "http-bio-8443-exec-56" #973 daemon prio=5 os_prio=0 tid=0x7efc8c029800 >> nid=0x10e7b waiting on condition [0x7ef9bc7ee000] >>java.lang.Thread.State: WAITING (parking) >> at sun.misc.Unsafe.park(Native Method) >> - parking to wait for <0x0003c454c008> (a >> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) >> at >> java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) >> at >> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) >> at >> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) >> at >> org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) >> at >> org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) >> at >> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) >> at >> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) >> at java.lang.Thread.run(Thread.java:745) >> >> "http-bio-8443-exec-55" #972 daemon prio=5 os_prio=0 tid=0x7efc0401e000 >> nid=0x10e7a waiting on condition [0x7ef9bc82f000] >>java.lang.Thread.State: WAITING (parking) >> at sun.misc.Unsafe.park(Native Method) >> - parking to wait for <0x0003c454c008> (a >> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) >> at >> java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) >> at >> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) >> at >> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) >> at >> org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) >> at >> org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) >>
Re: Tomcat 7 giving java.lang.OutOfMemoryError: unable to create new native thread Exception in Catalina.out after upgrading to RHEL 7.4
Radhika, On Tue, Sep 19, 2017 at 2:21 PM, Peddi, Radhika (Radhika) wrote: > Hi, > > We have upgraded RHEL 7.2 to RHEL 7.4. After upgrade when we are running > performance testing of our application we are seeing below error in > catalina.out. > > java.lang.OutOfMemoryError: unable to create new native thread Exception in > Catalina.out after upgrading to RHEL 7.4 > This simply indicates that JVM was trying to create a new thread and OS can't create any new thread simply because native memory space was exhausted. This limit is very much platform dependent. Is your app opening too many threads? On my Windows 10 laptop with 32GB RAM and JDK 1.8, I can open 53+ threads before run into this OOM problem. You can find it by monitoring Tomcat instance. So far I ran into this problem one time - couple of years ago. We got away after adding some memory and by reducing thread stack size. Another thing can happen, you might have lost some OS setting(which was used to bump up the default OS limit) while upgrading from one version to another; which was preventing this issue from occurring so far - just speculating. And this is not a Tomcat's problem. :) > Attached is the thread dump. > > We are using Tomcat 7.0.69. > > As per REDHAT we have increased tomcat5 user which used to run Tomcat process > in /etc/security/limits.d/20-nproc.conf like below > > * soft nproc 4096 > root soft nproc unlimited > tomcat5 soft nproc 8192 > > All the processes are used by Tomcat. If we increase the value to 16K or 32K > all threads are consumed and they are in Waiting(Parking) state. > > "http-bio-8443-exec-56" #973 daemon prio=5 os_prio=0 tid=0x7efc8c029800 > nid=0x10e7b waiting on condition [0x7ef9bc7ee000] >java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0x0003c454c008> (a > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) > at > java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) > at > java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) > at > java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:745) > > "http-bio-8443-exec-55" #972 daemon prio=5 os_prio=0 tid=0x7efc0401e000 > nid=0x10e7a waiting on condition [0x7ef9bc82f000] >java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0x0003c454c008> (a > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) > at > java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) > at > java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) > at > java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:745) > > They are not getting release. After some time Tomcat getting stopped > automatically. You may need the output of below from our setup. > > [root@iqsvtk05<mailto:root@iqsvtk05> ~]# rpm -qif > /opt/coreservices/tomcat-7.0.69/logs/ > Name : tomcat > Version : 7.0.69 > Release : AV10 > Architecture: x86_64 > Install Date: Fri 18 Aug 2017 01:41:54 AM MDT > Group : Sy
Re: Tomcat 7 giving java.lang.OutOfMemoryError: unable to create new native thread Exception in Catalina.out after upgrading to RHEL 7.4
On 19/09/17 09:51, Peddi, Radhika (Radhika) wrote: > Hi, > > We have upgraded RHEL 7.2 to RHEL 7.4. After upgrade when we are running > performance testing of our application we are seeing below error in > catalina.out. > > java.lang.OutOfMemoryError: unable to create new native thread Exception in > Catalina.out after upgrading to RHEL 7.4 > > Attached is the thread dump. Attachments get dropped by the list. Best to post the thread dump somewhere and link to it. > We are using Tomcat 7.0.69. That is quite old. There have been a few security vulnerabilities disclosed since then. If you haven't already, make sure none of them are a risk for you. > As per REDHAT we have increased tomcat5 user which used to run Tomcat process > in /etc/security/limits.d/20-nproc.conf like below tomcat5 ? That looks odd. I don't know anything about how RedHat packages Tomcat but I'd expect that to be tomcat7. It makes me wonder if there is some old Tomcat 5 configuration hanging around causing problems. > * soft nproc 4096 > root soft nproc unlimited > tomcat5 soft nproc 8192 > > All the processes are used by Tomcat. If we increase the value to 16K or 32K > all threads are consumed and they are in Waiting(Parking) state. > > "http-bio-8443-exec-56" #973 daemon prio=5 os_prio=0 tid=0x7efc8c029800 > nid=0x10e7b waiting on condition [0x7ef9bc7ee000] >java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0x0003c454c008> (a > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) > at > java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) > at > java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) > at > java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:745) That is perfectly normal. It is an idle thread waiting for a request to process. > "http-bio-8443-exec-55" #972 daemon prio=5 os_prio=0 tid=0x7efc0401e000 > nid=0x10e7a waiting on condition [0x7ef9bc82f000] >java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0x0003c454c008> (a > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) > at > java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) > at > java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) > at > java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:745) Likewise. > They are not getting release. As expected. > After some time Tomcat getting stopped automatically. By what? Or do you mean the OOME? > You may need the output of below from our setup. > > [root@iqsvtk05<mailto:root@iqsvtk05> ~]# rpm -qif > /opt/coreservices/tomcat-7.0.69/logs/ > Name : tomcat > Version : 7.0.69 > Release : AV10 > Architecture: x86_64 > Install Date: Fri 18 Aug 2017 01:41:54 AM MDT > Group : System Environment/Daemons > Size : 8468465 > License : Apache License, Version 2.0 > Signature : (none) > Source RPM : tomcat-7.0.69-AV10.src.rpm > Build Date : Fri 24 Jun 2016 01:59:37 AM MDT > Build H
RE: Tomcat 7 giving java.lang.OutOfMemoryError: unable to create new native thread Exception in Catalina.out after upgrading to RHEL 7.4
Thanks for the response we will try this. Regards, Radhika -Original Message- From: Zdeněk Henek [mailto:vrab...@gmail.com] Sent: Tuesday, September 19, 2017 2:27 PM To: users@tomcat.apache.org Subject: Re: Tomcat 7 giving java.lang.OutOfMemoryError: unable to create new native thread Exception in Catalina.out after upgrading to RHEL 7.4 Hi, try configure HTTP NIO https://urldefense.proofpoint.com/v2/url?u=https-3A__tomcat.apache.org_tomcat-2D7.0-2Ddoc_config_http.html-23NIO-5Fspecific-5Fconfiguration&d=DwIFaQ&c=BFpWQw8bsuKpl1SgiZH64Q&r=W2ISzfcNZyKTlMxlNJ9FPQ&m=LAXeta_7sl2gYpz48nwzAR9XkW3dKO7EMeo2ogEl3_4&s=QlTtns7hmM6TFpupVKM93CQfMd1o0tsF1cj3-aPBKOo&e= or upgrade to Tomcat 8 where HTTP NIO is on by default. This could help in case your server is able to process the requests e.g. you have spike where you have to process thousands of requests, but these are quick and you don't care much how quickly you get response. Regards, Zdenek Henek út 19. 9. 2017 v 10:51 odesílatel Peddi, Radhika (Radhika) napsal: > Hi, > > We have upgraded RHEL 7.2 to RHEL 7.4. After upgrade when we are > running performance testing of our application we are seeing below > error in catalina.out. > > java.lang.OutOfMemoryError: unable to create new native thread > Exception in Catalina.out after upgrading to RHEL 7.4 > > Attached is the thread dump. > > We are using Tomcat 7.0.69. > > As per REDHAT we have increased tomcat5 user which used to run Tomcat > process in /etc/security/limits.d/20-nproc.conf like below > > * soft nproc 4096 > root soft nproc unlimited > tomcat5 soft nproc 8192 > > All the processes are used by Tomcat. If we increase the value to 16K > or 32K all threads are consumed and they are in Waiting(Parking) state. > > "http-bio-8443-exec-56" #973 daemon prio=5 os_prio=0 > tid=0x7efc8c029800 nid=0x10e7b waiting on condition [0x7ef9bc7ee000] >java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0x0003c454c008> (a > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) > at > java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) > at > java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) > at > java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:745) > > "http-bio-8443-exec-55" #972 daemon prio=5 os_prio=0 > tid=0x7efc0401e000 nid=0x10e7a waiting on condition [0x7ef9bc82f000] >java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0x0003c454c008> (a > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) > at > java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) > at > java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) > at > java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:745) > > They are not getting release. After some time Tomcat getting stopped > automatically. You may need the output of below from our setup. > > [root@iqsvtk05<mailto:root@iqsvtk05> ~]# rpm -qif > /opt/coreservices/tomcat-7.0.
Re: Tomcat 7 giving java.lang.OutOfMemoryError: unable to create new native thread Exception in Catalina.out after upgrading to RHEL 7.4
Hi, try configure HTTP NIO https://tomcat.apache.org/tomcat-7.0-doc/config/http.html#NIO_specific_configuration or upgrade to Tomcat 8 where HTTP NIO is on by default. This could help in case your server is able to process the requests e.g. you have spike where you have to process thousands of requests, but these are quick and you don't care much how quickly you get response. Regards, Zdenek Henek út 19. 9. 2017 v 10:51 odesílatel Peddi, Radhika (Radhika) napsal: > Hi, > > We have upgraded RHEL 7.2 to RHEL 7.4. After upgrade when we are running > performance testing of our application we are seeing below error in > catalina.out. > > java.lang.OutOfMemoryError: unable to create new native thread Exception > in Catalina.out after upgrading to RHEL 7.4 > > Attached is the thread dump. > > We are using Tomcat 7.0.69. > > As per REDHAT we have increased tomcat5 user which used to run Tomcat > process in /etc/security/limits.d/20-nproc.conf like below > > * soft nproc 4096 > root soft nproc unlimited > tomcat5 soft nproc 8192 > > All the processes are used by Tomcat. If we increase the value to 16K or > 32K all threads are consumed and they are in Waiting(Parking) state. > > "http-bio-8443-exec-56" #973 daemon prio=5 os_prio=0 > tid=0x7efc8c029800 nid=0x10e7b waiting on condition [0x7ef9bc7ee000] >java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0x0003c454c008> (a > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) > at > java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) > at > java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) > at > java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:745) > > "http-bio-8443-exec-55" #972 daemon prio=5 os_prio=0 > tid=0x7efc0401e000 nid=0x10e7a waiting on condition [0x7ef9bc82f000] >java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0x0003c454c008> (a > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) > at > java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) > at > java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) > at > org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) > at > java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:745) > > They are not getting release. After some time Tomcat getting stopped > automatically. You may need the output of below from our setup. > > [root@iqsvtk05<mailto:root@iqsvtk05> ~]# rpm -qif > /opt/coreservices/tomcat-7.0.69/logs/ > Name : tomcat > Version : 7.0.69 > Release : AV10 > Architecture: x86_64 > Install Date: Fri 18 Aug 2017 01:41:54 AM MDT > Group : System Environment/Daemons > Size : 8468465 > License : Apache License, Version 2.0 > Signature : (none) > Source RPM : tomcat-7.0.69-AV10.src.rpm > Build Date : Fri 24 Jun 2016 01:59:37 AM MDT > Build Host : puiqx3650dev03.apac.avaya.com > Relocations : /usr/share > Packager : Avaya, Inc. > Vendor : Apache Software Foundation > URL : http://tomcat.apache.org/ > Summary : Core Services Apache Jak
Tomcat 7 giving java.lang.OutOfMemoryError: unable to create new native thread Exception in Catalina.out after upgrading to RHEL 7.4
Hi, We have upgraded RHEL 7.2 to RHEL 7.4. After upgrade when we are running performance testing of our application we are seeing below error in catalina.out. java.lang.OutOfMemoryError: unable to create new native thread Exception in Catalina.out after upgrading to RHEL 7.4 Attached is the thread dump. We are using Tomcat 7.0.69. As per REDHAT we have increased tomcat5 user which used to run Tomcat process in /etc/security/limits.d/20-nproc.conf like below * soft nproc 4096 root soft nproc unlimited tomcat5 soft nproc 8192 All the processes are used by Tomcat. If we increase the value to 16K or 32K all threads are consumed and they are in Waiting(Parking) state. "http-bio-8443-exec-56" #973 daemon prio=5 os_prio=0 tid=0x7efc8c029800 nid=0x10e7b waiting on condition [0x7ef9bc7ee000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x0003c454c008> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) "http-bio-8443-exec-55" #972 daemon prio=5 os_prio=0 tid=0x7efc0401e000 nid=0x10e7a waiting on condition [0x7ef9bc82f000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x0003c454c008> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) They are not getting release. After some time Tomcat getting stopped automatically. You may need the output of below from our setup. [root@iqsvtk05<mailto:root@iqsvtk05> ~]# rpm -qif /opt/coreservices/tomcat-7.0.69/logs/ Name : tomcat Version : 7.0.69 Release : AV10 Architecture: x86_64 Install Date: Fri 18 Aug 2017 01:41:54 AM MDT Group : System Environment/Daemons Size : 8468465 License : Apache License, Version 2.0 Signature : (none) Source RPM : tomcat-7.0.69-AV10.src.rpm Build Date : Fri 24 Jun 2016 01:59:37 AM MDT Build Host : puiqx3650dev03.apac.avaya.com Relocations : /usr/share Packager : Avaya, Inc. Vendor : Apache Software Foundation URL : http://tomcat.apache.org/ Summary : Core Services Apache Jakarta Servlet/JSP server Description : Servlet container for developing Web applications in Java. Used as basis for the Reference Implementation of the Servlet and JSP specificiations. This RPM mirrors the layout used by official Tomcat distributions on all other OSes and linux variants. If you want a FHS-based package - be warned that tomcat may not work very well. (TODO: add more warnings !). If you still want FHS-based package - please use jpackage.org or an RPM that is using the same exact layout. Can you please help on this. Regards, Radhika
Re: rotate catalina.out
Am 13.04.2017 um 14:57 schrieb shivashankar manukondu: Is there any possibility loss the log information in case if we use any external tools like Log4j, logrotete I suggest you make the adjustment to your conf/logging.properties that I mentioned. You should also make sure, that no application log configuration uses a stdout, console etc. appender. As a result, your catalina.out will no longer receive log messages, only if a developer decided to directly write to STDOUT instead of using a log framework. Log4j is no external tool. logrotate and similar are and yes, depending on details there is sometimes a risk of using log information due to external rotation. Regards, Rainer On Wed, Apr 12, 2017 at 4:32 PM, Rainer Jung wrote: Am 12.04.2017 um 16:15 schrieb Mark Thomas: On 12/04/17 14:13, shivashankar manukondu wrote: Hi, Do we have any default catalina.out <https://wiki.apache.org/tomcat/FAQ/Logging#Q10> rotation in the tomcat8 without using any external tool like Log4J or logrotate. No. But since catalina.out is only what is written to stdout is should be mostly (ideally entirely) empty. Aren't we currently still copying everything to STDOUT by default? In logging.properties: .handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler So once people switch this to production style config .handlers = 1catalina.org.apache.juli.AsyncFileHandler your statement would apply. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: rotate catalina.out
Is there any possibility loss the log information in case if we use any external tools like Log4j, logrotete Regards, Siva On Wed, Apr 12, 2017 at 4:32 PM, Rainer Jung wrote: > Am 12.04.2017 um 16:15 schrieb Mark Thomas: > >> On 12/04/17 14:13, shivashankar manukondu wrote: >> >>> Hi, >>> >>> Do we have any default catalina.out >>> <https://wiki.apache.org/tomcat/FAQ/Logging#Q10> rotation in the tomcat8 >>> without using any external tool like Log4J or logrotate. >>> >> >> No. But since catalina.out is only what is written to stdout is should >> be mostly (ideally entirely) empty. >> > > Aren't we currently still copying everything to STDOUT by default? > > In logging.properties: > > .handlers = 1catalina.org.apache.juli.AsyncFileHandler, > java.util.logging.ConsoleHandler > > So once people switch this to production style config > > .handlers = 1catalina.org.apache.juli.AsyncFileHandler > > your statement would apply. > > Regards, > > Rainer > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Regards Siva #068860592040
Re: rotate catalina.out
Am 12.04.2017 um 16:15 schrieb Mark Thomas: On 12/04/17 14:13, shivashankar manukondu wrote: Hi, Do we have any default catalina.out <https://wiki.apache.org/tomcat/FAQ/Logging#Q10> rotation in the tomcat8 without using any external tool like Log4J or logrotate. No. But since catalina.out is only what is written to stdout is should be mostly (ideally entirely) empty. Aren't we currently still copying everything to STDOUT by default? In logging.properties: .handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler So once people switch this to production style config .handlers = 1catalina.org.apache.juli.AsyncFileHandler your statement would apply. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: rotate catalina.out
On 12/04/17 14:13, shivashankar manukondu wrote: > Hi, > > Do we have any default catalina.out > <https://wiki.apache.org/tomcat/FAQ/Logging#Q10> rotation in the tomcat8 > without using any external tool like Log4J or logrotate. No. But since catalina.out is only what is written to stdout is should be mostly (ideally entirely) empty. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
rotate catalina.out
Hi, Do we have any default catalina.out <https://wiki.apache.org/tomcat/FAQ/Logging#Q10> rotation in the tomcat8 without using any external tool like Log4J or logrotate. Also should not be loss any logs while rotating. -- Regards Manu
Re: Question about catalina.out log entries, particularly from VersionLoggerListener
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 James, On 1/31/17 8:48 PM, James H. H. Lampert wrote: > On 1/31/17, 2:32 PM, Christopher Schultz wrote: >>> But what about the "JVM Version" entry? >> >> That comes directly from the "java.runtime.version" system >> property, which I believe is read-only. (At least, you can't >> override it when launching the JVM by providing a value for that >> property using - -Djava.runtime.version=foobar). So that string >> is coming from your JVM. It's opaque to Tomcat. > . . . >> If you do a "java -version" from the command-line, you'll >> probably see that string in there, similar to what is shown on >> this page: > > Thanks. That answered it. > > One other thing: I notice that in a couple of those customer > installations, I'm not getting the "VersionLoggerListener" messages > at all. Is that from some logging level setting? I can think of a few reasons why those lines might not be in the log: 1. Log level set to higher than INFO 2. VersionLoggerListener is not enabled in server.xml 3. Tomcat version is old enough that VLL isn't included I suspect it's #2, and that the server.xml configuration pre-dates the addition of VLL to Tomcat, and nobody ever noticed that it was available and not configured. If your customers are anything like me, I don't do a diff on my server.xml against the stock server.xml unless I'm switching between major versions of Tomcat. So it would be easy to overlook the addition of the VersionLoggerListener, which was added to a point-release at some point to both Tomcat 7 and 8. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJYkffTAAoJEBzwKT+lPKRYZQAQALBz3fqpV4dybdFZsSqA4o3N FxuQHy9W2OCukAfFqUbCyD13ivfhTOWoX8qjp4DaEIjPhTHP9FXBDB6KhFra/95S 4huU0sC1ilaG2Lw5c8aguvf//hCYet8hGXg5sw64zv+mYBFqlW8YrdsllyUt8LvU vvchUMioi4r1bVoDwH7/RlFoRSFdVKKw7BCNRLnwhDkNnMRXf72pFWvbZnhJIe21 Z1jQAmGFVKA+k9IxdGgPWZuMvd6dkT2+Z8im6Lj+6/NGm5kHZBkxf0tpUE56dSLl bQZtyregC2HMD+cCofoFo4WVJFFEy3Yf6Flb+MQHUJ4SOOcqBX4WUS2OD8evkwY5 eMfVoEZQbchm9CLUY2BEcDs/le/TSiL1jBsY8fC2lirOAw09EDrHFjl23HDHr4pS tb7m1ChEd8sgstEYwMw8hH68aYPUkVafH+XAHbz4ofWqVkpOPqEOGl0wxMXV25bU 73iBe+K5Z66Xbs7zCkYvxPaeEGluY1tcvDMhhKSoEqZu6Rlagwc8eJ8LPQqrritX 3quIuSjU9yXLphWWjf9UF4PfUrGDpwf/VpDZOmogPoOtcFiNP7tHYGw2TptIHt+M NVKcz2+fr4QpXLv4fJq7N4XeZrRS1VUGnBvgtYaxYegjZccMEkAccT+5HW3wYz5H tFzRJMq+CDGvielyn5sa =wVRH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Question about catalina.out log entries, particularly from VersionLoggerListener
On 1/31/17, 2:32 PM, Christopher Schultz wrote: But what about the "JVM Version" entry? That comes directly from the "java.runtime.version" system property, which I believe is read-only. (At least, you can't override it when launching the JVM by providing a value for that property using - -Djava.runtime.version=foobar). So that string is coming from your JVM. It's opaque to Tomcat. . . . If you do a "java -version" from the command-line, you'll probably see that string in there, similar to what is shown on this page: Thanks. That answered it. One other thing: I notice that in a couple of those customer installations, I'm not getting the "VersionLoggerListener" messages at all. Is that from some logging level setting? -- JHHL - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Question about catalina.out log entries, particularly from VersionLoggerListener
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 James, On 1/31/17 2:47 PM, James H. H. Lampert wrote: > We're comparing a number of Tomcat installations at various > customers, trying to figure out why some of them are slow for no > apparent reason. > > We've started comparing the "JVM Version" entry in catalina.out, > entries on the order of: > >> May 26, 2015 12:21:21 PM >> org.apache.catalina.startup.VersionLoggerListener log INFO: Java >> Home: /QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit/jre May 26, 2015 >> 12:21:21 PM org.apache.catalina.startup.VersionLoggerListener >> log INFO: JVM Version: jvmap3260sr16fp2-20141026_01 May >> 26, 2015 12:21:21 PM >> org.apache.catalina.startup.VersionLoggerListener log > > Java Home is fairly explicit, since it matches the known path to > where the JVM lives. > > But what about the "JVM Version" entry? That comes directly from the "java.runtime.version" system property, which I believe is read-only. (At least, you can't override it when launching the JVM by providing a value for that property using - -Djava.runtime.version=foobar). So that string is coming from your JVM. It's opaque to Tomcat. Here's the code: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/start up/VersionLoggerListener.java?revision=1654159&view=markup#l103 If you do a "java -version" from the command-line, you'll probably see that string in there, similar to what is shown on this page: http://archive.midrange.com/midrange-l/201504/msg00568.html (Searching Google for "jvmap3260sr16fp2-20141026_01" yields only 6 results. That's amazing.) - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJYkRCYAAoJEBzwKT+lPKRYc0UP/ihxQvahCXkPhvttmy+QzPKO a2W48Ux69T153mpb0pquwOMPhPFmFu7pZWS8E13AGti3jxvncKkkqP6AP179aEzL PqdW51dE4ud4DpTRxJ5894Pjb8lsCJG+ckNp1QGpsXYoAcVwbPwGdJ21eDGi2+Ii VrRIJNcC63/2SCebkIygx/ijt/G5321WP/GPo4eaTo/WOcKqvV3uFZcg9HFWRPCq KqqYsw9I/F9bVhIQj5fdsfBttqFjqVjL/zIX0pBsuQFI9fccQUuKJrYVuuIu0WyR 5IB9QOEgBsnBeEoYzHBbuUT7c9RR4i+PCv1SfHz1idbgDNI/sMkShvw4DiKCeDoD WYEPIcjiIJH72lpOhJojlrX5jPzcE5ChK4OSzmWSZZqHTURm6HoBmyRuJDYaVfiG lLL5cY/1vrdXNu6PYKtTm3EdmtQ6BYWxd7YNjC4HohisZokspCoYZWnolcTZqeVs b/KONum3q3rHFihhia1XJRLbkNjEOacnLMO9r+KMSf2+ql9oqUUCGOr9VtxQDLzh H/mPwozhPEuXUXME3TBAW/553vJRrR257AzGdFpdnxPfuM0Sg9zHUl3UFzTVBro3 glQOTRd18ibkla4Qm6PAVk4fPutnPYlQhuX/8CZn69G2QjNl6a5uKy6RibZEQ+nc PQZymwHvV71gPA8kcCLl =1S8h -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Question about catalina.out log entries, particularly from VersionLoggerListener
We're comparing a number of Tomcat installations at various customers, trying to figure out why some of them are slow for no apparent reason. We've started comparing the "JVM Version" entry in catalina.out, entries on the order of: May 26, 2015 12:21:21 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Java Home: /QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit/jre May 26, 2015 12:21:21 PM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Version: jvmap3260sr16fp2-20141026_01 May 26, 2015 12:21:21 PM org.apache.catalina.startup.VersionLoggerListener log Java Home is fairly explicit, since it matches the known path to where the JVM lives. But what about the "JVM Version" entry? -- JHHL - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Enable Debugging in Tomcat7 catalina.out file
On Fri, Jan 6, 2017 at 12:10 AM, Kaushal Shriyan wrote: > Hi, > > Is there a way to enable debugging tomcat catalina.out file. I did set it > to FINEST in logging.properties file. > > Tomcat version :- 7.0.59 > OS :- CentOS release 6.8 (Final) > Java version :- java -version > java version "1.7.0_80" > Java(TM) SE Runtime Environment (build 1.7.0_80-b15) > Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode) > > My logging.properties file are as below :- > > > - > #*cat logging.properties* > # Licensed to the Apache Software Foundation (ASF) under one or more > # contributor license agreements. See the NOTICE file distributed with > # this work for additional information regarding copyright ownership. > # The ASF licenses this file to You under the Apache License, Version 2.0 > # (the "License"); you may not use this file except in compliance with > # the License. You may obtain a copy of the License at > # > # http://www.apache.org/licenses/LICENSE-2.0 > # > # Unless required by applicable law or agreed to in writing, software > # distributed under the License is distributed on an "AS IS" BASIS, > # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > # See the License for the specific language governing permissions and > # limitations under the License. > > handlers = 1catalina.java.util.logging.FileHandler, > 2localhost.java.util.logging.FileHandler, > 3manager.java.util.logging.FileHandler, > 4host-manager.java.util.logging.FileHandler, java.util.logging. > ConsoleHandler > > .handlers = 1catalina.java.util.logging.FileHandler, > 2localhost.java.util.logging.FileHandler, > 3manager.java.util.logging.FileHandler, > 4host-manager.java.util.logging.FileHandler, java.util.logging. > ConsoleHandler > > > # Handler specific properties. > # Describes specific configuration info for Handlers. > > > 1catalina.org.apache.juli.FileHandler.level = FINE > 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs > 1catalina.org.apache.juli.FileHandler.prefix = catalina. > 1catalina.java.util.logging.FileHandler.limit = 1 > 1catalina.java.util.logging.FileHandler.count = 1 > > 1catalina.java.util.logging.FileHandler.level = FINEST > 1catalina.java.util.logging.FileHandler.pattern = ${catalina.base}/logs/ > catalina%g.log > 1catalina.java.util.logging.FileHandler.limit = 50 > 1catalina.java.util.logging.FileHandler.count = 1 > 1catalina.java.util.logging.FileHandler.formatter = java.util.logging. > SimpleFormatter > > 2localhost.org.apache.juli.FileHandler.level = FINE > 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs > 2localhost.org.apache.juli.FileHandler.prefix = localhost. > 2localhost.java.util.logging.FileHandler.limit = 1 > 2localhost.java.util.logging.FileHandler.count = 1 > > 2localhost.java.util.logging.FileHandler.level = FINEST > 2localhost.java.util.logging.FileHandler.pattern = ${catalina.base}/logs/ > localhost%g.log > 2localhost.java.util.logging.FileHandler.limit = 50 > 2localhost.java.util.logging.FileHandler.count = 1 > 2localhost.java.util.logging.FileHandler.formatter = java.util.logging. > SimpleFormatter > > 3manager.org.apache.juli.FileHandler.level = FINE > 3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs > 3manager.org.apache.juli.FileHandler.prefix = manager. > 3manager.java.util.logging.FileHandler.limit = 1 > 3manager.java.util.logging.FileHandler.count = 1 > > 3manager.java.util.logging.FileHandler.level = FINEST > 3manager.java.util.logging.FileHandler.pattern = > ${catalina.base}/logs/manager%g.log > 3manager.java.util.logging.FileHandler.limit = 50 > 3manager.java.util.logging.FileHandler.count = 1 > 3manager.java.util.logging.FileHandler.formatter = java.util.logging. > SimpleFormatter > > 4host-manager.org.apache.juli.FileHandler.level = FINE > 4host-manager.org.apache.juli.FileHandler.directory = > ${catalina.base}/logs > 4host-manager.org.apache.juli.FileHandler.prefix = host-manager. > 4host-manager.java.util.logging.FileHandler.limit = 1 > 4host-manager.java.util.logging.FileHandler.count = 1 > > 4host-manager.java.util.logging.FileHandler.level = FINEST > 4host-manager.java.util.logging.FileHandler.pattern = > ${catalina.base}/logs/host-manager%g.log > 4host-manager.java.util.logging.FileHandler.limit = 50 > 4host-manager.java.util.logging.FileHandler.count = 1 > 4host-manager.java.util.loggin
Enable Debugging in Tomcat7 catalina.out file
Hi, Is there a way to enable debugging tomcat catalina.out file. I did set it to FINEST in logging.properties file. Tomcat version :- 7.0.59 OS :- CentOS release 6.8 (Final) Java version :- java -version java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode) My logging.properties file are as below :- - #*cat logging.properties* # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. handlers = 1catalina.java.util.logging.FileHandler, 2localhost.java.util.logging.FileHandler, 3manager.java.util.logging.FileHandler, 4host-manager.java.util.logging.FileHandler, java.util.logging.ConsoleHandler .handlers = 1catalina.java.util.logging.FileHandler, 2localhost.java.util.logging.FileHandler, 3manager.java.util.logging.FileHandler, 4host-manager.java.util.logging.FileHandler, java.util.logging.ConsoleHandler # Handler specific properties. # Describes specific configuration info for Handlers. 1catalina.org.apache.juli.FileHandler.level = FINE 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 1catalina.org.apache.juli.FileHandler.prefix = catalina. 1catalina.java.util.logging.FileHandler.limit = 1 1catalina.java.util.logging.FileHandler.count = 1 1catalina.java.util.logging.FileHandler.level = FINEST 1catalina.java.util.logging.FileHandler.pattern = ${catalina.base}/logs/catalina%g.log 1catalina.java.util.logging.FileHandler.limit = 50 1catalina.java.util.logging.FileHandler.count = 1 1catalina.java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter 2localhost.org.apache.juli.FileHandler.level = FINE 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 2localhost.org.apache.juli.FileHandler.prefix = localhost. 2localhost.java.util.logging.FileHandler.limit = 1 2localhost.java.util.logging.FileHandler.count = 1 2localhost.java.util.logging.FileHandler.level = FINEST 2localhost.java.util.logging.FileHandler.pattern = ${catalina.base}/logs/localhost%g.log 2localhost.java.util.logging.FileHandler.limit = 50 2localhost.java.util.logging.FileHandler.count = 1 2localhost.java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter 3manager.org.apache.juli.FileHandler.level = FINE 3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 3manager.org.apache.juli.FileHandler.prefix = manager. 3manager.java.util.logging.FileHandler.limit = 1 3manager.java.util.logging.FileHandler.count = 1 3manager.java.util.logging.FileHandler.level = FINEST 3manager.java.util.logging.FileHandler.pattern = ${catalina.base}/logs/manager%g.log 3manager.java.util.logging.FileHandler.limit = 50 3manager.java.util.logging.FileHandler.count = 1 3manager.java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter 4host-manager.org.apache.juli.FileHandler.level = FINE 4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 4host-manager.org.apache.juli.FileHandler.prefix = host-manager. 4host-manager.java.util.logging.FileHandler.limit = 1 4host-manager.java.util.logging.FileHandler.count = 1 4host-manager.java.util.logging.FileHandler.level = FINEST 4host-manager.java.util.logging.FileHandler.pattern = ${catalina.base}/logs/host-manager%g.log 4host-manager.java.util.logging.FileHandler.limit = 50 4host-manager.java.util.logging.FileHandler.count = 1 4host-manager.java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter java.util.logging.ConsoleHandler.level = FINE java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter org.apache.juli.FileHandler.level = FINE org.apache.juli.FileHandler.directory = ${catalina.base}/logs org.apache.juli.FileHandler.prefix = servlet-examples. # Facility specific properties. # Provides extra control for each logger. org.apache.catalina.core.Conta