tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Tomcat 6 : Warnings at startup
Date Sun, 10 Jun 2012 12:28:25 GMT
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message