Quantcast

Tomcat 6 : Warnings at startup

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Tomcat 6 : Warnings at startup

André Warnier
Hi.

This is on a Linux Debian system, Tomcat 6 installed from a Debian package.
/usr/share/tomcat6/bin/version.sh shows this :

Using CATALINA_BASE:   /usr/share/tomcat6
Using CATALINA_HOME:   /usr/share/tomcat6
Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/share/tomcat6/bin/bootstrap.jar
Server version: Apache Tomcat/6.0.35
Server built:   Jan 31 2012 04:27:38
Server number:  6.0.35.0
OS Name:        Linux
OS Version:     3.2.0-0.bpo.2-686-pae
Architecture:   i386
JVM Version:    1.6.0_26-b03
JVM Vendor:     Sun Microsystems Inc.
root@colin:/usr/share/tomcat6/bin#


This Tomcat has been running fine for several months (ever since the system was
installed), but today I had to restart the system and Tomcat, and I noticed this in the logs :

In /var/log/tomcat6/catalina.out, at Tomcat startup, there are these lines :

Jun 10, 2012 10:31:33 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat6/server/classes], exists: [false],
isDirectory: [false], canRead: [false]
Jun 10, 2012 10:31:34 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat6/server], exists: [false], isDirectory:
[false], canRead: [false]
Jun 10, 2012 10:31:34 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat6/shared/classes], exists: [false],
isDirectory: [false], canRead: [false]
Jun 10, 2012 10:31:34 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat6/shared], exists: [false], isDirectory:
[false], canRead: [false]
Jun 10, 2012 10:31:35 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 10, 2012 10:31:35 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 890 ms
Jun 10, 2012 10:31:35 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 10, 2012 10:31:35 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Jun 10, 2012 10:31:35 AM org.apache.catalina.startup.HostConfig deployDescriptor
...
(the rest is normal)

What are these WARNING messages for, and should I worry ?
(the shown directories indeed do not exist. Should they ?)

Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Tomcat 6 : Warnings at startup

Konstantin Kolinko
2012/6/10 André Warnier <[hidden email]>:

> Hi.
>
> This is on a Linux Debian system, Tomcat 6 installed from a Debian package.
> /usr/share/tomcat6/bin/version.sh shows this :
>
> Using CATALINA_BASE:   /usr/share/tomcat6
> Using CATALINA_HOME:   /usr/share/tomcat6
> Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
> Using JRE_HOME:        /usr
> Using CLASSPATH:       /usr/share/tomcat6/bin/bootstrap.jar
> Server version: Apache Tomcat/6.0.35
> Server built:   Jan 31 2012 04:27:38
> Server number:  6.0.35.0
> OS Name:        Linux
> OS Version:     3.2.0-0.bpo.2-686-pae
> Architecture:   i386
> JVM Version:    1.6.0_26-b03
> JVM Vendor:     Sun Microsystems Inc.
> root@colin:/usr/share/tomcat6/bin#

Root? You must never run Tomcat as root.

> This Tomcat has been running fine for several months (ever since the system
> was installed), but today I had to restart the system and Tomcat, and I
> noticed this in the logs :
>
> In /var/log/tomcat6/catalina.out, at Tomcat startup, there are these lines :
>
> Jun 10, 2012 10:31:33 AM org.apache.catalina.startup.ClassLoaderFactory
> validateFile
> WARNING: Problem with directory [/usr/share/tomcat6/server/classes], exists:
> [false], isDirectory: [false], canRead: [false]
> Jun 10, 2012 10:31:34 AM org.apache.catalina.startup.ClassLoaderFactory
> validateFile
> WARNING: Problem with directory [/usr/share/tomcat6/server], exists:
> [false], isDirectory: [false], canRead: [false]

Those look very much like directories that Tomcat 5.5 uses. I would
guess that your CATALINA_BASE is wrong. That is as if you tried to
start Tomcat 6 with Tomcat 5.5 configuration files.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Tomcat 6 : Warnings at startup

André Warnier
Konstantin Kolinko wrote:

> 2012/6/10 André Warnier <[hidden email]>:
>> Hi.
>>
>> This is on a Linux Debian system, Tomcat 6 installed from a Debian package.
>> /usr/share/tomcat6/bin/version.sh shows this :
>>
>> Using CATALINA_BASE:   /usr/share/tomcat6
>> Using CATALINA_HOME:   /usr/share/tomcat6
>> Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
>> Using JRE_HOME:        /usr
>> Using CLASSPATH:       /usr/share/tomcat6/bin/bootstrap.jar
>> Server version: Apache Tomcat/6.0.35
>> Server built:   Jan 31 2012 04:27:38
>> Server number:  6.0.35.0
>> OS Name:        Linux
>> OS Version:     3.2.0-0.bpo.2-686-pae
>> Architecture:   i386
>> JVM Version:    1.6.0_26-b03
>> JVM Vendor:     Sun Microsystems Inc.
>> root@colin:/usr/share/tomcat6/bin#
>
> Root? You must never run Tomcat as root.

Let the sysadmin who has never run anything as root throw me the first stone.. ;-)

But I am not running Tomcat as root, I just printed the above as root.
Tomcat 6 is running as user "tomcat6", as per :

tomcat6   6438     1  0 10:31 ?        00:00:07 /usr/lib/jvm/java-6-sun/bin/java
-Djava.util.logging.config.file=/var/lib/tomcat6/conf/logging.properties
-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.endorsed.dirs=/usr/share/tomcat6/endorsed -classpath
/usr/share/tomcat6/bin/bootstrap.jar -Dcatalina.base=/var/lib/tomcat6
-Dcatalina.home=/usr/share/tomcat6 -Djava.io.tmpdir=/tmp/tomcat6-tomcat6-tmp
org.apache.catalina.startup.Bootstrap start
root@colin:/usr/share/tomcat6/bin#

but I cannot login as that user on a console (shell=/bin/false).

>
>> This Tomcat has been running fine for several months (ever since the system
>> was installed), but today I had to restart the system and Tomcat, and I
>> noticed this in the logs :
>>
>> In /var/log/tomcat6/catalina.out, at Tomcat startup, there are these lines :
>>
>> Jun 10, 2012 10:31:33 AM org.apache.catalina.startup.ClassLoaderFactory
>> validateFile
>> WARNING: Problem with directory [/usr/share/tomcat6/server/classes], exists:
>> [false], isDirectory: [false], canRead: [false]
>> Jun 10, 2012 10:31:34 AM org.apache.catalina.startup.ClassLoaderFactory
>> validateFile
>> WARNING: Problem with directory [/usr/share/tomcat6/server], exists:
>> [false], isDirectory: [false], canRead: [false]
>
> Those look very much like directories that Tomcat 5.5 uses. I would
> guess that your CATALINA_BASE is wrong. That is as if you tried to
> start Tomcat 6 with Tomcat 5.5 configuration files.

Well, not as far as I can tell. This host (a VM) was set up several months ago, directly
with Tomcat 6.  Tomcat 5.5 was never even installed on it.
I also cannot find any reference to Tomcat 5.5 anywhere in the configuration files.
Everything mentions Tomcat 6.
CATALINA_BASE = CATALINA_HOME = /usr/share/tomcat6, as per above version.sh output.

I know that these packages tend to put things all over the place, but in this case I
cannot see how there could be Tomcat 5.5 leftovers.

I also ran some "grep -R tomcat5" on /etc, /var, /usr, etc..
The only thing remotely suspicious is this :

Binary file lib/apache2/modules/mod_jk.so matches

but that may just be a comment somewhere in that file.

So, what does that "org.apache.catalina.startup.ClassLoaderFactory validateFile" really
do, that it does not seem happy ?



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Tomcat 6 : Warnings at startup

André Warnier
Responding to my own post, see at end.

André Warnier wrote:

> Konstantin Kolinko wrote:
>> 2012/6/10 André Warnier <[hidden email]>:
>>> Hi.
>>>
>>> This is on a Linux Debian system, Tomcat 6 installed from a Debian
>>> package.
>>> /usr/share/tomcat6/bin/version.sh shows this :
>>>
>>> Using CATALINA_BASE:   /usr/share/tomcat6
>>> Using CATALINA_HOME:   /usr/share/tomcat6
>>> Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
>>> Using JRE_HOME:        /usr
>>> Using CLASSPATH:       /usr/share/tomcat6/bin/bootstrap.jar
>>> Server version: Apache Tomcat/6.0.35
>>> Server built:   Jan 31 2012 04:27:38
>>> Server number:  6.0.35.0
>>> OS Name:        Linux
>>> OS Version:     3.2.0-0.bpo.2-686-pae
>>> Architecture:   i386
>>> JVM Version:    1.6.0_26-b03
>>> JVM Vendor:     Sun Microsystems Inc.
>>> root@colin:/usr/share/tomcat6/bin#
>>
>> Root? You must never run Tomcat as root.
>
> Let the sysadmin who has never run anything as root throw me the first
> stone.. ;-)
>
> But I am not running Tomcat as root, I just printed the above as root.
> Tomcat 6 is running as user "tomcat6", as per :
>
> tomcat6   6438     1  0 10:31 ?        00:00:07
> /usr/lib/jvm/java-6-sun/bin/java
> -Djava.util.logging.config.file=/var/lib/tomcat6/conf/logging.properties
> -Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.endorsed.dirs=/usr/share/tomcat6/endorsed -classpath
> /usr/share/tomcat6/bin/bootstrap.jar -Dcatalina.base=/var/lib/tomcat6
> -Dcatalina.home=/usr/share/tomcat6
> -Djava.io.tmpdir=/tmp/tomcat6-tomcat6-tmp
> org.apache.catalina.startup.Bootstrap start
> root@colin:/usr/share/tomcat6/bin#
>
> but I cannot login as that user on a console (shell=/bin/false).
>
>>
>>> This Tomcat has been running fine for several months (ever since the
>>> system
>>> was installed), but today I had to restart the system and Tomcat, and I
>>> noticed this in the logs :
>>>
>>> In /var/log/tomcat6/catalina.out, at Tomcat startup, there are these
>>> lines :
>>>
>>> Jun 10, 2012 10:31:33 AM org.apache.catalina.startup.ClassLoaderFactory
>>> validateFile
>>> WARNING: Problem with directory [/usr/share/tomcat6/server/classes],
>>> exists:
>>> [false], isDirectory: [false], canRead: [false]
>>> Jun 10, 2012 10:31:34 AM org.apache.catalina.startup.ClassLoaderFactory
>>> validateFile
>>> WARNING: Problem with directory [/usr/share/tomcat6/server], exists:
>>> [false], isDirectory: [false], canRead: [false]
>>
>> Those look very much like directories that Tomcat 5.5 uses. I would
>> guess that your CATALINA_BASE is wrong. That is as if you tried to
>> start Tomcat 6 with Tomcat 5.5 configuration files.
>
> Well, not as far as I can tell. This host (a VM) was set up several
> months ago, directly with Tomcat 6.  Tomcat 5.5 was never even installed
> on it.
> I also cannot find any reference to Tomcat 5.5 anywhere in the
> configuration files. Everything mentions Tomcat 6.
> CATALINA_BASE = CATALINA_HOME = /usr/share/tomcat6, as per above
> version.sh output.
>
> I know that these packages tend to put things all over the place, but in
> this case I cannot see how there could be Tomcat 5.5 leftovers.
>
> I also ran some "grep -R tomcat5" on /etc, /var, /usr, etc..
> The only thing remotely suspicious is this :
>
> Binary file lib/apache2/modules/mod_jk.so matches
>
> but that may just be a comment somewhere in that file.
>
> So, what does that "org.apache.catalina.startup.ClassLoaderFactory
> validateFile" really do, that it does not seem happy ?
>
>

Actually, there is a twist :

"version.sh" prints the above, BUT
in /etc/init.d/tomcat6 (the startup script of Tomcat6 under Debian Linux), it sets
CATALINA_BASE=/var/lib/tomcat6
(but of course "version.sh" does not know that).

In /var/lib/tomcat6, there is this :
root@colin:/var/lib/tomcat6# ls -la
total 24
drwxr-xr-x  6 root    root    4096 Apr  4 04:07 .
drwxr-xr-x 45 root    root    4096 Apr 11 11:21 ..
drwxr-xr-x  3 tomcat6 tomcat6 4096 Apr  4 04:07 common
lrwxrwxrwx  1 root    root      12 Apr  4 04:07 conf -> /etc/tomcat6
lrwxrwxrwx  1 root    root      17 Apr  4 04:07 logs -> ../../log/tomcat6
drwxr-xr-x  3 tomcat6 tomcat6 4096 Apr  4 04:07 server
drwxr-xr-x  3 tomcat6 tomcat6 4096 Apr  4 04:07 shared
drwxrwxr-x  4 tomcat6 tomcat6 4096 Apr  4 08:29 webapps
lrwxrwxrwx  1 root    root      19 Apr  4 04:07 work -> ../../cache/tomcat6
root@colin:/var/lib/tomcat6#

root@colin:/var/lib/tomcat6# cd webapps
root@colin:/var/lib/tomcat6/webapps# ls -la
total 16
drwxrwxr-x  4 tomcat6 tomcat6 4096 Apr  4 08:29 .
drwxr-xr-x  6 root    root    4096 Apr  4 04:07 ..
drwxr-xr-x  3 root    root    4096 Apr  4 04:07 ROOT
drwxrwsr-x 22 star    star    4096 Nov 21  2011 starweb

root@colin:/var/lib/tomcat6/webapps# grep -R "tomcat5" *
root@colin:/var/lib/tomcat6/webapps#


Does that throw any light on what may be happening ?


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Tomcat 6 : Warnings at startup

Konstantin Kolinko
In reply to this post by André Warnier
>>>
>>> In /var/log/tomcat6/catalina.out, at Tomcat startup, there are these
>>> lines :
>>>
>>> Jun 10, 2012 10:31:33 AM org.apache.catalina.startup.ClassLoaderFactory
>>> validateFile
>>> WARNING: Problem with directory [/usr/share/tomcat6/server/classes],
>>> exists:
>>> [false], isDirectory: [false], canRead: [false]
>>> Jun 10, 2012 10:31:34 AM org.apache.catalina.startup.ClassLoaderFactory
>>> validateFile
>>> WARNING: Problem with directory [/usr/share/tomcat6/server], exists:
>>> [false], isDirectory: [false], canRead: [false]
>>
>>
>> Those look very much like directories that Tomcat 5.5 uses. I would
>> guess that your CATALINA_BASE is wrong. That is as if you tried to
>> start Tomcat 6 with Tomcat 5.5 configuration files.
>
>
> Well, not as far as I can tell. This host (a VM) was set up several months
> ago, directly with Tomcat 6.  Tomcat 5.5 was never even installed on it.
> I also cannot find any reference to Tomcat 5.5 anywhere in the configuration
> files. Everything mentions Tomcat 6.
> CATALINA_BASE = CATALINA_HOME = /usr/share/tomcat6, as per above version.sh
> output.
>

catalina.sh autodetects home and base if you have not provided one,
and I think you haven't

> I know that these packages tend to put things all over the place, but in
> this case I cannot see how there could be Tomcat 5.5 leftovers.
>
> I also ran some "grep -R tomcat5" on /etc, /var, /usr, etc..
> The only thing remotely suspicious is this :
>
> Binary file lib/apache2/modules/mod_jk.so matches
>
> but that may just be a comment somewhere in that file.
>

Those folders are configured in conf/catalina.properties.  If you have
that file copied from Tomcat 5.5 that you will see this effect.

> So, what does that "org.apache.catalina.startup.ClassLoaderFactory
> validateFile" really do, that it does not seem happy ?

http://svn.apache.org/viewvc?view=revision&revision=1130932

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Tomcat 6 : Warnings at startup

André Warnier
Konstantin Kolinko wrote:

>>>> In /var/log/tomcat6/catalina.out, at Tomcat startup, there are these
>>>> lines :
>>>>
>>>> Jun 10, 2012 10:31:33 AM org.apache.catalina.startup.ClassLoaderFactory
>>>> validateFile
>>>> WARNING: Problem with directory [/usr/share/tomcat6/server/classes],
>>>> exists:
>>>> [false], isDirectory: [false], canRead: [false]
>>>> Jun 10, 2012 10:31:34 AM org.apache.catalina.startup.ClassLoaderFactory
>>>> validateFile
>>>> WARNING: Problem with directory [/usr/share/tomcat6/server], exists:
>>>> [false], isDirectory: [false], canRead: [false]
>>>
>>> Those look very much like directories that Tomcat 5.5 uses. I would
>>> guess that your CATALINA_BASE is wrong. That is as if you tried to
>>> start Tomcat 6 with Tomcat 5.5 configuration files.
>>
>> Well, not as far as I can tell. This host (a VM) was set up several months
>> ago, directly with Tomcat 6.  Tomcat 5.5 was never even installed on it.
>> I also cannot find any reference to Tomcat 5.5 anywhere in the configuration
>> files. Everything mentions Tomcat 6.
>> CATALINA_BASE = CATALINA_HOME = /usr/share/tomcat6, as per above version.sh
>> output.
>>
>
> catalina.sh autodetects home and base if you have not provided one,
> and I think you haven't
>
>> I know that these packages tend to put things all over the place, but in
>> this case I cannot see how there could be Tomcat 5.5 leftovers.
>>
>> I also ran some "grep -R tomcat5" on /etc, /var, /usr, etc..
>> The only thing remotely suspicious is this :
>>
>> Binary file lib/apache2/modules/mod_jk.so matches
>>
>> but that may just be a comment somewhere in that file.
>>
>
> Those folders are configured in conf/catalina.properties.  If you have
> that file copied from Tomcat 5.5 that you will see this effect.

No tomcat 5.5 files have been copied to that system (apart from the webapp).
Here is the complete (edited, comments removed) content of tomcat6/conf/catalina.properties :

package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/var/lib/tomcat6/common/classes,/var/lib/tomcat6/common/*.jar
server.loader=${catalina.home}/server/classes,${catalina.home}/server/*.jar,/var/lib/tomcat6/server/classes,/var/lib/tomcat6/server/*.jar
shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/*.jar,/var/lib/tomcat6/shared/classes,/var/lib/tomcat6/shared/*.jar
tomcat.util.buf.StringCache.byte.enabled=true

>
>> So, what does that "org.apache.catalina.startup.ClassLoaderFactory
>> validateFile" really do, that it does not seem happy ?
>
> http://svn.apache.org/viewvc?view=revision&revision=1130932
>

Konstantin,
thank you for helping.
But I am of sysadmin level, not java programmer level, so I can't really look inside that
java source and figure out what is making it unhappy.

The WARNING messages in question do not seem to impact the ability of Tomcat to run, and
to run the applications, for months in a row.
What I am saying, is that this is not a life-threatening issue.  I was just curious as to
the warning, and trying to figure out if I was doing something wrong in the configuration,
or if this might indicate a deeper issue.

The /etc/init.d/tomcat6 script which starts Tomcat is rather convoluted, but here is the
section which apparently starts Tomcat :

...
                echo "CATALINA_HOME is : $CATALINA_HOME"
                echo "CATALINA_BASE is : $CATALINA_BASE"

                catalina_sh start $SECURITY
                sleep 5
          if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
                        --user $TOMCAT6_USER --exec "$JAVA_HOME/bin/java" \
                        >/dev/null; then
                        if [ -f "$CATALINA_PID" ]; then
                                rm -f "$CATALINA_PID"
                        fi
                        log_end_msg 1
                else
                        log_end_msg 0
                fi
...

(I just added the 2 echo lines)


then I ran :

root@colin:/var/lib/tomcat6/webapps# /etc/init.d/tomcat6 stop
Stopping Tomcat servlet engine: tomcat6.
root@colin:/var/lib/tomcat6/webapps# /etc/init.d/tomcat6 start
Starting Tomcat servlet engine: tomcat6
CATALINA_HOME is : /usr/share/tomcat6
CATALINA_BASE is : /var/lib/tomcat6
.
root@colin:/var/lib/tomcat6/webapps#

So it looks like they are set properly. ??

but in /var/log/catalina.out I still have :

Jun 10, 2012 2:07:21 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Jun 10, 2012 2:07:22 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jun 10, 2012 2:07:22 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Jun 10, 2012 2:07:31 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat6/server/classes], exists: [false],
isDirectory: [false], canRead: [false]
Jun 10, 2012 2:07:31 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat6/server], exists: [false], isDirectory:
[false], canRead: [false]
Jun 10, 2012 2:07:31 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat6/shared/classes], exists: [false],
isDirectory: [false], canRead: [false]
Jun 10, 2012 2:07:31 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat6/shared], exists: [false], isDirectory:
[false], canRead: [false]
Jun 10, 2012 2:07:31 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
...

Now I see that the Debian tomcat6 package created the above directories in
/var/lib/tomcat6 (which is CATALINA_BASE), but not in /usr/share/tomcat6 (which is
CATALINA_HOME).
Maybe this is the problem ?



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Tomcat 6 : Warnings at startup

Konstantin Kolinko
2012/6/10 André Warnier <[hidden email]>:
>
> No tomcat 5.5 files have been copied to that system (apart from the webapp).
> Here is the complete (edited, comments removed) content of
> tomcat6/conf/catalina.properties :
>
> (...)
> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/var/lib/tomcat6/common/classes,/var/lib/tomcat6/common/*.jar
> server.loader=${catalina.home}/server/classes,${catalina.home}/server/*.jar,/var/lib/tomcat6/server/classes,/var/lib/tomcat6/server/*.jar
> shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/*.jar,/var/lib/tomcat6/shared/classes,/var/lib/tomcat6/shared/*.jar

The above fragment of catalina.properties explains the issue that you
are observing.

The "common.loader", "server.loader" and "shared.loader" values
provide configuration for Common, Server and Shared classloader, as
better documented in 5.5 (Tomcat 6 docs not mention Server and Shared
ones, but they still do exist):

http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html#Overview

If you look at a fresh copy of Tomcat 6, the values would be:

[[[
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
server.loader=
shared.loader=
]]]

The ones that you have in your file are a mix of 5.5 and 6.0 values.

ClassLoaderFactory.validateFile() method is called in turn for each
value in each of the 3 *.loader options and checks that those values
point to an existing place, which is a directory and is readable.

In your case,

> WARNING: Problem with directory [/usr/share/tomcat6/server/classes],
> exists: [false], isDirectory: [false], canRead: [false]

it looked for [/usr/share/tomcat6/server/classes] and warned you that
the said directory does not exist.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Tomcat 6 : Warnings at startup

André Warnier
Konstantin Kolinko wrote:

> 2012/6/10 André Warnier <[hidden email]>:
>> No tomcat 5.5 files have been copied to that system (apart from the webapp).
>> Here is the complete (edited, comments removed) content of
>> tomcat6/conf/catalina.properties :
>>
>> (...)
>> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/var/lib/tomcat6/common/classes,/var/lib/tomcat6/common/*.jar
>> server.loader=${catalina.home}/server/classes,${catalina.home}/server/*.jar,/var/lib/tomcat6/server/classes,/var/lib/tomcat6/server/*.jar
>> shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/*.jar,/var/lib/tomcat6/shared/classes,/var/lib/tomcat6/shared/*.jar
>
> The above fragment of catalina.properties explains the issue that you
> are observing.
>
> The "common.loader", "server.loader" and "shared.loader" values
> provide configuration for Common, Server and Shared classloader, as
> better documented in 5.5 (Tomcat 6 docs not mention Server and Shared
> ones, but they still do exist):
>
> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html#Overview
>
> If you look at a fresh copy of Tomcat 6, the values would be:
>
> [[[
> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
> server.loader=
> shared.loader=
> ]]]
>
> The ones that you have in your file are a mix of 5.5 and 6.0 values.
>
> ClassLoaderFactory.validateFile() method is called in turn for each
> value in each of the 3 *.loader options and checks that those values
> point to an existing place, which is a directory and is readable.
>
> In your case,
>
>> WARNING: Problem with directory [/usr/share/tomcat6/server/classes],
>> exists: [false], isDirectory: [false], canRead: [false]
>
> it looked for [/usr/share/tomcat6/server/classes] and warned you that
> the said directory does not exist.
>
>

Thank you Konstantin for this very thorough explanation.

So, it looks like my options to make the warnings disappear are
- either just create these directories (empty) in CATALINA_HOME
- or modify the tomcat6/conf/catalina.properties file to remove (direct or indirect)
references to /usr/share/tomcat6/server

As it is now, the file comes from the Tomcat 6 Debian package; I did not modify that file.
I would imagine that if the Debian package maintainer decided to modify the standard file,
he had some reason to do that.

Based on your knowledge, do you have an idea as to why the Debian Tomcat 6 package
maintainer may have considered it a good idea to modify the standard catalina.properties
in the way that he did ?  Could it be to make upgrades tomcat 5.5 -> tomcat 6 easier ?

(To me, there seems to be a curious mixture of "symbolic" (${catalina.home}/*) and
"hardwired" (/var/lib/tomcat6/*) references in the Debian version of that file.)



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Tomcat 6 : Warnings at startup

André Warnier
André Warnier wrote:

> Konstantin Kolinko wrote:
>> 2012/6/10 André Warnier <[hidden email]>:
>>> No tomcat 5.5 files have been copied to that system (apart from the
>>> webapp).
>>> Here is the complete (edited, comments removed) content of
>>> tomcat6/conf/catalina.properties :
>>>
>>> (...)
>>> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/var/lib/tomcat6/common/classes,/var/lib/tomcat6/common/*.jar
>>>
>>> server.loader=${catalina.home}/server/classes,${catalina.home}/server/*.jar,/var/lib/tomcat6/server/classes,/var/lib/tomcat6/server/*.jar
>>>
>>> shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/*.jar,/var/lib/tomcat6/shared/classes,/var/lib/tomcat6/shared/*.jar
>>>
>>
>> The above fragment of catalina.properties explains the issue that you
>> are observing.
>>
>> The "common.loader", "server.loader" and "shared.loader" values
>> provide configuration for Common, Server and Shared classloader, as
>> better documented in 5.5 (Tomcat 6 docs not mention Server and Shared
>> ones, but they still do exist):
>>
>> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html#Overview
>>
>> If you look at a fresh copy of Tomcat 6, the values would be:
>>
>> [[[
>> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
>>
>> server.loader=
>> shared.loader=
>> ]]]
>>
>> The ones that you have in your file are a mix of 5.5 and 6.0 values.
>>
>> ClassLoaderFactory.validateFile() method is called in turn for each
>> value in each of the 3 *.loader options and checks that those values
>> point to an existing place, which is a directory and is readable.
>>
>> In your case,
>>
>>> WARNING: Problem with directory [/usr/share/tomcat6/server/classes],
>>> exists: [false], isDirectory: [false], canRead: [false]
>>
>> it looked for [/usr/share/tomcat6/server/classes] and warned you that
>> the said directory does not exist.
>>
>>
>
> Thank you Konstantin for this very thorough explanation.
>
> So, it looks like my options to make the warnings disappear are
> - either just create these directories (empty) in CATALINA_HOME
> - or modify the tomcat6/conf/catalina.properties file to remove (direct
> or indirect) references to /usr/share/tomcat6/server
>
> As it is now, the file comes from the Tomcat 6 Debian package; I did not
> modify that file.
> I would imagine that if the Debian package maintainer decided to modify
> the standard file, he had some reason to do that.
>
> Based on your knowledge, do you have an idea as to why the Debian Tomcat
> 6 package maintainer may have considered it a good idea to modify the
> standard catalina.properties in the way that he did ?  Could it be to
> make upgrades tomcat 5.5 -> tomcat 6 easier ?
>
> (To me, there seems to be a curious mixture of "symbolic"
> (${catalina.home}/*) and "hardwired" (/var/lib/tomcat6/*) references in
> the Debian version of that file.)
>
>

For the record : adding the missing directories under CATALINA_HOME (/usr/share/tomcat6
here), and making them owned/readable by the tomcat6 user, definitely does it (make the
WARNING messages disappear) :

Jun 10, 2012 5:03:47 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Jun 10, 2012 5:03:48 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jun 10, 2012 5:03:49 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080

Jun 10, 2012 5:03:57 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 10, 2012 5:03:57 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 408 ms
Jun 10, 2012 5:03:57 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 10, 2012 5:03:57 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Jun 10, 2012 5:03:57 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor myapp.xml
...


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Tomcat 6 : Warnings at startup

Konstantin Kolinko
In reply to this post by André Warnier
2012/6/10 André Warnier <[hidden email]>:

> Konstantin Kolinko wrote:
>>
>> 2012/6/10 André Warnier <[hidden email]>:
>>>
>>> No tomcat 5.5 files have been copied to that system (apart from the
>>> webapp).
>>> Here is the complete (edited, comments removed) content of
>>> tomcat6/conf/catalina.properties :
>>>
>>> (...)
>>>
>>> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/var/lib/tomcat6/common/classes,/var/lib/tomcat6/common/*.jar
>>>
>>> server.loader=${catalina.home}/server/classes,${catalina.home}/server/*.jar,/var/lib/tomcat6/server/classes,/var/lib/tomcat6/server/*.jar
>>>
>>> shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/*.jar,/var/lib/tomcat6/shared/classes,/var/lib/tomcat6/shared/*.jar
>>
>>
>> The above fragment of catalina.properties explains the issue that you
>> are observing.
>>
>> The "common.loader", "server.loader" and "shared.loader" values
>> provide configuration for Common, Server and Shared classloader, as
>> better documented in 5.5 (Tomcat 6 docs not mention Server and Shared
>> ones, but they still do exist):
>>
>> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html#Overview
>>
>> If you look at a fresh copy of Tomcat 6, the values would be:
>>
>> [[[
>>
>> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
>> server.loader=
>> shared.loader=
>> ]]]
>>
>> The ones that you have in your file are a mix of 5.5 and 6.0 values.
>>
>> ClassLoaderFactory.validateFile() method is called in turn for each
>> value in each of the 3 *.loader options and checks that those values
>> point to an existing place, which is a directory and is readable.
>>
>> In your case,
>>
>>> WARNING: Problem with directory [/usr/share/tomcat6/server/classes],
>>> exists: [false], isDirectory: [false], canRead: [false]
>>
>>
>> it looked for [/usr/share/tomcat6/server/classes] and warned you that
>> the said directory does not exist.
>>
>>
>
> Thank you Konstantin for this very thorough explanation.
>
> So, it looks like my options to make the warnings disappear are
> - either just create these directories (empty) in CATALINA_HOME
> - or modify the tomcat6/conf/catalina.properties file to remove (direct or
> indirect) references to /usr/share/tomcat6/server
>
> As it is now, the file comes from the Tomcat 6 Debian package; I did not
> modify that file.

The file is strange. I wonder whether other configuration files there
have similar inconsistencies.

The good side though is that this error is not fatal. It was intended
more for folks trying to start Tomcat using different user and failing
because of libraries not being readable. (that is why "canRead" value
is included into the message). ;)

> I would imagine that if the Debian package maintainer decided to modify the
> standard file, he had some reason to do that.
>
> Based on your knowledge, do you have an idea as to why the Debian Tomcat 6
> package maintainer may have considered it a good idea to modify the standard
> catalina.properties in the way that he did ?  Could it be to make upgrades
> tomcat 5.5 -> tomcat 6 easier ?
>
> (To me, there seems to be a curious mixture of "symbolic"
> (${catalina.home}/*) and "hardwired" (/var/lib/tomcat6/*) references in the
> Debian version of that file.)

I can imagine that some odd packages (debs, rpms) were installing
their libraries into those folders.

Anyway
- Placing 3rd party libraries into Common classloader without a good
reason is usually a bad idea. It can result in odd dependencies and in
PermGen memory leaks.

- Are you using this Tomcat to run "your own" application or one
provided by Debian folks? If it were my own I would like to make sure
that there were none of unexpected libraries in those classloaders.

Creating the mentioned folders has the only benefit that you can leave
the original configuration file "as is".

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Tomcat 6 : Warnings at startup

hectorbernal
This post has NOT been accepted by the mailing list yet.
In reply to this post by André Warnier
Hey André,

I have exactly the same problem as you have. Did you find a solution? I created the missing folders, so that problem is gone but I still have all the rest!:
sep 26, 2012 9:33:24 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Composite' did not find a matching property.
sep 26, 2012 9:33:24 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8082
sep 26, 2012 9:33:24 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 715 ms
sep 26, 2012 9:33:24 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
sep 26, 2012 9:33:24 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
sep 26, 2012 9:33:24 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
  dk.itu.mobile.server
sep 26, 2012 9:33:24 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Root resource classes found:
  class dk.itu.mobile.server.RestServer
sep 26, 2012 9:33:24 PM com.sun.jersey.api.core.ScanningResourceConfig init
INFO: No provider classes found.
sep 26, 2012 9:33:24 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.14 09/09/2012 05:39 PM'
sep 26, 2012 9:33:25 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8082
sep 26, 2012 9:33:25 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1395 ms
I hope someone can help!
Loading...