Re: Where does my stderr go?
Konstantin Kolinko wrote on 11.01.2011 08:55: 2011/1/11 Thomas Kloeberkloe...@ics.de: Konstantin, Konstantin Kolinko wrote on 11.01.2011 01:03: https://issues.apache.org/bugzilla/show_bug.cgi?id=18462 thanks for sending this link. I'm surprised that this is such an old issue! So, if I understand the discussion correctly, Tomcat redirects stderr into stdout_XXX.log, right? Strange though, that I couldn't find my stack trace when I ran exception.printStackTrace(). Either this goes to yet another place, which I can't believe or I must have completely missed in, which I can't quite believe either ;) 1. System.out is buffered. So it might get stuck in the buffer. (Just saying. Have not tried to verify whether it is truth). System.err.flush() should help. good point. But in my case it should have come eventually :) 2. If you used swallowOutput=true in the context configuration file (it is false by default), then it will be written to the log file of the Host, i.e. into localhost_* log. I checked that, swallowOutput is set to false.. I will do some more tests, it is still a mystery to me... Thomas -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
https://issues.apache.org/bugzilla/show_bug.cgi?id=18462 2011/1/7 Jeffrey Janner jeffrey.jan...@polydyne.com: I've noticed that stderr is almost always empty on Windows, unless you get an OOM error. That will show up there. Could it possibly be getting routed to another log file? Or eaten by the JVM? Is this one of those swalloutOutput instances? Someone else might be able to answer. From: Thomas Kloeber [mailto:kloe...@ics.de] Sent: Friday, January 07, 2011 9:11 AM To: 'Tomcat Users List' Subject: Re: Where does my stderr go? Jeffrey Janner wrote on 07.01.2011 16:00: You assumption in the original post is wrong. okay, I thought I'd seen something like what I assumed... So it brings me back to my original question of this thread: where does my stderr go, if it does not appear in the stderr_XXX.log? Anybody? Some additional info, which I just saw and which looks strange to me: the stdout_XXX.log doesn't change it's date. That is to say that I have stdout_20101221.log which also contains log entries from today, 12-22. I was under the impression that Tomcat automatically closes the file at midnight and creates a new one with the appr. date... -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
Konstantin, Konstantin Kolinko wrote on 11.01.2011 01:03: https://issues.apache.org/bugzilla/show_bug.cgi?id=18462 thanks for sending this link. I'm surprised that this is such an old issue! So, if I understand the discussion correctly, Tomcat redirects stderr into stdout_XXX.log, right? Strange though, that I couldn't find my stack trace when I ran exception.printStackTrace(). Either this goes to yet another place, which I can't believe or I must have completely missed in, which I can't quite believe either ;) Very confused, Thomas -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
2011/1/11 Thomas Kloeber kloe...@ics.de: Konstantin, Konstantin Kolinko wrote on 11.01.2011 01:03: https://issues.apache.org/bugzilla/show_bug.cgi?id=18462 thanks for sending this link. I'm surprised that this is such an old issue! So, if I understand the discussion correctly, Tomcat redirects stderr into stdout_XXX.log, right? Strange though, that I couldn't find my stack trace when I ran exception.printStackTrace(). Either this goes to yet another place, which I can't believe or I must have completely missed in, which I can't quite believe either ;) 1. System.out is buffered. So it might get stuck in the buffer. (Just saying. Have not tried to verify whether it is truth). System.err.flush() should help. 2. If you used swallowOutput=true in the context configuration file (it is false by default), then it will be written to the log file of the Host, i.e. into localhost_* log. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
This must have fallen into the Christmas/New Year Hole... ;) Anybody out there can help me with my stderr etc issue? Thomas PS: happy new year to all... Original Message Subject:Re: Where does my stderr go? Date: Wed, 22 Dec 2010 12:35:14 +0100 From: Thomas Kloeber kloe...@ics.de Reply-To: kloe...@ics.de Organisation: ICS GmbH To: users@tomcat.apache.org Some additional info, which I just saw and which looks strange to me: the stdout_XXX.log doesn't change it's date. That is to say that I have stdout_20101221.log which also contains log entries from today, 12-22. I was under the impression that Tomcat automatically closes the file at midnight and creates a new one with the appr. date... Thomas -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Where does my stderr go?
Thomas – You assumption in the original post is wrong. Jeff From: Thomas Kloeber [mailto:kloe...@ics.de] Sent: Friday, January 07, 2011 5:59 AM To: Tomcat Users List Subject: Re: Where does my stderr go? This must have fallen into the Christmas/New Year Hole... ;) Anybody out there can help me with my stderr etc issue? Thomas PS: happy new year to all... Original Message Subject: Re: Where does my stderr go? Date: Wed, 22 Dec 2010 12:35:14 +0100 From: Thomas Kloeber kloe...@ics.demailto:kloe...@ics.de Reply-To: kloe...@ics.demailto:kloe...@ics.de Organisation: ICS GmbH To: users@tomcat.apache.orgmailto:users@tomcat.apache.org Some additional info, which I just saw and which looks strange to me: the stdout_XXX.log doesn't change it's date. That is to say that I have stdout_20101221.log which also contains log entries from today, 12-22. I was under the impression that Tomcat automatically closes the file at midnight and creates a new one with the appr. date... Thomas -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system.
Re: Where does my stderr go?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, On 1/7/2011 6:58 AM, Thomas Kloeber wrote: This must have fallen into the Christmas/New Year Hole... ;) I think so :) Some additional info, which I just saw and which looks strange to me: the stdout_XXX.log doesn't change it's date. That is to say that I have stdout_20101221.log which also contains log entries from today, 12-22. I was under the impression that Tomcat automatically closes the file at midnight and creates a new one with the appr. date... I'm not entirely sure, but I don't believe that the server runner on Microsoft Windows performs any log file rolling for you. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0nLBYACgkQ9CaO5/Lv0PDBUACfdZ/4akLvaI0Mn1asSe7uwyyK ot4AoJ7NlX6cjdCBpjsttfFcrDedXXLe =3nne -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
Jeffrey Janner wrote on 07.01.2011 16:00: You assumption in the original post is wrong. mailto:users@tomcat.apache.orgokay, I thought I'd seen something like what I assumed... So it brings me back to my original question of this thread: where does my stderr go, if it does not appear in the stderr_XXX.log? Anybody? Some additional info, which I just saw and which looks strange to me: the stdout_XXX.log doesn't change it's date. That is to say that I have stdout_20101221.log which also contains log entries from today, 12-22. I was under the impression that Tomcat automatically closes the file at midnight and creates a new one with the appr. date... -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Where does my stderr go?
I've noticed that stderr is almost always empty on Windows, unless you get an OOM error. That will show up there. Could it possibly be getting routed to another log file? Or eaten by the JVM? Is this one of those swalloutOutput instances? Someone else might be able to answer. From: Thomas Kloeber [mailto:kloe...@ics.de] Sent: Friday, January 07, 2011 9:11 AM To: 'Tomcat Users List' Subject: Re: Where does my stderr go? Jeffrey Janner wrote on 07.01.2011 16:00: You assumption in the original post is wrong. okay, I thought I'd seen something like what I assumed... So it brings me back to my original question of this thread: where does my stderr go, if it does not appear in the stderr_XXX.log? Anybody? Some additional info, which I just saw and which looks strange to me: the stdout_XXX.log doesn't change it's date. That is to say that I have stdout_20101221.log which also contains log entries from today, 12-22. I was under the impression that Tomcat automatically closes the file at midnight and creates a new one with the appr. date... -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss __ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system.
Re: Where does my stderr go?
Some additional info, which I just saw and which looks strange to me: the stdout_XXX.log doesn't change it's date. That is to say that I have stdout_20101221.log which also contains log entries from today, 12-22. I was under the impression that Tomcat automatically closes the file at midnight and creates a new one with the appr. date... Thomas -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
2010/12/22 Thomas Kloeber kloe...@ics.de: Some additional info, which I just saw and which looks strange to me: the stdout_XXX.log doesn't change it's date. That is to say that I have stdout_20101221.log which also contains log entries from today, 12-22. I was under the impression that Tomcat automatically closes the file at midnight and creates a new one with the appr. date... That is service runner (Apache Commons Daemon) that manages those stdout, stderr files. http://commons.apache.org/daemon/ Tomcat itself has nothing to do with them. BTW, why are not you using a proper logging API? Any of: a) GenericServlet.log(), ServletContext.log() b) java.util.logging c) Apache Commons Logging ?? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
Konstantin Kolinko wrote on 22.12.2010 12:44: 2010/12/22 Thomas Kloeberkloe...@ics.de: Some additional info, which I just saw and which looks strange to me: the stdout_XXX.log doesn't change it's date. That is to say that I have stdout_20101221.log which also contains log entries from today, 12-22. I was under the impression that Tomcat automatically closes the file at midnight and creates a new one with the appr. date... That is service runner (Apache Commons Daemon) that manages those stdout, stderr files. http://commons.apache.org/daemon/ Tomcat itself has nothing to do with them. BTW, why are not you using a proper logging API? Any of: a) GenericServlet.log(), ServletContext.log() b) java.util.logging c) Apache Commons Logging ?? because I came across the issue when I was trying to dump a stack trace of an exception. because will have to uuse some home-grown logging which I have not yet implemented. I'm just curious what's wrong with my Tomcat, Apache, Whatever setup and I would like to understand why it behaves like it does. -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, On 12/21/2010 2:43 AM, Thomas Kloeber wrote: I'm not sure if Tomcat's service wrapper will fail silently or angrily if files cannot be created. If I were you, I'd specify an exact filename, including full path, for the Redirect Stdout and Redirect Stderr settings, and make sure that the effective user running the Tomcat service (TOMCAT? LOCAL_SERVICE?) has rights to write to that file/directory. this is exactly what I did on a previous suggestion. I replaced the auto bits with C:\tmp\stderr and C:\tmp\stdout. Tomcat creates the files and writes into stdout. Excellent. It also creates stderr but it remains empty. :( That might be a bug in the service wrapper. Can you re-test with 6.0.29 and a minimal WAR file (nothing but a .jsp that prints to both stdout and stderr should do it)? If it still fails, please file a bug in bugzilla: https://issues.apache.org/bugzilla/ When I set it to auto the files are created in the standard log directory with the names stdout_XXX.log and stderr_XXX.log where XXX is the date the files were created. Sorry, I didn't catch that, earlier. logging.properties: Since stdout is working, swallowOutput isn't in effect, which means that the contents of logging.properties aren't really relevant. Sorry for the misstep on my part. That logging.properties looks pretty stock, anyway. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0RC5cACgkQ9CaO5/Lv0PDoeQCgg1n5UriEllIkeoxx8K5q9JN/ FucAoKDx0QrHKVZRLDqhZkBb5vAMlmEx =1na+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, On 12/21/2010 2:43 AM, Thomas Kloeber wrote: I'm not sure if Tomcat's service wrapper will fail silently or angrily if files cannot be created. If I were you, I'd specify an exact filename, including full path, for the Redirect Stdout and Redirect Stderr settings, and make sure that the effective user running the Tomcat service (TOMCAT? LOCAL_SERVICE?) has rights to write to that file/directory. this is exactly what I did on a previous suggestion. I replaced the auto bits with C:\tmp\stderr and C:\tmp\stdout. Tomcat creates the files and writes into stdout. Excellent. It also creates stderr but it remains empty. :( That might be a bug in the service wrapper. Can you re-test with 6.0.29 and a minimal WAR file (nothing but a .jsp that prints to both stdout and stderr should do it)? If it still fails, please file a bug in bugzilla: https://issues.apache.org/bugzilla/ When I set it to auto the files are created in the standard log directory with the names stdout_XXX.log and stderr_XXX.log where XXX is the date the files were created. Sorry, I didn't catch that, earlier. logging.properties: Since stdout is working, swallowOutput isn't in effect, which means that the contents of logging.properties aren't really relevant. Sorry for the misstep on my part. That logging.properties looks pretty stock, anyway. And if, in the tomcat6w.exe gui, you navigate to the Java tab, what are the options mentioned there for the JVM ? (There might be a -D there which redirects the JVM stderr) (which is really the stderr you are looking for here). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 12/21/2010 3:50 PM, André Warnier wrote: And if, in the tomcat6w.exe gui, you navigate to the Java tab, what are the options mentioned there for the JVM ? (There might be a -D there which redirects the JVM stderr) (which is really the stderr you are looking for here). Is there a system property that redirects stderr? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0RHpIACgkQ9CaO5/Lv0PAuqgCbBGN5p3HGROwA5bCcIwPyGOUH iMQAnAvvJk38+LOF+Mho2oIRsGxZFPKB =ePYR -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 12/21/2010 3:50 PM, André Warnier wrote: And if, in the tomcat6w.exe gui, you navigate to the Java tab, what are the options mentioned there for the JVM ? (There might be a -D there which redirects the JVM stderr) (which is really the stderr you are looking for here). Is there a system property that redirects stderr? I thought there was, but I may be wrong. There is one which allows to set the directory for temporary files, I'm quite sure. And in the IBM java, I saw os400.stderr|stdout|stdin properties to do that. But not in Sun pardon Oracle Java I guess. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
André Warnier wrote on 21.12.2010 21:50: And if, in the tomcat6w.exe gui, you navigate to the Java tab, what are the options mentioned there for the JVM ? (There might be a -D there which redirects the JVM stderr) (which is really the stderr you are looking for here). following are the settings (looks like all standard to me - never touched 'em anyways): Java Virtual Machine: C:\Programme\Java\jre6\bin\client\jvm.dll Java Classpath: C:\Programme\Apache Software Foundation\Tomcat 6.0\bin\bootstrap.jar Java Options: -Dcatalina.home=C:\Programme\Apache Software Foundation\Tomcat 6.0 -Dcatalina.base=C:\Programme\Apache Software Foundation\Tomcat 6.0 -Djava.endorsed.dirs=C:\Programme\Apache Software Foundation\Tomcat 6.0\endorsed -Djava.io.tmpdir=C:\Programme\Apache Software Foundation\Tomcat 6.0\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\Programme\Apache Software Foundation\Tomcat 6.0\conf\logging.properties Initial memory pool: empty Maximum memory pool: empty Thread stack size: empty -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
Hi Chris, Christopher Schultz wrote on 17.12.2010 18:55: I can see an stderr file in there. Were you expecting anything to be in it immediately after startup? Silly question: how are you writing to stderr? yes, I put some output in one of my servlets, just to test this. I'm using System.stderr and System.stdout. BTW: you posted some passwords in your log files. You might want to go and change those, now, unless it was all some kind of test data. yup, I know, it's only test data... I was thinking of your conf/logging.properties file as well as your configuration for tomcat6w.exe. Describing the log config from tomcat6w.exe (as you have done) and posting logging.properties should be enough. see attachment Logging set up from tomcat6w: * Level: Info * Log path: apache install dir\logs * Log prefix: jakarta_service_ * Redirect Stdout: auto * Redirect Stderr: auto There is a swallowOutput attribute on theContext element (found in conf/server.xml if you are a bad boy, or in your webapp's META-INF/context.xml, or in conf/[service]/[host]/[webapp].xml. If set to true (it defaults to false), then your stdout and stderr will be redirected to the application's log file which is configured in conf/logging.properties. this attribute is not set anywhere. Thomas -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss # 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.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler .handlers = 1catalina.org.apache.juli.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. 2localhost.org.apache.juli.FileHandler.level = FINE 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 2localhost.org.apache.juli.FileHandler.prefix = localhost. 3manager.org.apache.juli.FileHandler.level = FINE 3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 3manager.org.apache.juli.FileHandler.prefix = manager. 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. java.util.logging.ConsoleHandler.level = FINE java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter # Facility specific properties. # Provides extra control for each logger. org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler # For example, set the com.xyz.foo logger to only log SEVERE # messages: #org.apache.catalina.startup.ContextConfig.level = FINE #org.apache.catalina.startup.HostConfig.level = FINE #org.apache.catalina.session.ManagerBase.level = FINE #org.apache.catalina.core.AprLifecycleListener.level=FINE - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, On 12/20/2010 3:40 AM, Thomas Kloeber wrote: Hi Chris, Christopher Schultz wrote on 17.12.2010 18:55: I can see an stderr file in there. Were you expecting anything to be in it immediately after startup? Silly question: how are you writing to stderr? yes, I put some output in one of my servlets, just to test this. I'm using System.stderr and System.stdout. No wonder it's not working: System.stdout and System.stderr don't exist as far as I know. Did you mean System.err and System.out? Precision counts, especially when things aren't working the way you expect them to be. I was thinking of your conf/logging.properties file as well as your configuration for tomcat6w.exe. Describing the log config from tomcat6w.exe (as you have done) and posting logging.properties should be enough. see attachment :( Attachments are often stripped from posts to the list. Try just copy-and-pasting inline. Logging set up from tomcat6w: * Level: Info * Log path: apache install dir\logs * Log prefix: jakarta_service_ * Redirect Stdout: auto * Redirect Stderr: auto Someone more familiar with win32 will have to comment on what those settings are expected to produce. Note that the Log* parameters have nothing to do with stdout/stderr: they are for reporting (whatever) to the Windows System Log. The documentation I can find for the --StdOutput and --StdError command-line parameters seem to indicate that they describe a filename. I would expect auto to be the filename. If you haven't specified the path, you will have to check the working directory of the service to determine where that file will try to be written. I'm not sure if Tomcat's service wrapper will fail silently or angrily if files cannot be created. If I were you, I'd specify an exact filename, including full path, for the Redirect Stdout and Redirect Stderr settings, and make sure that the effective user running the Tomcat service (TOMCAT? LOCAL_SERVICE?) has rights to write to that file/directory. There is a swallowOutput attribute on the Context element (found in conf/server.xml if you are a bad boy, or in your webapp's META-INF/context.xml, or in conf/[service]/[host]/[webapp].xml. If set to true (it defaults to false), then your stdout and stderr will be redirected to the application's log file which is configured in conf/logging.properties. this attribute is not set anywhere. Good to know. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0PvMQACgkQ9CaO5/Lv0PBp5ACgkzVO2vLpJMB2Xi1wQMCNthf+ UGIAoJtPahYPMzow29oX8eqdjZnUV0y5 =fvQ1 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
Chris, Christopher Schultz wrote on 20.12.2010 21:29: No wonder it's not working: System.stdout and System.stderr don't exist as far as I know. Did you mean System.err and System.out? Precision counts, especially when things aren't working the way you expect them to be. you are right. Of course I use System.err and System.out I was thinking of your conf/logging.properties file as well as your configuration for tomcat6w.exe. Describing the log config from tomcat6w.exe (as you have done) and posting logging.properties should be enough. see attachment :( Attachments are often stripped from posts to the list. Try just copy-and-pasting inline. my last attachment went through even so I go an error message. This time I didn't get a message so I would have thought it's ok. I now put it at the end of the message. Logging set up from tomcat6w: * Level: Info * Log path:apache install dir\logs * Log prefix: jakarta_service_ * Redirect Stdout: auto * Redirect Stderr: auto Someone more familiar with win32 will have to comment on what those settings are expected to produce. Note that the Log* parameters have nothing to do with stdout/stderr: they are for reporting (whatever) to the Windows System Log. The documentation I can find for the --StdOutput and --StdError command-line parameters seem to indicate that they describe a filename. I would expect auto to be the filename. If you haven't specified the path, you will have to check the working directory of the service to determine where that file will try to be written. I'm not sure if Tomcat's service wrapper will fail silently or angrily if files cannot be created. If I were you, I'd specify an exact filename, including full path, for the Redirect Stdout and Redirect Stderr settings, and make sure that the effective user running the Tomcat service (TOMCAT? LOCAL_SERVICE?) has rights to write to that file/directory. this is exactly what I did on a previous suggestion. I replaced the auto bits with C:\tmp\stderr and C:\tmp\stdout. Tomcat creates the files and writes into stdout. It also creates stderr but it remains empty. When I set it to auto the files are created in the standard log directory with the names stdout_XXX.log and stderr_XXX.log where XXX is the date the files were created. So from this behaviour I would say, that these settings are for output of Tomcat (too). Thomas 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.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler .handlers = 1catalina.org.apache.juli.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. 2localhost.org.apache.juli.FileHandler.level = FINE 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 2localhost.org.apache.juli.FileHandler.prefix = localhost. 3manager.org.apache.juli.FileHandler.level = FINE 3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 3manager.org.apache.juli.FileHandler.prefix = manager. 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. java.util.logging.ConsoleHandler.level = FINE java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter # Facility specific properties. # Provides extra control for each logger. org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
Re: Where does my stderr go?
Thomas Kloeber schrieb am 17.12.2010 um 08:45 (+0100): hmmm, I'm not sure if the attachment of my last post got through. It did get through. How can I post files on the list? You could use http://pastebin.com/ or a similar service and post the URL. Might even be the preferred way for large files. -- Michael Ludwig - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, On 12/17/2010 2:38 AM, Thomas Kloeber wrote: I changed the auto-settings for Stdout and Stderr in tomcat6w to C:\tmp. Tomcat duly created the files there, but stderr still remains empty. I now changed the logging settings back to auto, stopped Tomcat, cleared the logs directory and started Tomcat. Attached are the files. I can see an stderr file in there. Were you expecting anything to be in it immediately after startup? Silly question: how are you writing to stderr? BTW: you posted some passwords in your log files. You might want to go and change those, now, unless it was all some kind of test data. With regards to my entire configuration, I'm not quite sure, which files you would like to see. If you can tell me which are the relevant bits and pieces I'll be happy to post them too. I was thinking of your conf/logging.properties file as well as your configuration for tomcat6w.exe. Describing the log config from tomcat6w.exe (as you have done) and posting logging.properties should be enough. There is a swallowOutput attribute on the Context element (found in conf/server.xml if you are a bad boy, or in your webapp's META-INF/context.xml, or in conf/[service]/[host]/[webapp].xml. If set to true (it defaults to false), then your stdout and stderr will be redirected to the application's log file which is configured in conf/logging.properties. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0LpAoACgkQ9CaO5/Lv0PCuEgCfbJbvOoQMXEJSeBKqHbiK4XLR jQwAnjERdcy3sP5ZbkpEFFrvo5xjwM+h =mkGH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas, On 12/16/2010 2:52 AM, Thomas Kloeber wrote: thanx for your helpful answer. Believe me, before I post on a mailing list or forum I spent a long time trying to fix my problems. In this case I ran out of ideas, so I was hoping I would find some expertise on this mailing list... I tried your suggestion and guess what, it didn't make any difference. Care to be specific? We can't tell what you did, or what happened when you did it. All we know is that you did something and it didn't change anything from the previous behavior (which you didn't really describe, either). How about posting your entire configuration, then the contents of all the logs that are generated when you start Tomcat fresh (and delete the log files, just for good measure). Then maybe we can start figuring out what's going on. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0Kb4kACgkQ9CaO5/Lv0PAJnwCgjNl48apmoSCxH8l8LUdVB5Ou eg0An2mGeQ59s/rawggBLjwWdt7Qx/mQ =cwFR -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
hmmm, I'm not sure if the attachment of my last post got through. How can I post files on the list? I just got the following message: nad...@zycus.com wrote on 17.12.2010 08:36: . The scanned document was QUARANTINED. Violation Information: The filename extension of attachment logs.zip violated the content filtering rule zip files blocked. -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
Andre, André Warnier wrote on 14.12.2010 11:10: Yes. What about these ? * Redirect Stdout: auto * Redirect Stderr: auto Do you know what that does ? Why don't you try to set the Redirect Stderr to some file path on your server, and see what arrives in it ? You could also try to look in the Windows Event Logs, in case anything happens there. Go on, be imaginative. It's your PC after all. thanx for your helpful answer. Believe me, before I post on a mailing list or forum I spent a long time trying to fix my problems. In this case I ran out of ideas, so I was hoping I would find some expertise on this mailing list... I tried your suggestion and guess what, it didn't make any difference. Thomas Thomas Kloeber wrote: André, thanks for your suggestion. Yes, I run Tomcat as a service. I tried your suggestion and it looks all normal/ok. * Level: Info * Log path: my tomcat installation directory/logs * Log prefix: jakarta_service_ * Redirect Stdout: auto * Redirect Stderr: auto I tried changing the loggin level to debug, but it doesn't make any difference. Any other ideas? Thomas André Warnier wrote on 13.12.2010 16:56: Thomas Kloeber wrote: Folks'es, I have a strange problem with my Tomcat-Servlets: everything my servlets print out via System.err is lost and does not show up in any of the log files. How can that be and what can I do about it? When I start Tomcat all the usual log files arecreated like stdout_.log, localhost_access_log, catalina.*.log, stder_.log, etc. However, stderr.*.log remains empty even if my servlets print stuff to System.err or dump stack traces. Only if I print to System.out the info appears in stdout_.*.log. I'm using Apache Tomcat 6.0.26, Java 1.6.0_22-b04 on Windows 2003 x86. Presumably, you are running Tomcat as a Windows Service. If that is the case, navigate to the tomcat/bin directory, and double-click on the tomcat6w.exe program. Then in the dialog, select the Logging tab. This may explain what happens. -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
André, thanks for your suggestion. Yes, I run Tomcat as a service. I tried your suggestion and it looks all normal/ok. * Level: Info * Log path: my tomcat installation directory/logs * Log prefix: jakarta_service_ * Redirect Stdout: auto * Redirect Stderr: auto I tried changing the loggin level to debug, but it doesn't make any difference. Any other ideas? Thomas André Warnier wrote on 13.12.2010 16:56: Thomas Kloeber wrote: Folks'es, I have a strange problem with my Tomcat-Servlets: everything my servlets print out via System.err is lost and does not show up in any of the log files. How can that be and what can I do about it? When I start Tomcat all the usual log files arecreated like stdout_.log, localhost_access_log, catalina.*.log, stder_.log, etc. However, stderr.*.log remains empty even if my servlets print stuff to System.err or dump stack traces. Only if I print to System.out the info appears in stdout_.*.log. I'm using Apache Tomcat 6.0.26, Java 1.6.0_22-b04 on Windows 2003 x86. Presumably, you are running Tomcat as a Windows Service. If that is the case, navigate to the tomcat/bin directory, and double-click on the tomcat6w.exe program. Then in the dialog, select the Logging tab. This may explain what happens. -- Intelligent Communication Software Vertriebs GmbH Firmensitz: Kistlerhof Str. 111, 81379 München Registergericht: Amtsgericht München, HRB 88283 Geschäftsführer: Albert Fuss - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Where does my stderr go?
Yes. What about these ? * Redirect Stdout: auto * Redirect Stderr: auto Do you know what that does ? Why don't you try to set the Redirect Stderr to some file path on your server, and see what arrives in it ? You could also try to look in the Windows Event Logs, in case anything happens there. Go on, be imaginative. It's your PC after all. Thomas Kloeber wrote: André, thanks for your suggestion. Yes, I run Tomcat as a service. I tried your suggestion and it looks all normal/ok. * Level: Info * Log path: my tomcat installation directory/logs * Log prefix: jakarta_service_ * Redirect Stdout: auto * Redirect Stderr: auto I tried changing the loggin level to debug, but it doesn't make any difference. Any other ideas? Thomas André Warnier wrote on 13.12.2010 16:56: Thomas Kloeber wrote: Folks'es, I have a strange problem with my Tomcat-Servlets: everything my servlets print out via System.err is lost and does not show up in any of the log files. How can that be and what can I do about it? When I start Tomcat all the usual log files arecreated like stdout_.log, localhost_access_log, catalina.*.log, stder_.log, etc. However, stderr.*.log remains empty even if my servlets print stuff to System.err or dump stack traces. Only if I print to System.out the info appears in stdout_.*.log. I'm using Apache Tomcat 6.0.26, Java 1.6.0_22-b04 on Windows 2003 x86. Presumably, you are running Tomcat as a Windows Service. If that is the case, navigate to the tomcat/bin directory, and double-click on the tomcat6w.exe program. Then in the dialog, select the Logging tab. This may explain what happens. - 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: Where does my stderr go?
Thomas Kloeber wrote: Folks'es, I have a strange problem with my Tomcat-Servlets: everything my servlets print out via System.err is lost and does not show up in any of the log files. How can that be and what can I do about it? When I start Tomcat all the usual log files arecreated like stdout_.log, localhost_access_log, catalina.*.log, stder_.log, etc. However, stderr.*.log remains empty even if my servlets print stuff to System.err or dump stack traces. Only if I print to System.out the info appears in stdout_.*.log. I'm using Apache Tomcat 6.0.26, Java 1.6.0_22-b04 on Windows 2003 x86. Presumably, you are running Tomcat as a Windows Service. If that is the case, navigate to the tomcat/bin directory, and double-click on the tomcat6w.exe program. Then in the dialog, select the Logging tab. This may explain what happens. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org