Responding to my own post, see at end.

André Warnier wrote:
Konstantin Kolinko wrote:
2012/6/10 André Warnier <a...@ice-sa.com>:
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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to