Re: Tomcat 6 logging clog

2011-11-03 Thread Mustafa Yuksel
Tim Space qwertypoi75 at hotmail.com writes:

 
 
 Here is the result of ps -aef | grep java
 ...

Hi,

I see it has been some time since the last message is posted but I had a similar
problem that took quite an amount of my time. I want to share my experience 
here.

Most probably, tomcat is not the one to blame here. Especially if you are quite
sure that your conf/logging.properties should meet your requirements.

One thing that caused me to blame tomcat was this bug fix:
https://issues.apache.org/bugzilla/show_bug.cgi?id=51758. My tomcat version is
6.0.33.  

After trying many combinations inside tomcat's conf/logging.properties, I
noticed that I can control the catalina file handler log file (e.g.
logs/catalina.2011-11-03.log), but not logs/catalina.out. As we know,
catalina.out captures logs that are forwarded to STDOUT and STDERR. An excerpt
from catalina.sh:

  ...
  org.apache.catalina.startup.Bootstrap $@ start \
   $CATALINA_OUT 21 

Then I started getting suspicious about the wars (especially the third-party
ones) that I deploy. I did not find any logging properties file directly inside
the wars. Then I started looking all the jars that are included by the wars.
And, bingo!. I found 2 logging.properties files in 2 jars that come with one of
the wars I deploy (for those that are interested, these are syslog-core and
syslog-mina libraries that are included inside openatna web application). These
logging properties files were overriding the root log level to FINE, like this:

.level=FINE

and defining both console handler and file handler. 

I just deleted both property files from the jars and everything is under my
control now. 

Best regards,

Mustafa Yuksel



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6 logging clog

2011-01-08 Thread Pid
On 1/8/11 7:10 AM, Tim Space wrote:
 
 
 
 
 As advised I removed every version of tomcat on my system.  There were two or 
 three others besides the version I was running:
 /usr/share/java/tomcat5
 /etc/tomcat5
 /var/lib/tomcat5
 I have always started Tomcat with the sh startup.sh script, in my home 
 directory, with CATALINA_HOME set to that Tomcat, and my webapps in that 
 versions webapps directory.  When I used Tomcat 5.5 (not these copies) in my 
 home directory, there was no problems with the logs, the problems only 
 started after moving to Tomcat 6.0.02.  So that wasn't the problem.
 Anyhow, I took Chucks advice and moved to the latest version 
 apache-tomcat-7.0.5.  Thing works fine out of the box.  Webapp runs, and the 
 new catalina.out is 42MBs, better than 50MBs, but still clogged.  Here is a 
 sample of some of log entries:
 
 line 43 Jan 8, 2011 6:29:10 AM org.apache.tomcat.util.digester.Digester 
 characters
 ... all Digester logs
 line 900623 Jan 8, 2011 6:32:41 AM org.apache.tomcat.util.file.Matcher 
 tokenizePathAsArray
 FINER: Tokenizing path [ant.jar]
 ... all Matcher logs
 line 521583  Jan 8, 2011 6:38:11 AM 
 org.apache.jasper.compiler.SmapUtil$SDEInstaller addSDE
 FINE: constant pool count: 378
 
 FINE: 160 read class attr -- 'SourceFile'
 Jan 8, 2011 6:38:58 AM org.apache.jasper.compiler.SmapUtil$SDEInstaller 
 copyConstantPool
 
 Jan 8, 2011 6:38:58 AM org.apache.jasper.compiler.SmapUtil$SDEInstaller 
 copyMembers
 FINE: member attr count: 2
 ...
 Jan 8, 2011 6:39:00 AM org.apache.catalina.core.StandardWrapper allocate
 FINER:   Returning non-STM instance
 ...
 
 line 934632 Jan 8, 2011 6:41:03 AM 
 org.apache.catalina.core.ApplicationContext log
 INFO: IntegratedTestResultAction.perform for -5519451928541341468 
 (- This is the line where my webapp log starts.)
 
 
 Here is the properties file settings that the distribution come with:
 
 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
 
 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 org.apache.catalina.util.LifecycleBase logger to log
 # each component that extends LifecycleBase changing state:
 #org.apache.catalina.util.LifecycleBase.level = FINE
 
 I changed all THE fine INFO settings to SEVERE, and got the log shown above.  
 I'll think about moving to Java update 23 from update 16, but doubt that is 
 the problem.  I also added these settings since they seem to be the majority 
 of the log entries I don't want to see.:
 
 org.apache.jasper=SEVERE
 org.apache.tomcat.util.file.Matcher=SEVERE
 org.apache.tomcat.util.digester.Digester=SEVERE
 
 So to me, it really does seem like TOmcat is not using this file, but I don't 
 know where to configure anything to make sure.
 
 In the catalina.bat file it says:
 
 if not %LOGGING_CONFIG% ==  goto noJuliConfig
 
 set LOGGING_CONFIG=-Dnop
 
 if not exist %CATALINA_BASE%\conf\logging.properties goto noJuliConfig
 
 set 
 LOGGING_CONFIG=-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties
 
 :noJuliConfig
 
 set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%
 
  
 if not %LOGGING_MANAGER% ==  goto noJuliManager
 
 set 
 LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 
 :noJuliManager
 
 set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%
 
 In the catalina.sh script it says:
 
 # Set juli LogManager config file if it is present and an override has not 
 been issued
 if [ -z $LOGGING_CONFIG ]; then
   if [ -r $CATALINA_BASE/conf/logging.properties ]; then
 
 

Re: Tomcat 6 logging clog

2011-01-08 Thread Konstantin Kolinko
2011/1/8 Tim Space qwertypo...@hotmail.com:

 Another problem with this logging situation is that my webapp takes more than 
 two minutes to load after startup.

That is expected. Logging inside Digester takes a lot of time.

 org.apache.jasper=SEVERE
 org.apache.tomcat.util.file.Matcher=SEVERE
 org.apache.tomcat.util.digester.Digester=SEVERE

The names are wrong. You missed the .level suffix.
The above should have been

org.apache.jasper.level=SEVERE

etc.

 As Konstantin suggested I looked at the catalina.policy file also.  I notice 
 the java logging.properties file is also mentioned there, but as I showed in 
 my last e-mail, I have changed the settings in that file also.

Note, that the default log level for every logging category is set by
the following line:

.level= INFO


It should be INFO by default and that is set in JRE's
lib/logging.properties.  Note, that it is .level, starting with a
. (a dot).  Effectively it is  (empty string) plus .level
suffix.

Please check, that your JRE's logging.properties file is not modified.
(Revert it back to the defaults, if you modified it).


You can explicitly add .level= INFO line into your
$CATALINA_BASE\conf\logging.properties

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 6 logging clog

2011-01-08 Thread Tim Space

Here is the result of ps -aef | grep java

timmy15563 1  0 Jan08 pts/100:05:38 
/home/timmy/jdk1.6.0_18/bin/java 
-Djava.util.logging.config.file=/home/timmy/apache-tomcat-7.0.5/conf/logging.properties
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.endorsed.dirs=/home/timmy/apache-tomcat-7.0.5/endorsed 
-classpath 
/home/timmy/apache-tomcat-7.0.5/bin/bootstrap.jar:/home/timmy/apache-tomcat-7.0.5/bin/tomcat-juli.jar
 -Dcatalina.base=/home/timmy/apache-tomcat-7.0.5 
-Dcatalina.home=/home/timmy/apache-tomcat-7.0.5 
-Djava.io.tmpdir=/home/timmy/apache-tomcat-7.0.5/temp 
org.apache.catalina.startup.Bootstrap start
timmy17144 17080  0 01:32 pts/200:00:00 grep java

It looks like all the correct info to me.  I modify the 
/home/timmy/apache-tomcat-7.0.5/conf/logging.properties 
but there is no effect with the catalina.out log...

 Date: Sat, 8 Jan 2011 16:12:15 +
 From: p...@pidster.com
 To: users@tomcat.apache.org
 Subject: Re: Tomcat 6 logging clog
 
 On 1/8/11 7:10 AM, Tim Space wrote:
  
  
  
  
  As advised I removed every version of tomcat on my system.  There were two 
  or three others besides the version I was running:
  /usr/share/java/tomcat5
  /etc/tomcat5
  /var/lib/tomcat5
  I have always started Tomcat with the sh startup.sh script, in my home 
  directory, with CATALINA_HOME set to that Tomcat, and my webapps in that 
  versions webapps directory.  When I used Tomcat 5.5 (not these copies) in 
  my home directory, there was no problems with the logs, the problems only 
  started after moving to Tomcat 6.0.02.  So that wasn't the problem.
  Anyhow, I took Chucks advice and moved to the latest version 
  apache-tomcat-7.0.5.  Thing works fine out of the box.  Webapp runs, and 
  the new catalina.out is 42MBs, better than 50MBs, but still clogged.  Here 
  is a sample of some of log entries:
  
  line 43 Jan 8, 2011 6:29:10 AM org.apache.tomcat.util.digester.Digester 
  characters
  ... all Digester logs
  line 900623 Jan 8, 2011 6:32:41 AM org.apache.tomcat.util.file.Matcher 
  tokenizePathAsArray
  FINER: Tokenizing path [ant.jar]
  ... all Matcher logs
  line 521583  Jan 8, 2011 6:38:11 AM 
  org.apache.jasper.compiler.SmapUtil$SDEInstaller addSDE
  FINE: constant pool count: 378
  
  FINE: 160 read class attr -- 'SourceFile'
  Jan 8, 2011 6:38:58 AM org.apache.jasper.compiler.SmapUtil$SDEInstaller 
  copyConstantPool
  
  Jan 8, 2011 6:38:58 AM org.apache.jasper.compiler.SmapUtil$SDEInstaller 
  copyMembers
  FINE: member attr count: 2
  ...
  Jan 8, 2011 6:39:00 AM org.apache.catalina.core.StandardWrapper allocate
  FINER:   Returning non-STM instance
  ...
  
  line 934632 Jan 8, 2011 6:41:03 AM 
  org.apache.catalina.core.ApplicationContext log
  INFO: IntegratedTestResultAction.perform for -5519451928541341468   
(- This is the line where my webapp log starts.)
  
  
  Here is the properties file settings that the distribution come with:
  
  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
  
  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 org.apache.catalina.util.LifecycleBase logger to log
  # each component that extends LifecycleBase changing state:
  #org.apache.catalina.util.LifecycleBase.level = FINE
  
  I changed all THE fine INFO settings to SEVERE, and got the log shown 
  above.  I'll think about moving to Java update 23 from update 16, but doubt 
  that is the problem.  I also added these settings since they seem

Tomcat 6 logging clog

2011-01-07 Thread Tim Space

Hi,

I'm getting huge logs (50MB after startup) in catalina.out despite having 
turned all logging up to SEVERE in my logging.property files.  
I'm hoping someone can point me to the right thread, as I'm sure others 
wouldn't have put up with 50MB logs out of the box as long as I have.  After 
going over the docs several times, I see that the standard LogManager JULI 
uses either a programmatic approach, or properties files, so I'm guessing that 
it's using a programmatic approach, but there is no mention of how to make my 
logging use the property files.  I'm tried modifying both files to no effect:
/apache-tomcat-6.0.20/conf/logging.properties
/jdk1.6.0_18/jre/lib/logging.properties

The docs say:
Here is how you would set debugging from Tomcat. You would need to ensure the 
ConsoleHandler's level is also set to collect this threshold, 
so FINEST or ALL should be set. Please refer to Sun's java.util.logging 
documentation for the complete details.
org.apache.catalina.level=FINEST

However, the string org.apache.catalina.level is not found in the 
logging.properties file in apache's conf directory.
In-fact, the only place that string is found is in 
/apache-tomcat-6.0.20/webapps/docs/logging.html, as well as startup scripts but 
there is no dicsussion on the java loggin overview of how to set he level.

I'm running Fedora 14 by the way.  I been through a lot of archives searching 
from various angles, found similar problems, but none with sufficient answers 
for my problem.  I haven't changed anything else in the properties file, so 
they are as shipped with Tomcat 6.0.20.  I haven't tried to implement log4j, as 
java.util.logging with JULI would be fine if I didn't have to hear digesters 
every bowel movement like this:

1162113  Jan 5, 2011 4:28:59 PM org.apache.tomcat.util.digester.Digester 
endElement
1162114  FINE:   bodyText=''

Thanks

T.Curchod.

Re: Tomcat 6 logging clog

2011-01-07 Thread Pid
On 1/7/11 9:40 AM, Tim Space wrote:
 
 Hi,
 
 I'm getting huge logs (50MB after startup) in catalina.out despite having 
 turned all logging up to SEVERE in my logging.property files.  
 I'm hoping someone can point me to the right thread, as I'm sure others 
 wouldn't have put up with 50MB logs out of the box as long as I have.  After 
 going over the docs several times, I see that the standard LogManager JULI 
 uses either a programmatic approach, or properties files, so I'm guessing 
 that it's using a programmatic approach, but there is no mention of how to 
 make my logging use the property files.  I'm tried modifying both files to no 
 effect:

A fresh Tomcat 6.0.29 'out of the box' after startup produces small logs:

 0  7 Jan 14:21 manager.2011-01-07.log
 0  7 Jan 14:21 host-manager.2011-01-07.log
  1813  7 Jan 14:21 catalina.out
   226  7 Jan 14:21 localhost.2011-01-07.log
  1813  7 Jan 14:21 catalina.2011-01-07.log

not 50Mb.

Tomcat itself doesn't produce more log data unless the cluster is
configured or you are reloading applications.

Can you explain more about what's appearing in the logs?


p

 /apache-tomcat-6.0.20/conf/logging.properties
 /jdk1.6.0_18/jre/lib/logging.properties
 
 The docs say:
 Here is how you would set debugging from Tomcat. You would need to ensure the 
 ConsoleHandler's level is also set to collect this threshold, 
 so FINEST or ALL should be set. Please refer to Sun's java.util.logging 
 documentation for the complete details.
 org.apache.catalina.level=FINEST
 
 However, the string org.apache.catalina.level is not found in the 
 logging.properties file in apache's conf directory.
 In-fact, the only place that string is found is in 
 /apache-tomcat-6.0.20/webapps/docs/logging.html, as well as startup scripts 
 but there is no dicsussion on the java loggin overview of how to set he level.
 
 I'm running Fedora 14 by the way.  I been through a lot of archives searching 
 from various angles, found similar problems, but none with sufficient answers 
 for my problem.  I haven't changed anything else in the properties file, so 
 they are as shipped with Tomcat 6.0.20.  I haven't tried to implement log4j, 
 as java.util.logging with JULI would be fine if I didn't have to hear 
 digesters every bowel movement like this:
 
 1162113  Jan 5, 2011 4:28:59 PM org.apache.tomcat.util.digester.Digester 
 endElement
 1162114  FINE:   bodyText=''
 
 Thanks
 
 T.Curchod.  



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


RE: Tomcat 6 logging clog

2011-01-07 Thread Caldarale, Charles R
From: Tim Space [mailto:qwertypo...@hotmail.com] 
Subject: Tomcat 6 logging clog

 I'm tried modifying both files to no effect:
 /apache-tomcat-6.0.20/conf/logging.properties

Step 1: move to the current Tomcat version, not one that's nearly two years old.

 /jdk1.6.0_18/jre/lib/logging.properties

Not used by Tomcat.  (You should also update your JVM.)

 org.apache.catalina.level=FINEST

 However, the string org.apache.catalina.level is not found 
 in the logging.properties file in apache's conf directory.

Nor need it be.  The above would set FINEST for the org.apache.catalina 
package, which would be inherited by packages underneath that - for ones that 
don't override it with their own .level setting.

 1162113  Jan 5, 2011 4:28:59 PM org.apache.tomcat.util.digester.Digester 
 endElement
 1162114  FINE:   bodyText=''

Clearly indicative that you have logging set to FINE.

My suspicion is that you're not running the Tomcat you think you are.  Try 
downloading a fresh copy from tomcat.apache.org, and running that with no 
config changes.  Make sure you don't have any 3rd-party repackaged versions of 
Tomcat lying around, since the repackagers have a nasty habit of scattering 
files all over the place, making it very difficult to determine which config 
files are actually being used.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6 logging clog

2011-01-07 Thread Konstantin Kolinko
2011/1/7 Caldarale, Charles R chuck.caldar...@unisys.com:
 From: Tim Space [mailto:qwertypo...@hotmail.com]
 Subject: Tomcat 6 logging clog

 I'm tried modifying both files to no effect:
 /apache-tomcat-6.0.20/conf/logging.properties

 Step 1: move to the current Tomcat version, not one that's nearly two years 
 old.

 /jdk1.6.0_18/jre/lib/logging.properties

 Not used by Tomcat.  (You should also update your JVM.)

It is used by Tomcat.
(Note the rules in catalina.policy that allow reading that file).

Properties not defined $CATALINA_BASE/conf/logging.properties are
taken from there.

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 6 logging clog

2011-01-07 Thread Tim Space
 command on my system to start 
Tomcat, but there is not mention of logging.properties in that script.
As Konstantin suggested I looked at the catalina.policy file also.  I notice 
the java logging.properties file is also mentioned there, but as I showed in my 
last e-mail, I have changed the settings in that file also.

grant codeBase file:${catalina.home}/bin/tomcat-juli.jar {
permission java.io.FilePermission
 ${java.home}${file.separator}lib${file.separator}logging.properties, 
read; 

permission java.io.FilePermission
 
${catalina.base}${file.separator}conf${file.separator}logging.properties, 
read;

Another problem with this logging situation is that my webapp takes more than 
two minutes to load after startup.  What should I try next?

 Date: Fri, 7 Jan 2011 18:01:48 +0300
 Subject: Re: Tomcat 6 logging clog
 From: knst.koli...@gmail.com
 To: users@tomcat.apache.org
 
 2011/1/7 Caldarale, Charles R chuck.caldar...@unisys.com:
  From: Tim Space [mailto:qwertypo...@hotmail.com]
  Subject: Tomcat 6 logging clog
 
  I'm tried modifying both files to no effect:
  /apache-tomcat-6.0.20/conf/logging.properties
 
  Step 1: move to the current Tomcat version, not one that's nearly two years 
  old.
 
  /jdk1.6.0_18/jre/lib/logging.properties
 
  Not used by Tomcat.  (You should also update your JVM.)
 
 It is used by Tomcat.
 (Note the rules in catalina.policy that allow reading that file).
 
 Properties not defined $CATALINA_BASE/conf/logging.properties are
 taken from there.
 
 Best regards,
 Konstantin Kolinko
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org