tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Tomcat 6 logging clog
Date Sat, 08 Jan 2011 16:12:15 GMT
On 1/8/11 7:10 AM, Tim Space wrote:
>=20
>=20
>=20
>=20
> 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 onl=
y 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-tom=
cat-7.0.5.  Thing works fine out of the box.  Webapp runs, and the new ca=
talina.out is 42MBs, better than 50MBs, but still clogged.  Here is a sam=
ple of some of log entries:
>=20
> 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
>=20
> FINE: 160 read class attr -- 'SourceFile'
> Jan 8, 2011 6:38:58 AM org.apache.jasper.compiler.SmapUtil$SDEInstaller=
 copyConstantPool
>=20
> 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 allocat=
e
> FINER:   Returning non-STM instance
> ...
>=20
> line 934632 Jan 8, 2011 6:41:03 AM org.apache.catalina.core.Application=
Context log
> INFO: IntegratedTestResultAction.perform for -5519451928541341468      =
               (<- This is the line where my webapp log starts.)
>=20
>=20
> Here is the properties file settings that the distribution come with:
>=20
> 1catalina.org.apache.juli.FileHandler.level =3D FINE
> 1catalina.org.apache.juli.FileHandler.directory =3D ${catalina.base}/lo=
gs
> 1catalina.org.apache.juli.FileHandler.prefix =3D catalina.
>=20
> 2localhost.org.apache.juli.FileHandler.level =3D FINE
> 2localhost.org.apache.juli.FileHandler.directory =3D ${catalina.base}/l=
ogs
> 2localhost.org.apache.juli.FileHandler.prefix =3D localhost.
>=20
> 3manager.org.apache.juli.FileHandler.level =3D FINE
> 3manager.org.apache.juli.FileHandler.directory =3D ${catalina.base}/log=
s
> 3manager.org.apache.juli.FileHandler.prefix =3D manager.
>=20
> 4host-manager.org.apache.juli.FileHandler.level =3D FINE
> 4host-manager.org.apache.juli.FileHandler.directory =3D ${catalina.base=
}/logs
> 4host-manager.org.apache.juli.FileHandler.prefix =3D host-manager.
>=20
> java.util.logging.ConsoleHandler.level =3D FINE
> java.util.logging.ConsoleHandler.formatter =3D java.util.logging.Simple=
Formatter
>=20
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level =3D=
 INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers =
=3D 2localhost.org.apache.juli.FileHandler
>=20
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager=
].level =3D INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager=
].handlers =3D 3manager.org.apache.juli.FileHandler
>=20
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-ma=
nager].level =3D INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-ma=
nager].handlers =3D 4host-manager.org.apache.juli.FileHandler
>=20
> # 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 =3D FINE
>=20
> I changed all THE fine INFO settings to SEVERE, and got the log shown a=
bove.  I'll think about moving to Java update 23 from update 16, but doub=
t 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.:
>=20
> org.apache.jasper=3DSEVERE
> org.apache.tomcat.util.file.Matcher=3DSEVERE
> org.apache.tomcat.util.digester.Digester=3DSEVERE
>=20
> 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.
>=20
> In the catalina.bat file it says:
>=20
> if not "%LOGGING_CONFIG%" =3D=3D "" goto noJuliConfig
>=20
> set LOGGING_CONFIG=3D-Dnop
>=20
> if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfi=
g
>=20
> set LOGGING_CONFIG=3D-Djava.util.logging.config.file=3D"%CATALINA_BASE%=
\conf\logging.properties"
>=20
> :noJuliConfig
>=20
> set JAVA_OPTS=3D%JAVA_OPTS% %LOGGING_CONFIG%
>=20
> =20
> if not "%LOGGING_MANAGER%" =3D=3D "" goto noJuliManager
>=20
> set LOGGING_MANAGER=3D-Djava.util.logging.manager=3Dorg.apache.juli.Cla=
ssLoaderLogManager
>=20
> :noJuliManager
>=20
> set JAVA_OPTS=3D%JAVA_OPTS% %LOGGING_MANAGER%
>=20
> In the catalina.sh script it says:
>=20
> # 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
>     LOGGING_CONFIG=3D"-Djava.util.logging.config.file=3D$CATALINA_BASE/=
conf/logging.properties"
>   else
>     # Bugzilla 45585
>     LOGGING_CONFIG=3D"-Dnop"
>   fi
> fi
>=20
> But as I said above, I use the sh startup.sh command on my system to st=
art Tomcat, but there is not mention of logging.properties in that script=
=2E
> As Konstantin suggested I looked at the catalina.policy file also.  I n=
otice 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.
>=20
> grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
>         permission java.io.FilePermission
>          "${java.home}${file.separator}lib${file.separator}logging.prop=
erties", "read";=20
>=20
>         permission java.io.FilePermission
>          "${catalina.base}${file.separator}conf${file.separator}logging=
=2Eproperties", "read";
>=20
> Another problem with this logging situation is that my webapp takes mor=
e than two minutes to load after startup.  What should I try next?

Type 'ps -aef | grep java' into the terminal and report back the output.

The process should have a reference to a logging.properties file, is it
the one you think it is?


p




Mime
View raw message