issues starting Tomcat 6.0.18 when CATALINA_BASE does not match CATALINA_HOME
Hi All - I have a very basic tomcat setup that generally worked right out of the "box". To make upgrades simplier, I move my webapps and conf files out of CATALINE_BASE and specifically set my own CATALINA_HOME env variable. In the past, to upgrade tomcat, I simply changed my CATALINA_HOME variable and restarted. Now, when attempting to start tomcat using 6.0.18, all I get is the following in my log: Exception in thread "main" java.lang.NoClassDefFoundError: Caused by: java.lang.ClassNotFoundException: at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) And thats it. I have confirmed tomcat starts just fine when BASE matches HOME. I experimented with copying catalina.sh from 6.0.16 into 6.0.18's bin directory, and the server then starts as expected. However, I can't seem to find what in catalina.sh is causing this issue. Can anyone help? Thanks in advance, Al Faller
Tomcat Shutdown Port as Variable
Hi All - I have quite a few installs of Tomcat on the same server (same CATALINA_HOME, different CATALINA_BASE), and I am interested in making my configs a little more portable. I'm trying to make certain unique items in my server.xml variable ( ${variablename} ), being pulled from my CATALINA_OPTS as parameters (-D...). Everything works great, however, the shutdown port seems to be an issue. Since catalina.sh does not utilize CATALINA_OPTS for the stop command, it does not process my parameter (-Dtc.shutdown.port=) and therefore will not attempt to shutdown the correct port. Is there any good way to achieve this to keep my server.xml modular without hacking apart the standard scripts that come with tomcat? for reference, TC version 6.0.18 Thanks, Al
Re: Tomcat Shutdown Port as Variable
> > I have quite a few installs of Tomcat on the same server (same > > CATALINA_HOME, different CATALINA_BASE), and I am interested in making my > > configs a little more portable. I'm trying to make certain unique items > > in my server.xml variable ( ${variablename} ), being pulled from my > > CATALINA_OPTS as parameters (-D...). Everything works great, however, the > > shutdown port seems to be an issue. Since catalina.sh does not utilize > > CATALINA_OPTS for the stop command, it does not process my parameter > > (-Dtc.shutdown.port=) and therefore will not attempt to shutdown the > > correct port. Is there any good way to achieve this to keep my server.xml > > modular without hacking apart the standard scripts that come with tomcat? > > Adding it to JAVA_OPTS instead? That works as expected. Thank you very much! Al
Re: mod_jk configuration woes
> I have the following configuration (config files below) and am > encountering the error > “ajp_connection_tcp_get_message::jk_ajp_common.c (1033): wrong > message format 0x4854 from 127.0.0.1:8082” when attempting to access > a URL that matches one of my JKMounted entries. My versions are > listed below, my workers.properties entries are supplied, my > relevant http.conf entries are supplied, and the debug log from > mod_jk.log is supplied. mod_jk was built from source because of the > known issue of the latest mod_jk builds not working properly with > the 2.2.3 version of Apache httpd. > > Can anyone provide some insight as to why I’m getting this error > message? Is it my combination of Tomcat, Apache, mod_jk? Is there > something that mod_jk is expecting but not getting from Tomcat? > Mod_Jk needs to talk to tomcat via the ajp protocol. You need to define an ajp connector and point mod_jk at that port. Regards, Al