Re: Apache 2.2 to Tomcat 6 via proxy_ajp
J. Zimmerman wrote: I am just getting started with Tomcat and have been asked to take on the administration of our Tomcat servers at our college. I am not one of the developers, just the administrator. So far everything has gone pretty smoothly except for getting everything to run proxied via Apache (at least the way we would like it). Our requirement is for Tomcat to deliver the application through http://hostname:8080/appname and/or ajp://hostname:8009/appname. This happens by default and works well. However, we want end users to access the applications via port 443 or 80 and we are doing this via Apache. I can make this work via proxy_ajp and proxy_http so that something like http://hostname/appname works just fine. The wrench in the works is that we want to do virtual hosting through Apache and not have the appname appended to it. The Apache virtual hosted URL's will be the ones exposed to the public. For example if we developed an application called mycoolapp and we were deploying it at a website of the same name we would want the application to run at http://mycoolapp.com and not http://mycoolapp.com/mycoolapp. Inside your virtual host, something like: ProxyPass / http://tomcat.host:8080/mycoolapp/ ProxyPassReverse / http://tomcat.host:8080/mycoolapp/ should do the trick. What have you tried and what, exactly, didn't work? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Silent Installation of Apache Tomcat
Thank you Peter...If I decide against installing TOMCAT using the conventional exe in WINDOWS, is there a way I can install Tomcat? What files typically need to go into the installation? Thanks and Regards Aditya Darbha On Thu, May 21, 2009 at 5:40 PM, Peter Crowther peter.crowt...@melandra.com wrote: From: aditya darbha [mailto:adityadar...@gmail.com] want to couple Apache Tomcat into my application. My installer would check for an existing installation of the TOMCAT and would try to install Tomcat if there is no existing installation.!! This installation has to be silent and the user need not explicitly know that Apache Tomcat is being installed.Is there a way of installing Apache Tomcat silently in Windows? If yes, how can I do it? A Tomcat installation is just a bunch of files plus some way of starting Tomcat. Your installer could install the files (don't forget you may need to install a JRE as well, as the machine may not already have an appropriate version installed). Your installer could also call the script to create an appropriate service - it depends whether you want to start Tomcat as a service, or whether you just want it started when the user starts your program. Be aware of your user base if you choose to do this. In general, I get rather upset when an installer installs something that runs at startup on my machine and doesn't tell me. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Silent Installation of Apache Tomcat
From: aditya darbha [mailto:adityadar...@gmail.com] If I decide against installing TOMCAT using the conventional exe in WINDOWS, is there a way I can install Tomcat? What files typically need to go into the installation? Download the zip installation. Unzip. You now have the files. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Silent Installation of Apache Tomcat
Thank you peter it is working like a charm!!! Thanks again.. Cheers.. Aditya Darbha On Fri, May 22, 2009 at 2:55 PM, Peter Crowther peter.crowt...@melandra.com wrote: From: aditya darbha [mailto:adityadar...@gmail.com] If I decide against installing TOMCAT using the conventional exe in WINDOWS, is there a way I can install Tomcat? What files typically need to go into the installation? Download the zip installation. Unzip. You now have the files. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
deploy my files with a different user than root
Hi, I am using the tomcat manager to deploy my apps, but after deploy, web files have root as owner. I have permissions to deploy but I am not root of the machine, how can I deploy my files with a different user? Thanks a lot, José -- This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted. Este mensaje y los ficheros adjuntos pueden contener informacion confidencial destinada solamente a la(s) persona(s) mencionadas anteriormente pueden estar protegidos por secreto profesional. Si usted recibe este correo electronico por error, gracias por informar inmediatamente al remitente y destruir el mensaje. Al no estar asegurada la integridad de este mensaje sobre la red, Atos Origin no se hace responsable por su contenido. Su contenido no constituye ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas partes. Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor no puede garantizar nada al respecto y no sera responsable de cualesquiera danos que puedan resultar de una transmision de virus. -- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: deploy my files with a different user than root
From: Jose Manuel Hostalet Wandosell I am using the tomcat manager to deploy my apps, but after deploy, web files have root as owner. I have permissions to deploy but I am not root of the machine, how can I deploy my files with a different user? Don't run Tomcat as root. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity
On 22.05.2009 03:54, Pantvaidya, Vishwajit wrote: -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Thursday, May 21, 2009 3:37 PM To: Tomcat Users List Subject: Re: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity On 22.05.2009 00:19, Pantvaidya, Vishwajit wrote: [Pantvaidya, Vishwajit] I will set - cachesize=1 (doc says jk will autoset this value only for worker-mpm and we use httpd 2.0 prefork) You don't have to: JK will discover this number for the Apache web server automatically and set the pool size to this value. [Pantvaidya, Vishwajit] Does what you say hold true for jk 1.2.15 also? Because I saw that for the 1.2.15 cachesize directive, http://tomcat.apache.org/connectors-doc/reference/workers.html#Deprecated%20Worker%20Directives says that JK will discover the number of threads per child process on Apache 2 web server with worker-mpm and set its default value to match the ThreadsPerChild Apache directive.. Since we use pre-fork MPM, I assumed we need to set cachesize. I would say yes, but now your Ops people who resist upgrading try to play my time against their time. I'm not going to look it up for them, they should upgrade ;) - remove cache and recycle timeouts Chris and me are not having the same opinion here. You can choose :) [Pantvaidya, Vishwajit] I think that may be only because my adding the connectionTimeout led you to believe that I wanted nonpersistent conn's. Now that I know persistent connections are better, I am trying to rollback connectionTimeout - and then I guess you will agree with Chris that I need to rollback the recycletimeouts, etc in workers file on httpd side also? My point is: persistent connections are good, but connections which are idle for a long time are not as good, so close them after some idle time, like e.g. 10 minutes. Of course this means you need to create new ones once your load goes up again, but that's not a big problem. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_proxy, Tomcat and request URL
On 22.05.2009 04:31, Andre-John Mas wrote: On 21-May-2009, at 12:32, Rainer Jung wrote: On 20.05.2009 17:33, Markus Schönhaber wrote: Andre-John Mas: this is not the ideal setup, I don't have any control over this. At the same time I see that using mod_proxy, by way of ProxyPass, means that the Tomcat server does not know what hostname was used to access the Apache server, instead getting http://localhost:8080/ . Is there any way, probably via configuration of Apache, that this could be passed to the Tomcat? I looked for information on this, but I could not find any. Instead of mod_proxy_http, I use mod_proxy_ajp. AJP passes the client's IP through. On 20.05.2009 16:59, Caldarale, Charles R wrote: Aren't the X-Forwarded-For and X-Forwarded-Host headers being set by mod_proxy? The doc indicates they should be: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html .. and finally there's ProxyPreserveHost. That's one option I missed. Is there any way to know whether Apache was contacted using HTTPS or HTTP, on the Tomcat side? I didn't test it, but what should work: mod_ssl automatically sets an internal httpd nvironment variable named HTTPS to on when the connection is doing https. mod_rewrite knows this variable as a builtin (look for HTTPS on http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html), but any other module, that can use data rom environment variables can also use it. E.g. mod_headers has a syntax, where you set request headers depending on an env var being set or not. So you can try to use mod_headers to add a private request header (like: X-MYAPP-HTTPS: yes) to the request, depending on the env var HTTPS being set. You backend can then check for the existence of the header. CAUTION: You can compromise your security with such a header. If your users find out, what the header is, they can send it with the original request and claim it to be HTTPS. To make it bullet proof, you would first have to remove it (and all equivalent headers). I didn't check, whether mod_ssl sets the variable earl enough for mod_request to detect it and mod_proxy to alrady find the new header before forwarding, but I think that's reasonable. Have fun, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 6 - not started AJP/NIO on CentOS
Tomcat 6.0.18 JDK 1.6.0_13 I want to use AJP/NIO connector, but it didn't started on CentOS (neither Intel no AMD platform). May 22, 2009 10:07:52 AM org.apache.catalina.startup.SetAllPropertiesRule begin WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'channelNioSocket.port' to '8009' did not find a matching property. May 22, 2009 10:07:52 AM org.apache.catalina.startup.SetAllPropertiesRule begin WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'channelNioSocket.maxThreads' to '97' did not find a matching property. May 22, 2009 10:07:52 AM org.apache.catalina.startup.SetAllPropertiesRule begin WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'channelNioSocket.maxSpareThreads' to '50' did not find a matching property. May 22, 2009 10:07:52 AM org.apache.catalina.startup.SetAllPropertiesRule begin WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'channelNioSocket.minSpareThreads' to '25' did not find a matching property. May 22, 2009 10:07:52 AM org.apache.catalina.startup.SetAllPropertiesRule begin WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'channelNioSocket.bufferSize' to '16384' did not find a matching property. May 22, 2009 10:07:52 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO: Using a shared selector for servlet write/read May 22, 2009 10:07:52 AM org.apache.coyote.http11.Http11NioProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 22, 2009 10:07:52 AM org.apache.coyote.ajp.AjpAprProtocol init INFO: Initializing Coyote AJP/1.3 on ajp-0 May 22, 2009 10:07:52 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1357 ms May 22, 2009 10:07:52 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 22, 2009 10:07:52 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 May 22, 2009 10:07:59 AM org.apache.catalina.core.ApplicationContext log INFO: quartz: Quartz Initializer Servlet loaded, initializing Scheduler... May 22, 2009 10:07:59 AM org.apache.coyote.http11.Http11NioProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 May 22, 2009 10:07:59 AM org.apache.coyote.ajp.AjpAprProtocol start INFO: Starting Coyote AJP/1.3 on ajp-0 May 22, 2009 10:07:59 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 6751 ms But it works fine on Solaris 10, Ubuntu and Windows XP. May 7, 2009 3:16:23 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO: Using a shared selector for servlet write/read May 7, 2009 3:16:23 PM org.apache.coyote.http11.Http11NioProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 7, 2009 3:16:23 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 837 ms May 7, 2009 3:16:23 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 7, 2009 3:16:23 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 May 7, 2009 3:16:26 PM org.apache.coyote.http11.Http11NioProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 May 7, 2009 3:16:26 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 disabling channelSocket May 7, 2009 3:16:26 PM org.apache.jk.common.ChannelNioSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 May 7, 2009 3:16:26 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/27 config=null May 7, 2009 3:16:27 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 3694 ms Any idea? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SSI configuration
Ah silly of me; I did read it, but completely spaced over: Only Contexts which are marked as privileged may use SSI features (see the privileged property of the Context element). But it doesn't seem to mention what you say about the global vs local contexts: You must mark your webapp that wishes to use SSI as privileged in its Context element. Unless you want to mark all of your webapps as privileged, do not uncomment the SSI servlet in the global conf/ web.xml; instead, place the SSI servlet definition and mappings to the WEB-INF/web.xml of the webapps that need to use SSI. I think that ought to be inserted verbatim at the end of Installation. However, I still seem to be missing the joke, because things aren't working. So first here's my setup: java version 1.5.0_16; tomcat 6.0.18 (from apache) on Mac OS X 10.5.6 I created a very simple stripped-down app as follows: META-INF/context.xml: Context debug=5 reloadable=true crossContext=true privileged=true /Context WEB-INF/web.xml: ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list servlet servlet-namessi/servlet-name servlet-class org.apache.catalina.ssi.SSIServlet /servlet-class init-param param-namebuffered/param-name param-value1/param-value /init-param init-param param-namedebug/param-name param-value0/param-value /init-param init-param param-nameexpires/param-name param-value666/param-value /init-param init-param param-nameisVirtualWebappRelative/param-name param-value0/param-value /init-param load-on-startup4/load-on-startup /servlet servlet-mapping servlet-namessi/servlet-name url-pattern*.shtml/url-pattern /servlet-mapping /web-app In index.html (taken from http://httpd.apache.org/docs/1.3/howto/ssi.html) : pToday is |!--#echo var=DATE_LOCAL --|p No errors in the logs (catalina.out); for completeness, I've attached that at the very end. But the output is: Today is || So I've missed something. Thanks, Ken catalina.out: $ ../bin/startup.sh ; tail -f catalina.out Using CATALINA_BASE: /opt/apache-tomcat-6.0.18 Using CATALINA_HOME: /opt/apache-tomcat-6.0.18 Using CATALINA_TMPDIR: /opt/apache-tomcat-6.0.18/temp Using JRE_HOME: /Library/Java/Home May 22, 2009 6:48:35 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/ Extensions:/usr/lib/java May 22, 2009 6:48:35 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 22, 2009 6:48:35 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 452 ms May 22, 2009 6:48:35 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 22, 2009 6:48:35 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 May 22, 2009 6:48:35 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 May 22, 2009 6:48:35 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 May 22, 2009 6:48:35 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/19 config=null May 22, 2009 6:48:35 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 555 ms On May 21, 2009, at 11:37 PM, Caldarale, Charles R wrote: From: Ken Bowen [mailto:kbo...@als.com] Subject: SSI configuration May 21, 2009 9:31:58 PM org.apache.catalina.startup.HostConfig deployDirectory SEVERE: Error deploying web application directory docs java.lang.SecurityException: Servlet of class org.apache.catalina.ssi.SSIServlet is privileged and cannot be loaded by this web application Read the Tomcat SSI doc: http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html#Installation Note especially: Only Contexts which are marked as privileged may use SSI features (see the privileged property of the Context element). You must mark your webapp that wishes to use SSI as privileged in its Context element. Unless you want to mark all of your webapps as privileged, do not uncomment the SSI servlet in the global conf/ web.xml; instead, place the SSI servlet definition and mappings to the WEB-INF/web.xml of the webapps that need to use SSI. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by
mod_jk status code and loadbalancer monitoring
I found a really old entry from way back in 2005. Reading through a trail of messages under the heading Adding working dynamically with mod_jk status What I would very much appreciate is two things. I would like to know where I can get some clear documents on the status codes for mod_jk. The status codes appear in the mod_jk.log file in the following format. [Wed May 20 06:27:47 2009] [21343:33088] [debug] jk_handler::mod_jk.c (1969): Service finished with status=200 for worker=loadbalancer1 I have also seen other entries for status=302 etc. I would like to understand what these status code mean or represent. The second thing that I would like to see is, do you have any information on monitoring the workers in the mod_jk config. I know about the jkstatus function, but that is not very dynamic. It only really reports errors if the wroker is called. I had an issue where I took down on of the two workers in the loadbalancer config, I saw the error that the first worker was no longer available, but as soon as the second worker took over the work, then the error was cleared and nothing more was reported. I have had an idea, but seeing as I am not a programmer, I have no idea how to achieve this, but I hope that someone else has also had the same bright spark. I was hoping that there was some application that did something similar to what webalizer does with the access.log file for the apache web server that could analyze the mod_jk.log file and dynamically report the status of the workers as things happen. Something like a dashboard to show what state the workers are in at any given time. When the log file is rolling in debug mode, there is very much information that could be used to report back on the worker status. I hope that someone might have some good ideas. Somehting that I have also thought about is possibly upgrading the mod_jk version that I am running at the mo. I have the following setup. Server version: Apache/2.0.52 Server built: Jun 29 2007 05:08:11 JK Version: 1.2.15 I get really confused with the different versions and compatibility, so could I keep the current Apache version and only upgrade mod_jk, Where would I find instauction on how to go about doing this. Thanks in advnce Lawrence Lamprecht
Re: AJP connections just stop working
Rainer Jung-3 wrote: I would say you should: - set connectionTimeout on the AJP connector of JBOSS - ensure you are using a recent version of the IIS plugin (1.2.28) - read the timeouts documentation page of the plugin and set appropriate timeouts. - monitor the use of the ajp threads in order to find out, whether the problem occurs slowly step by step until at the end all threads are bound, or it occurs spontaneously The thread use monitoring would also give you an idea, what a good number of ajp pool threads in your situation would be. Do you have a firewall between IIS and JBOSS? Regards, Rainer Rainer, Thanks for your prompt response! There is no firewall between IIS and JBoss. I will experiment with the connection timeouts, I am thinking I will start with a fairly large number like 10 minutes. One other thing I forgot to mention: When I observed the problem earlier this week, I telnet'd to the AJP port and was able to connect successfully. This was making me think it was not a problem that all the connections were used up. However, I didn't really do anything in the telnet session, because (unlike HTTP) I don't know how to make a simple GET request through telnet, so it's possible it wouldn't have responded. One more question: With my HTTP port, I know I can always easily test it, via my browser or scripted using wget. Anybody know of a simple command-line utility like wget, that works with AJP? I think this would be a good tool to have, to help diagnose AJP problems (and would allow me to easily set up some automated stress tests). Thanks. Ken -- View this message in context: http://www.nabble.com/AJP-connections-just-stop-working-tp1118618p23669241.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache 2.2 to Tomcat 6 via proxy_ajp
On May 21, 2009, at 10:28 PM, J. Zimmerman wrote: I am just getting started with Tomcat and have been asked to take on the administration of our Tomcat servers at our college. I am not one of the developers, just the administrator. So far everything has gone pretty smoothly except for getting everything to run proxied via Apache (at least the way we would like it). Our requirement is for Tomcat to deliver the application through http://hostname:8080/appname and/or ajp://hostname:8009/appname. This happens by default and works well. However, we want end users to access the applications via port 443 or 80 and we are doing this via Apache. I can make this work via proxy_ajp and proxy_http so that something like http://hostname/appname works just fine. The wrench in the works is that we want to do virtual hosting through Apache and not have the appname appended to it. The Apache virtual hosted URL's will be the ones exposed to the public. For example if we developed an application called mycoolapp and we were deploying it at a website of the same name we would want the application to run at http://mycoolapp.com and not http://mycoolapp.com/mycoolapp. I have hacked together several different configs suggested through many different pieces of documentation and forums, but just can't seem to get it. Our setup is as follows. Server: Ubuntu 8.04 (all updates) Java: Latest JDK download from Sun Tomcat: Latest version 6 official download (configs are near defaults, I have revereted to the default server.xml) Apache: Latest version 2.2 via Ubuntu repositories. proxy_ajp, proxy_http, and rewrite enabled. If anyone has suggestions or a working example any help is greatly appreciated. ProxyPass / http://hostname:8080/mycoolapp -or- ProxyPass / ajp://hostname:8080/mycoolapp Assuming hostname:8080 is the Tomcat server No need for rewrite at all. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Upload stop after 30 minutes: Processing of multipart/form-data requestfailed. Stream ended unexpectedly
Thanks a lot for your reply! I've tried your suggestions this are the results. What happens if you go directly into port 8080, bypassing httpd? I've tried but I get the same exception Just for grins, what happens if you change that to 60? Or 10? I've tried but nothing has changed... Is there anything in between httpd and Tomcat (e.g., firewall) that might be dropping the connection? No (and now that I've tested directly on tomcat I presume that it's either a Tomcat or a Commons FileUpload configuration problem) Looking after the problem I also found a suggestion to explicity set disableUploadTimeout to false (see http://www.tek-tips.com/viewthread.cfm?qid=627123): I've also tried this one but without success... Any other suggestion? Thanks a lot again for your help Patrick From: Patrick Herber [mailto:patrick.her...@ticino.com] Subject: Upload stop after 30 minutes: Processing of multipart/form- data requestfailed. Stream ended unexpectedly I'm experiencing problems uploading big files on it: after around 30 minutes (nearly exactly 30 minutes!) the upload stops. What happens if you go directly into port 8080, bypassing httpd? I realize it shouldn't have anything to do with the session timeout (and your AJAX requests should be resetting the timer), but that's the only thing I can think of in Tomcat that has a default value of 30 minutes. Just for grins, what happens if you change that to 60? Or 10? Is there anything in between httpd and Tomcat (e.g., firewall) that might be dropping the connection? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NIO Connector: Too many open files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 5/21/2009 12:21 PM, Rainer Jung wrote: 2 remarks about all your stress testing efforts: A) TIME_WAIT When not doing HTTP Keep-Alive, under high load the size of the TCP hash table and the effectiveness of the system to lookp up TCP connections can limit the throughput you can reach. More precisely, depending on the excat way of connection shutdown, you get TIME_WAIT states for the finished connections (without HTTP Keep Alive it could be one such connection per request). Most systems get slow, once the number of those connections reaches somthing arounf 3. That's fine, but the TIME_WAIT connections should be counted against the process's file limit, should it? At that point, the process has released the connection and the OS is babysitting it through the final stages of TCP shutdown. I understand that, with keepalive disabled, performance will kind of suck. But, I shouldn't be running out of file descriptors. E.g. if you are doing 2000 requests per second without HTTP Keep Alive and the combination of web server and stress test tool leads to TIME_WAITs, after 15 seconds your table size might reach a critical size. Meaning that the kernel can't keep up, or the NIO connector can't keep up? I suspect the latter, because the other tests under the same conditions at least complete... the NIO one appears not to have a chance. Now, I'm running 6 tests and the NIO test is the 5th one, so it's possible that it's just poorly positioned in my test batter. But, since I've observed this failure at essentially the same place each time, I suspect the NIO connector itself is at fault. Not using HTTP Keep Alive will very likely limit quickly the achievable throughput when going up in concurrency. I'm willing to accept that, but 40 max connections should not be resulting in hundreds of left-open file descriptors. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoWlzUACgkQ9CaO5/Lv0PDtKgCfc9ZOaqcHfvdJHD28wZIiwMAq 52EAn3N1Nk3JoqSOcDkjdlsmJ49t+Yfr =FQdw -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NIO Connector: Too many open files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 5/21/2009 12:13 PM, Rainer Jung wrote: On 21.05.2009 17:55, Christopher Schultz wrote: All, I've been testing the performance of various Tomcat configurations against Apache httpd and my serious tests are not completing for the NIO connector because the server is running out of files: May 20, 2009 2:35:55 AM org.apache.tomcat.util.net.NioEndpoint$Acceptor run SEVERE: Socket accept failed java.io.IOException: Too many open files at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:145) at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:1198) at java.lang.Thread.run(Thread.java:619) A bit of background for those who haven't followed the Apache httpd vs Tomcat static content performance thread: I'm running Tomcat 6.0.18 using tcnative 1.1.16. Apache httpd is not being used for this test, so the client is contacting Tomcat directly from localhost. $ uname -a Linux chadis 2.6.14-gentoo-r5 #2 PREEMPT Sat Dec 17 16:30:55 EST 2005 i686 AMD Athlon(tm) XP 1700+ AuthenticAMD GNU/Linux $ java -version java version 1.6.0_13 Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing) $ ulimit -n (fds per process limit) 1024 1GiB RAM on the machine, here are the heap details /after/ the tests are run: $ jmap -heap 1430 Attaching to process ID 1430, please wait... Debugger attached successfully. Client compiler detected. JVM version is 11.3-b02 using thread-local object allocation. Mark Sweep Compact GC Heap Configuration: MinHeapFreeRatio = 40 MaxHeapFreeRatio = 70 MaxHeapSize = 67108864 (64.0MB) NewSize = 1048576 (1.0MB) MaxNewSize = 4294901760 (4095.9375MB) OldSize = 4194304 (4.0MB) NewRatio = 12 SurvivorRatio= 8 PermSize = 12582912 (12.0MB) MaxPermSize = 67108864 (64.0MB) Heap Usage: New Generation (Eden + 1 Survivor Space): capacity = 2228224 (2.125MB) used = 612888 (0.5844955444335938MB) free = 1615336 (1.5405044555664062MB) 27.505672679227942% used Eden Space: capacity = 2031616 (1.9375MB) used = 612888 (0.5844955444335938MB) free = 1418728 (1.3530044555664062MB) 30.167511970766128% used - From Space: capacity = 196608 (0.1875MB) used = 0 (0.0MB) free = 196608 (0.1875MB) 0.0% used To Space: capacity = 196608 (0.1875MB) used = 0 (0.0MB) free = 196608 (0.1875MB) 0.0% used tenured generation: capacity = 28311552 (27.0MB) used = 20464784 (19.516738891601562MB) free = 7846768 (7.4832611083984375MB) 72.28421811704283% used Perm Generation: capacity = 12582912 (12.0MB) used = 8834304 (8.425048828125MB) free = 3748608 (3.574951171875MB) 70.208740234375% used Here are my Connector configurations: !-- Regular non-APR Coyote Connector -- Connector port=8001 protocol=org.apache.coyote.http11.Http11Protocol connectionTimeout=2 server=Coyote1.1non-APR / !-- APR Connector -- Connector port=8002 protocol=org.apache.coyote.http11.Http11AprProtocol useSendfile=true connectionTimeout=2 server=Coyote1.1APR / !-- APR without sendfile -- Connector port=8003 protocol=org.apache.coyote.http11.Http11AprProtocol useSendfile=false connectionTimeout=2 server=Coyote1.1APRw/osendfile / !-- NIO Connector -- Connector port=8004 protocol=org.apache.coyote.http11.Http11NioProtocol useSendfile=true connectionTimeout=2 server=Coyote1.1NIO / !-- APR without sendfile -- Connector port=8005 protocol=org.apache.coyote.http11.Http11NioProtocol useSendfile=false connectionTimeout=2 server=Coyote1.1NIOw/osendfile / All connectors are configured at once, so I should have a maximum of 40 threads in each pool. The command I ran to benchmark each connector was (for example): /usr/sbin/ab -c 40 -t 480 -n 1000 http://localhost:8004/4kiB.bin This runs ApacheBench for 8 minutes with 40 client threads requesting a 4k file over and over again. This particular test succeeded, but there are 14 more tests, each using a file twice the size of the previous test. After the 128k file test, every single test fails after that. The last test I ran (with only 1 thread instead of 40), the NIO connector died in the same way, but the NIO connector without
Re: Performance: switch vs if ... else if
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, On 5/21/2009 1:57 PM, David kerber wrote: Interesting. From that description, depending on how sparse is sparse, there's probably a good chance I'm getting a tableswitch. If you find that a tableswitch is /not/ being generated, you could add dummy cases that don't do anything like this: switch(comeChar) { case 'a': /* do something */ break; case 'b': /* do something */ break; case 'c': /* do NOTHING */ break; case 'd': /* do NOTHING */ break; case 'e': /* do something */ break; } You'll complicate your code a bit, but you'll also likely squeeze more performance out of your code. Can you point me to a byte code interpreter so I could look at this? What you really want is a bytecode disassembler (if that's even the right term for this thing). I've used 'jad' in the past, but if you just need to disassemble (instead of decompiling back to Java source), Chuck's suggestion of using 'javap' is a good one: it's already included with the JDK and works just fine. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoWm/0ACgkQ9CaO5/Lv0PDo9QCfUWCJ4EfXgiorapcqxDKHReo0 G/MAnRIRBZXnclIbI+iT5gXsUeomB2IW =TnmT -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chetan, On 5/21/2009 2:08 PM, Chetan Chheda wrote: I am following this thread with great interest. I have a similar issue as Vishwajit and have resorted to adding the connectionTimeout to get rid of a large number of RUNNABLE threads. Why? Are you just offended by the number of threads, or do you have a legitimate resource problem? But mod_jk does not like tomcat threads timing out and logs the message increase the backend idle connection timeout or the connection_pool_minsize in the mod_jk logs which leads me to believe that its apache thats not letting go of the threads in my case. Again, you need to set the Connector's connectionTimeout /and/ your workers' connection_pool_timeout settings to the same time interval (note that they use different semantics... one is in seconds and the other is in ms, so read the documentation carefully). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoWnKAACgkQ9CaO5/Lv0PBcTwCbBhuJ8/nwYLq/LAxCSVDer35t jAIAn2oUL3on6ki/x9pZHn8n0tLuVS8H =y10X -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AJP connections just stop working
On 22.05.2009 14:09, kvancamp wrote: One more question: With my HTTP port, I know I can always easily test it, via my browser or scripted using wget. Anybody know of a simple command-line utility like wget, that works with AJP? I think this would be a good tool to have, to help diagnose AJP problems (and would allow me to easily set up some automated stress tests). Coud you please open an enhancement request in Bugzilla for this? There is some code floating around, which we might be able to bundle with the mod_jk source release. Not sure, how soon we would provide a windows binary, but at least we should offer what we already have lying around. It would definitely make sense to have an AJP commandline client to test connectivity. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NIO Connector: Too many open files
Hi Chris, On 22.05.2009 14:14, Christopher Schultz wrote: Rainer, On 5/21/2009 12:21 PM, Rainer Jung wrote: 2 remarks about all your stress testing efforts: A) TIME_WAIT When not doing HTTP Keep-Alive, under high load the size of the TCP hash table and the effectiveness of the system to lookp up TCP connections can limit the throughput you can reach. More precisely, depending on the excat way of connection shutdown, you get TIME_WAIT states for the finished connections (without HTTP Keep Alive it could be one such connection per request). Most systems get slow, once the number of those connections reaches somthing arounf 3. That's fine, but the TIME_WAIT connections should be counted against the process's file limit, should it? At that point, the process has released the connection and the OS is babysitting it through the final stages of TCP shutdown. Those connections will *not* be counted against process file descriptors. They only exist as an entry in a TCP connection table. They are no longer associated with the process. It's more of a TCP house cleaning thing. I understand that, with keepalive disabled, performance will kind of suck. But, I shouldn't be running out of file descriptors. Not our of FDs, but if the number of TIME_WAITs gets huge (check via netstat during the run), your TCP throughput will drop and will be restricted by the size of the connection hash. E.g. if you are doing 2000 requests per second without HTTP Keep Alive and the combination of web server and stress test tool leads to TIME_WAITs, after 15 seconds your table size might reach a critical size. Meaning that the kernel can't keep up, or the NIO connector can't keep up? I suspect the latter, because the other tests under the same conditions at least complete... the NIO one appears not to have a chance. Now, I'm running 6 tests and the NIO test is the 5th one, so it's possible that it's just poorly positioned in my test batter. But, since I've observed this failure at essentially the same place each time, I suspect the NIO connector itself is at fault. I'm talking about a very general TCP thing. I'm not saying you actually ran into it, but I'm saying that it makes sense to check the number of TIME_WAITs via netstat during the test. If it gets very big, than the TCP implementation will limit your throughput and most likely will become the first bottleneck you hit. Again: I'm not saying that already happened, but you should check, whether you run into this while doing the test. Not using HTTP Keep Alive will very likely limit quickly the achievable throughput when going up in concurrency. I'm willing to accept that, but 40 max connections should not be resulting in hundreds of left-open file descriptors. The file descriptos thing is totaly independent. I hijacked the thread :) Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem: JSP works in Firefox but not in Internet Explorer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan, On 5/21/2009 4:51 PM, Jan Peters-Anders wrote: The taglib uses document.body.appendChild which causes IE 7 to crash Shocking. :( Microsoft states as workaround to upgrade to IE 8, that is ironya very good solution/irony They also suggest: To work around this problem, write script blocks that modify only closed containers or that modify only the script's immediate container element. To do this, you can use a placeholder to close the target container, or you can move the script block into the container that you want to modify. You could move your script code to a different place (and probably discontinue using the taglib). I suspect you could easily write this javascript as an external file that you call from wherever you need it. I have a document myself with this rough layout: html body div id=target /div script // call addChild on div#target /script /body /html This works. I think you have a few options, here, besides re-doing everything: 1. Create an empty div that takes up no space, and use that as the target for your addChild. 2. Move the script that you are using to another place in the file (though you might not be able to, given that you're using an onclick event or something... right?) 3. Try something like calling a previously-defined function (at the top- level, under body/script) that does your dirty work. It's unclear to me if the problem is the location of the javascript source that calls addChild or the fact that you are (directly or indirectly) calling addChild from an existing child element. Thanks again, I will have to find another way of doing things, I guess, since it is odd to let users encounter this problem and let them be annoyed about the website not working. You could always disable this particular function for certain MSIE users. It looks like this affects all versions of MSIE prior to MSIE 8. I love this note under the status: This behavior is by design. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoWoBoACgkQ9CaO5/Lv0PCn+wCfVZX0ddd0Yq9x/JOtUqyGXSVK 82IAoLVCtdgtJchEByrTjxa89gv4Kq17 =/24a -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NIO Connector: Too many open files
Hi Chris, On 22.05.2009 14:29, Christopher Schultz wrote: $ jmap -heap 1430 Attaching to process ID 1430, please wait... Debugger attached successfully. Client compiler detected. JVM version is 11.3-b02 using thread-local object allocation. Mark Sweep Compact GC Heap Configuration: MinHeapFreeRatio = 40 MaxHeapFreeRatio = 70 MaxHeapSize = 67108864 (64.0MB) NewSize = 1048576 (1.0MB) MaxNewSize = 4294901760 (4095.9375MB) OldSize = 4194304 (4.0MB) NewRatio = 12 SurvivorRatio= 8 PermSize = 12582912 (12.0MB) MaxPermSize = 67108864 (64.0MB) Heap Usage: New Generation (Eden + 1 Survivor Space): capacity = 2228224 (2.125MB) used = 612888 (0.5844955444335938MB) free = 1615336 (1.5405044555664062MB) 27.505672679227942% used Eden Space: capacity = 2031616 (1.9375MB) used = 612888 (0.5844955444335938MB) free = 1418728 (1.3530044555664062MB) 30.167511970766128% used - From Space: capacity = 196608 (0.1875MB) used = 0 (0.0MB) free = 196608 (0.1875MB) 0.0% used To Space: capacity = 196608 (0.1875MB) used = 0 (0.0MB) free = 196608 (0.1875MB) 0.0% used tenured generation: capacity = 28311552 (27.0MB) used = 20464784 (19.516738891601562MB) free = 7846768 (7.4832611083984375MB) 72.28421811704283% used Perm Generation: capacity = 12582912 (12.0MB) used = 8834304 (8.425048828125MB) free = 3748608 (3.574951171875MB) 70.208740234375% used Here are my Connector configurations: !-- Regular non-APR Coyote Connector -- Connector port=8001 protocol=org.apache.coyote.http11.Http11Protocol connectionTimeout=2 server=Coyote1.1non-APR / !-- APR Connector -- Connector port=8002 protocol=org.apache.coyote.http11.Http11AprProtocol useSendfile=true connectionTimeout=2 server=Coyote1.1APR / !-- APR without sendfile -- Connector port=8003 protocol=org.apache.coyote.http11.Http11AprProtocol useSendfile=false connectionTimeout=2 server=Coyote1.1APRw/osendfile / !-- NIO Connector -- Connector port=8004 protocol=org.apache.coyote.http11.Http11NioProtocol useSendfile=true connectionTimeout=2 server=Coyote1.1NIO / !-- APR without sendfile -- Connector port=8005 protocol=org.apache.coyote.http11.Http11NioProtocol useSendfile=false connectionTimeout=2 server=Coyote1.1NIOw/osendfile / All connectors are configured at once, so I should have a maximum of 40 threads in each pool. The command I ran to benchmark each connector was (for example): /usr/sbin/ab -c 40 -t 480 -n 1000 http://localhost:8004/4kiB.bin This runs ApacheBench for 8 minutes with 40 client threads requesting a 4k file over and over again. This particular test succeeded, but there are 14 more tests, each using a file twice the size of the previous test. After the 128k file test, every single test fails after that. The last test I ran (with only 1 thread instead of 40), the NIO connector died in the same way, but the NIO connector without sendfile enabled appeared to work properly. This time (40 threads), neither of the connectors worker properly, the NIO connector failing to complete any tests after the 128kb test and the NIO-sendfile connector failed to complete /all/ of the tests (automatically run immediately following the NIO tests). No OOMEs were encountered: only the exception shown above (no more files). On my previous tests, lsof reported that only one of my files was still open by the process. After this most recent test, it appears that 954 of my static files are still open by the process (and the test ended over 24 hours ago). The initial set of tests (c=1) seemed to recover, while this second set of tests (c=40) has not. My knee-jerk reaction is that the most number of files that should ever be open is 40: one per request processing thread. Something, somewhere is causing these file descriptors to stay open. Unfortunately, I don't have any GC information for the time period covering the test. I still have the JVM running, so I can probably inspect it for certain things if anyone has any questions. Unfortunately, I can't run any new JSP files (out of files!) and it looks like I can't connect using jconsole (probably because the JVM can't open a new socket). I'd love some suggestions at to what's going on, here. Maybe looking at the directory /proc/PID/fd (sorry PID) will give more info (at least of the FDs are still in
Re: NIO Connector: Too many open files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Filip, On 5/21/2009 12:34 PM, Filip Hanik - Dev Lists wrote: hi Christopher, generally, ulimit -n 1024 is too low for any kind of web server. Fair enough, but I'm not putting an unreasonable load on my server with ulimit -n 1024 and 40 concurrent connections, am I? And there was also a file descriptor leak in the NIO connector, fixed in http://svn.apache.org/viewvc?rev=734454view=rev this is when Tomcat NIO serves up static content. Yup, I'm only serving up static content (using sendfile in the first test that failed to complete, and NOT using sendfile in the second one which completed with c=1 but failed on c=40). Is tcnative trunk stable enough to just try using that? The commit comment says NIO fixes... nothing more specific? ;) Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoWofMACgkQ9CaO5/Lv0PBGnACgjDwmquIeUv1FfeCYKQHEx2HZ s9AAn2UYoLK2J3exkh1Q0h8Wt8A0rJSa =8tQI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk status code and loadbalancer monitoring
Hi Lawrence, I will answer in a slightly different order below. On 22.05.2009 13:58, Lawrence Lamprecht wrote: I found a really old entry from way back in 2005. Reading through a trail of messages under the heading Adding working dynamically with mod_jk status What I would very much appreciate is two things. I would like to know where I can get some clear documents on the status codes for mod_jk. The status codes appear in the mod_jk.log file in the following format. [Wed May 20 06:27:47 2009] [21343:33088] [debug] jk_handler::mod_jk.c (1969): Service finished with status=200 for worker=loadbalancer1 I have also seen other entries for status=302 etc. I would like to understand what these status code mean or represent. The second thing that I would like to see is, do you have any information on monitoring the workers in the mod_jk config. I know about the jkstatus function, but that is not very dynamic. It only really reports errors if the wroker is called. I had an issue where I took down on of the two workers in the loadbalancer config, I saw the error that the first worker was no longer available, but as soon as the second worker took over the work, then the error was cleared and nothing more was reported. I have had an idea, but seeing as I am not a programmer, I have no idea how to achieve this, but I hope that someone else has also had the same bright spark. I was hoping that there was some application that did something similar to what webalizer does with the access.log file for the apache web server that could analyze the mod_jk.log file and dynamically report the status of the workers as things happen. Something like a dashboard to show what state the workers are in at any given time. When the log file is rolling in debug mode, there is very much information that could be used to report back on the worker status. I hope that someone might have some good ideas. Somehting that I have also thought about is possibly upgrading the mod_jk version that I am running at the mo. I have the following setup. Server version: Apache/2.0.52 Server built: Jun 29 2007 05:08:11 JK Version: 1.2.15 I get really confused with the different versions and compatibility, so could I keep the current Apache version and only upgrade mod_jk, Where would I find instauction on how to go about doing this. Thanks in advnce Lawrence Lamprecht The status worker was added to mod_jk around the time of your version 1.2.15. It improved *a lot* since then. Actually during the last releases it was the focus of most of the development. So do yourself a favour and update mod_jk. Recent is 1.2.28. Compatibility: mod_jk works for Apache httpd 1.3, 2.0 and 2.2. You need to either compile it against your web server (preferred way) or fetch a binary for your httpd version somewhere, e.g. in our download area. You cannot use a mod_jk for 2.2 to run in 2.0 or vice versa, but the minor digits behind usually do not matter. Compiling is easy (depending a bit on your OS), so you best go that way. We deprecated some configuration attributes long ago, so after updateing have a look at the mod_jk log during startup, if it contains info about not supported or deprecated attributes. The docs contain info about how to replace those. There are only few such attributes. We didn't deprecate anything during the last 10 releases, but chances are, that you should change a few configuration attributes you used with 1.2.15. There is one caveat: JkMount not isn't inherited from the global server to any virtual host or between virtual hosts. If you have virtual hosts, put your JkMount into those or use JkMountCopy. See docs. Now about status codes: The code in the log line you cited is the HTTP status code we return to the client. Those are defined by the HTTP rfc, so 200=OK, 302 is a redirect, 500 is an internal server error etc. In most cases those are simply the ones we get from Tomcat, only if mod_jk detects an error itself it might generate an own status code like 500, 502, 503. Note that the log line is of debug level, so you are not expected to look at those during normal production. JkLogLevel info is enough for production. Any error will be logged at log level error, as long as no message of level error shows up, everything is fine. The info level messages are there to give additional info in case an error level message shows up. Dynamics of status worker: It is as dynamic as it can be. mod_jk doesn't do any probing. If there is an error with a worker we will only detect when there is a request for the worker. In that case, the status worker will immediately reflect the new status. In the latest two versions we started to implement a so-called watchdog thread, that does some very basic probing, namely a cping/cpong connection check for the pooled connections. The watchdog thread might get more powerful in the future. Concerning your observation with taking down one worker in
Re: Apache 2.2 to Tomcat 6 via proxy_ajp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 5/21/2009 11:43 PM, Caldarale, Charles R wrote: From: J. Zimmerman [mailto:john.z...@gmail.com] Subject: Apache 2.2 to Tomcat 6 via proxy_ajp The wrench in the works is that we want to do virtual hosting through Apache and not have the appname appended to it. The Apache virtual hosted URL's will be the ones exposed to the public. Do you really need httpd in the game? Is it providing any useful service (e.g., PHP)? If not, remove it and simplify your life. +1 If you must have httpd in the picture, mod_rewrite might help if the Tomcat virtual hosting is insufficient (but perhaps you've already tried that). I'm not sure mod_rewrite is necessary. Instead, you can do something like this: VirtualHost *:80 ServerName mycoolapp.com ProxyPass / ajp://host:8009/mycoolapp /VirtualHost You could also get away with: VirtualHost *:80 ServerName mycoolapp.com ProxyPass / ajp://host:8009/ /VirtualHost ...if you deploy mycoolapp as the ROOT context. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoWp10ACgkQ9CaO5/Lv0PARvQCfVLmzTfeXl7W3xqEc8LOsMXu7 6voAoJizHcvoTPBCgJB9JSqmTeJFSPv2 =2zTC -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SSI configuration
If I tried in this way I am getting the same exception saying that java.lang.SecurityException: Servlet of class org.apache.catalina.ssi.SSIServlet is privileged and cannot be loaded by this web application. I inserted this contect in seperate file..ie., under my web app. I created an .xml file adn inserted Context docBase=MyWebApp path=/MyWebApp reloadable=true crossContext=true privilieged=true /Context Still not working. Can anyone give idea regarding this? On Fri, May 22, 2009 at 6:54 AM, Ken Bowen kbo...@als.com wrote: Ah silly of me; I did read it, but completely spaced over: Only Contexts which are marked as privileged may use SSI features (see the privileged property of the Context element). But it doesn't seem to mention what you say about the global vs local contexts: You must mark your webapp that wishes to use SSI as privileged in its Context element. Unless you want to mark all of your webapps as privileged, do not uncomment the SSI servlet in the global conf/web.xml; instead, place the SSI servlet definition and mappings to the WEB-INF/web.xml of the webapps that need to use SSI. I think that ought to be inserted verbatim at the end of Installation. However, I still seem to be missing the joke, because things aren't working. So first here's my setup: java version 1.5.0_16; tomcat 6.0.18 (from apache) on Mac OS X 10.5.6 I created a very simple stripped-down app as follows: META-INF/context.xml: Context debug=5 reloadable=true crossContext=true privileged=true /Context WEB-INF/web.xml: ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list servlet servlet-namessi/servlet-name servlet-class org.apache.catalina.ssi.SSIServlet /servlet-class init-param param-namebuffered/param-name param-value1/param-value /init-param init-param param-namedebug/param-name param-value0/param-value /init-param init-param param-nameexpires/param-name param-value666/param-value /init-param init-param param-nameisVirtualWebappRelative/param-name param-value0/param-value /init-param load-on-startup4/load-on-startup /servlet servlet-mapping servlet-namessi/servlet-name url-pattern*.shtml/url-pattern /servlet-mapping /web-app In index.html (taken from http://httpd.apache.org/docs/1.3/howto/ssi.html ): pToday is |!--#echo var=DATE_LOCAL --|p No errors in the logs (catalina.out); for completeness, I've attached that at the very end. But the output is: Today is || So I've missed something. Thanks, Ken catalina.out: $ ../bin/startup.sh ; tail -f catalina.out Using CATALINA_BASE: /opt/apache-tomcat-6.0.18 Using CATALINA_HOME: /opt/apache-tomcat-6.0.18 Using CATALINA_TMPDIR: /opt/apache-tomcat-6.0.18/temp Using JRE_HOME: /Library/Java/Home May 22, 2009 6:48:35 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java May 22, 2009 6:48:35 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 May 22, 2009 6:48:35 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 452 ms May 22, 2009 6:48:35 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 22, 2009 6:48:35 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 May 22, 2009 6:48:35 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 May 22, 2009 6:48:35 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 May 22, 2009 6:48:35 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/19 config=null May 22, 2009 6:48:35 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 555 ms On May 21, 2009, at 11:37 PM, Caldarale, Charles R wrote: From: Ken Bowen [mailto:kbo...@als.com] Subject: SSI configuration May 21, 2009 9:31:58 PM org.apache.catalina.startup.HostConfig deployDirectory SEVERE: Error deploying web application directory docs java.lang.SecurityException: Servlet of class org.apache.catalina.ssi.SSIServlet is privileged and cannot be loaded by this web application Read the Tomcat SSI doc: http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html#Installation Note especially: Only
Re: Configuring SSI in tomcat 6
If I tried in this way I am getting the same exception saying that java.lang.SecurityException: Servlet of class org.apache.catalina.ssi.SSIServlet is privileged and cannot be loaded by this web application. I inserted this context in seperate file..ie., under my web app. I created an .xml file adn inserted Context docBase=MyWebApp path=/MyWebApp reloadable=true crossContext=true privilieged=true /Context Still not working. Can anyone give idea regarding this? On Thu, May 21, 2009 at 11:33 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 java.lang.SecurityException: Servlet of class org.apache.catalina.ssi.SSIServlet is privileged and cannot be loaded by this web application Read the Tomcat SSI doc: http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html#Installation Note especially: Only Contexts which are marked as privileged may use SSI features (see the privileged property of the Context element). You must mark your webapp that wishes to use SSI as privileged in its Context element. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Raghuram Srinivas
Tomcat 6.0.18 useBean NoClassDefFoundError
Hello people My question is a nooby one but I don't use Java full time because I use tools that works however, I need it to work NOW. In a nutshell, my question is when Tomcat panics and gives this... ... ... javax.servlet.ServletException: java.lang.NoClassDefFoundError: user/UserData (wrong name: UserData) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:275) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause java.lang.NoClassDefFoundError: user/UserData (wrong name: UserData) java.lang.ClassLoader.findBootstrapClass(Native Method) java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:891) java.lang.ClassLoader.loadClass(ClassLoader.java:301) java.lang.ClassLoader.loadClass(ClassLoader.java:299) sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) java.lang.ClassLoader.loadClass(ClassLoader.java:251) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1302) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1178) org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1160) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343) org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393) org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2399) org.apache.jasper.compiler.Node$Root.accept(Node.java:489) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343) org.apache.jasper.compiler.Generator.generate(Generator.java:3365) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199) org.apache.jasper.compiler.Compiler.compile(Compiler.java:315) org.apache.jasper.compiler.Compiler.compile(Compiler.java:295) org.apache.jasper.compiler.Compiler.compile(Compiler.java:282) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) ... ... what is it moaning about? As you can see this test is based on a tutorial (which is here: http://www.jsptut.com/Forms.jsp). My project's directory layout roughly looks like this. %catalina_home%\webapps\test\test5.jsp %catalina_home%\webapps\test\WEB-INF\classes\user\UserData.class the source code for UserData states it's package: package user; class UserData implements java.io.Serializable { private String username; private String email; private int age; public void setUsername(String value) { username = value; } ... } The jsp for test5.jsp looks like this: jsp:useBean id=user class=user.UserData scope=session/ jsp:setProperty name=user property=*/ html body %=user.getUsername()%br %=user.getEmail()%br %=user.getAge()%br form method=post action=test5.jsp Name: input type=text value=/br Email: input type=text value=/br Age: input type=text value=/br /form /body /html I think i've isolated the problem to line 1 of the JSP script and know its a classpath issue. Why is Tomcat not picking up the user.UserData from WEB-INF\classes, is it because of the lack of web.xml content? How can get this simple code example to work? Again I know these questions are nooby but I've been stuck on this bean stuff since yesterday and am rapidly loosing my patience short of calling Tomcat 6 a failure. So, any help is very greately appreciated. Thanks in advance, Roderick - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NoClassDefFoundError only on particular platform
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael, On 5/21/2009 1:02 PM, Michael A. Repucci wrote: I'm pretty new to Tomcat, and very unfamiliar with JSP or web applications in general. I've been trying to set up an application on my system (Ubuntu 9.04) that works just fine on my colleagues' systems (Windows XP). I've got Tomcat 5.5 working just fine (Sun JVM 1.5.0, Apache 2.2), and the manager and demo applications all work. But loading our application is giving me the following errors. Starting filter 'UTF8Filter' Exception starting filter UTF8Filter java.lang.NoClassDefFoundError: javax/servlet/Filter My first guess is that you've got multiple copies of servlet-api.jar in your class path. Make sure you don't have anything that looks like yourwebapp/WEB-INF/lib/servlet-api*.jar in there. You should only have a single copy of servletapi.*.jar anywhere related to Tomcat, and it should be in $CATALINA_HOME/common/lib/servlet-api.jar. I also get errors in the file catalina.2009-05-18.log (see below). SEVERE: Error registering Catalina:type=Valve,name=StandardContextValve,path=/neuroanalysis,host=localhost javax.management.MBeanException: Cannot instantiate ModelMBean of class org.apache.commons.modeler.BaseModelMBean [snip] Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/neuroanalysis/WEB-INF/classes/logging.properties read) It looks like you're running Tomcat under a security manager which basically means that you need to explicitly allow your webapp to read certain resources. It's odd that your webapp can't read a file out of its own classes directory, though. All of these errors were the same as shown above. Then, there's this: May 18, 2009 3:03:25 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load logging.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. If you ignore the confusing statement about the following stack trace when the stack trace has already been emitted, you can see that Tomcat is having trouble loading your logging.properties file. The simplest thing you can do is check to see what the file permissions are on that file. I suspect they are in order. The next thing you should do is read all about Security Manager use in Tomcat: http://tomcat.apache.org/tomcat-5.5-doc/security-manager-howto.html You're most interested in the file permissions stuff. You may have to play with this a bit to figure out how to get it to work. I'm still confused as to why it would be failing in the first place... - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoWqbcACgkQ9CaO5/Lv0PDQpQCgngmTiWQlTY9uYrkZO3BJYjBs ctYAniXHvGR4srXQ1foLuH/kp0D2kBmR =vDua -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NoClassDefFoundError only on particular platform
no, this doesn't help me. On Fri, May 22, 2009 at 2:33 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael, On 5/21/2009 1:02 PM, Michael A. Repucci wrote: I'm pretty new to Tomcat, and very unfamiliar with JSP or web applications in general. I've been trying to set up an application on my system (Ubuntu 9.04) that works just fine on my colleagues' systems (Windows XP). I've got Tomcat 5.5 working just fine (Sun JVM 1.5.0, Apache 2.2), and the manager and demo applications all work. But loading our application is giving me the following errors. Starting filter 'UTF8Filter' Exception starting filter UTF8Filter java.lang.NoClassDefFoundError: javax/servlet/Filter My first guess is that you've got multiple copies of servlet-api.jar in your class path. Make sure you don't have anything that looks like yourwebapp/WEB-INF/lib/servlet-api*.jar in there. You should only have a single copy of servletapi.*.jar anywhere related to Tomcat, and it should be in $CATALINA_HOME/common/lib/servlet-api.jar. I also get errors in the file catalina.2009-05-18.log (see below). SEVERE: Error registering Catalina:type=Valve,name=StandardContextValve,path=/neuroanalysis,host=localhost javax.management.MBeanException: Cannot instantiate ModelMBean of class org.apache.commons.modeler.BaseModelMBean [snip] Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat5.5/webapps/neuroanalysis/WEB-INF/classes/logging.properties read) It looks like you're running Tomcat under a security manager which basically means that you need to explicitly allow your webapp to read certain resources. It's odd that your webapp can't read a file out of its own classes directory, though. All of these errors were the same as shown above. Then, there's this: May 18, 2009 3:03:25 PM org.apache.catalina.loader.WebappClassLoader findResourceInternal INFO: Illegal access: this web application instance has been stopped already. Could not load logging.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. If you ignore the confusing statement about the following stack trace when the stack trace has already been emitted, you can see that Tomcat is having trouble loading your logging.properties file. The simplest thing you can do is check to see what the file permissions are on that file. I suspect they are in order. The next thing you should do is read all about Security Manager use in Tomcat: http://tomcat.apache.org/tomcat-5.5-doc/security-manager-howto.html You're most interested in the file permissions stuff. You may have to play with this a bit to figure out how to get it to work. I'm still confused as to why it would be failing in the first place... - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoWqbcACgkQ9CaO5/Lv0PDQpQCgngmTiWQlTY9uYrkZO3BJYjBs ctYAniXHvGR4srXQ1foLuH/kp0D2kBmR =vDua -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring SSI in tomcat 6
From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 I inserted this context in seperate file..ie., under my web app. Where exactly under your webapp? Be precise when reporting problems. Context docBase=MyWebApp path=/MyWebApp reloadable=true crossContext=true privilieged=true /Context Take out the docBase and path attributes - they're not allowed. Note that if you have enabled the SSI servlet or filter in conf/web.xml, you must set privileged=true in *every* webapp you have deployed, including the ones that ship with Tomcat. Better to declare the SSI servlet or filter (and the associated mapping) in the individual webapp's WEB-INF/web.xml file and set privileged=true in just that webapp. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NIO Connector: Too many open files
Rainer, On 5/22/2009 8:55 AM, Rainer Jung wrote: You could run a JSP including a call to System.gc(); Right. The JVM is out of file descriptors. I cannot deploy a new JSP onto the server without restarting it. ;) I mentioned this in my initial post. First of all this really looks bad and interesting. So we would benefit from understanding what's going on. Filip indicates that there is a resource leak fixed in the NIO connector. I'll have to build that and upgrade my TC installation to see if it fixes this problem. Are there chances you can try again and see, whether those additional FDs for the static content go way if ou trigger a major GC, either via such a JSP, or via the JConsole or any other way you like? I've tried everything I can think of. jconsole couldn't connect (still out of file descriptors!) which I also already mentioned. I gave up a few minutes ago and stopped the server in preparation for upgrading the connectors themselves. I'll reply once I have some more information. Thanks, -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring SSI in tomcat 6
my web application is under webapp folder ie.C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps Under webapps folder I got 4 different applications but I want to enable SSI servlet only for one applicaiton. for eg: under webapps:the application name: C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\pvs pvs is the web application name which i need to enable ssi servlet. Can you help me how can i do this. Thanks Raghu On Fri, May 22, 2009 at 9:42 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 I inserted this context in seperate file..ie., under my web app. Where exactly under your webapp? Be precise when reporting problems. Context docBase=MyWebApp path=/MyWebApp reloadable=true crossContext=true privilieged=true /Context Take out the docBase and path attributes - they're not allowed. Note that if you have enabled the SSI servlet or filter in conf/web.xml, you must set privileged=true in *every* webapp you have deployed, including the ones that ship with Tomcat. Better to declare the SSI servlet or filter (and the associated mapping) in the individual webapp's WEB-INF/web.xml file and set privileged=true in just that webapp. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Raghuram Srinivas
RE: SSI configuration
From: Ken Bowen [mailto:kbo...@als.com] Subject: Re: SSI configuration welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list The above is unnecessary on Tomcat, since index.jsp is declared as a welcome file in the global conf/web.xml. However, you may well want to specify index.shtml as an additional welcome file. servlet-mapping servlet-namessi/servlet-name url-pattern*.shtml/url-pattern /servlet-mapping Note the mapping; the SSI servlet is called *only* for references to resources that end in .shtml. In index.html That needs to be index.shtml, otherwise the SSI servlet doesn't get involved. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity
Chris, As with Vishwajit, my tomcat ends up with all threads busy and not serving any new requests. After setting the connectionTimeout the threads are being recycled but apache is not liking .. as per the messsage in mod_jk.log Chetan From: Christopher Schultz ch...@christopherschultz.net To: Tomcat Users List users@tomcat.apache.org Sent: Friday, May 22, 2009 8:37:52 AM Subject: Re: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chetan, On 5/21/2009 2:08 PM, Chetan Chheda wrote: I am following this thread with great interest. I have a similar issue as Vishwajit and have resorted to adding the connectionTimeout to get rid of a large number of RUNNABLE threads. Why? Are you just offended by the number of threads, or do you have a legitimate resource problem? But mod_jk does not like tomcat threads timing out and logs the message increase the backend idle connection timeout or the connection_pool_minsize in the mod_jk logs which leads me to believe that its apache thats not letting go of the threads in my case. Again, you need to set the Connector's connectionTimeout /and/ your workers' connection_pool_timeout settings to the same time interval (note that they use different semantics... one is in seconds and the other is in ms, so read the documentation carefully). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoWnKAACgkQ9CaO5/Lv0PBcTwCbBhuJ8/nwYLq/LAxCSVDer35t jAIAn2oUL3on6ki/x9pZHn8n0tLuVS8H =y10X -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.18 useBean NoClassDefFoundError
From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Tomcat 6.0.18 useBean NoClassDefFoundError I don't use Java full time because I use tools that works Interesting that you expect to get help from people when your first sentence is designed to annoy them. java.lang.NoClassDefFoundError: user/UserData (wrong name: UserData) You compiled your class without a package statement. ... what is it moaning about? The error message isn't moaning, you are. It's simply letting you know you made a mistake. the source code for UserData states it's package: It does now, but not when you compiled it. I think i've isolated the problem to line 1 of the JSP script and know its [sic] a classpath issue. No, it's not a classpath issue. The UserData.class file in WEB-INF/classes/user was not created with a package statement. Why is Tomcat not picking up the user.UserData from WEB-INF\classes See above. How can get this simple code example to work? Follow the instructions. am rapidly loosing my patience short of calling Tomcat 6 a failure. Clearly, Tomcat 6 is a world-wide success. What's your track record? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NIO Connector: Too many open files
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Filip, On 5/21/2009 12:34 PM, Filip Hanik - Dev Lists wrote: hi Christopher, generally, ulimit -n 1024 is too low for any kind of web server. Fair enough, but I'm not putting an unreasonable load on my server with ulimit -n 1024 and 40 concurrent connections, am I? And there was also a file descriptor leak in the NIO connector, fixed in http://svn.apache.org/viewvc?rev=734454view=rev this is when Tomcat NIO serves up static content. Yup, I'm only serving up static content (using sendfile in the first test that failed to complete, and NOT using sendfile in the second one which completed with c=1 but failed on c=40). Is tcnative trunk stable enough to just try using that? The commit comment says NIO fixes... nothing more specific? ;) if you look at the commit, there are changelog changes in there. one of them being a FD leak with static content. It simply never called close on the FD when it was done Filip Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoWofMACgkQ9CaO5/Lv0PBGnACgjDwmquIeUv1FfeCYKQHEx2HZ s9AAn2UYoLK2J3exkh1Q0h8Wt8A0rJSa =8tQI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity
From: Chetan Chheda [mailto:chetan_chh...@yahoo.com] Subject: Re: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity As with Vishwajit, my tomcat ends up with all threads busy and not serving any new requests. After setting the connectionTimeout the threads are being recycled but apache is not liking .. as per the messsage in mod_jk.log Again, the most likely cause is something between httpd and Tomcat that is silently dropping the connections; a badly behaving firewall is a possible culprit. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring SSI in tomcat 6
From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 my web application is under webapp folder ie.C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps Under webapps folder I got 4 different applications but I want to enable SSI servlet only for one applicaiton. for eg: under webapps:the application name: C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\pvs In all the above verbiage, you still didn't answer the one question that was asked: where did you put the Context element for your webapp? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NIO Connector: Too many open files
On 22.05.2009 15:46, Christopher Schultz wrote: Rainer, On 5/22/2009 8:55 AM, Rainer Jung wrote: You could run a JSP including a call to System.gc(); Right. The JVM is out of file descriptors. I cannot deploy a new JSP onto the server without restarting it. ;) I mentioned this in my initial post. Yes, of course. In that case you are pretty much restricted to the outside tools you already used. So it would make sense to deploy and precompile/call the new JSP once before starting the next run, so you at least have a chance of calling it. Of course the connection the hte http connector needed for the request also needs an FD, but I had the impression from your last post, that a few of those FDs are being closed after some time. Maybe enough for calling the JSP. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring SSI in tomcat 6
Sorry for that.I placed the file in this location: C:\Program Files\Apache Software Foundation\Tomcat 6.0\ webapps\pvs\META-INF\context.xml I created a new context.xml and in that i pasted this Context docBase=PVS path=/PVS reloadable=true crossContext=true privilieged=true /Context Thanks Raghu On Fri, May 22, 2009 at 10:21 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 my web application is under webapp folder ie.C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps Under webapps folder I got 4 different applications but I want to enable SSI servlet only for one applicaiton. for eg: under webapps:the application name: C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\pvs In all the above verbiage, you still didn't answer the one question that was asked: where did you put the Context element for your webapp? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Raghuram Srinivas
Re: NIO Connector: Too many open files
Filip, On 5/22/2009 10:14 AM, Filip Hanik - Dev Lists wrote: if you look at the commit, there are changelog changes in there. one of them being a FD leak with static content. Gotcha. I was just looking at the commit comment itself. It simply never called close on the FD when it was done Oops. Does this affect the connector regardless of the setting for sendFile? Also, I asked if using the trunk tcnative was the solution... of course it's not: the bug was in the Java code. Should I get the tomcat-native package and compile /that/ Java code, or should I get Tomcat 6.0.x trunk and compile /that/? I think I'd prefer to change as little as possible to resume my tests, so if the connector itself is completely contained within the tomcat-native package, and there won't be any incompatibilities with 6.0.18, I'd prefer to do that. In that case, do I just replace lib/tomcat-coyote.jar after I build? Thanks, -chris - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.18 useBean NoClassDefFoundError
No clearly, this not helpful information and also I did not intend to start a flame war. The package statement is present (as I stated in the original message) - package user; class UserData { ... } If anybody can help at all it would be appreciated. Best regards Roderick On Fri, May 22, 2009 at 3:13 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Tomcat 6.0.18 useBean NoClassDefFoundError I don't use Java full time because I use tools that works Interesting that you expect to get help from people when your first sentence is designed to annoy them. java.lang.NoClassDefFoundError: user/UserData (wrong name: UserData) You compiled your class without a package statement. ... what is it moaning about? The error message isn't moaning, you are. It's simply letting you know you made a mistake. the source code for UserData states it's package: It does now, but not when you compiled it. I think i've isolated the problem to line 1 of the JSP script and know its [sic] a classpath issue. No, it's not a classpath issue. The UserData.class file in WEB-INF/classes/user was not created with a package statement. Why is Tomcat not picking up the user.UserData from WEB-INF\classes See above. How can get this simple code example to work? Follow the instructions. am rapidly loosing my patience short of calling Tomcat 6 a failure. Clearly, Tomcat 6 is a world-wide success. What's your track record? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.18 useBean NoClassDefFoundError
From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError No clearly, this not helpful information and also I did not intend to start a flame war. The package statement is present (as I stated in the original message) - Yes, we know the package statement is in the .java source now, but the .class file in your WEB-INF/classes/user directory is packageless; that's what the wrong name: UserData means. You need to recompile your source. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.18 useBean NoClassDefFoundError
The source has been recompiled, Tomcat restarted however, same issue reoccurs. On Fri, May 22, 2009 at 3:59 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError No clearly, this not helpful information and also I did not intend to start a flame war. The package statement is present (as I stated in the original message) - Yes, we know the package statement is in the .java source now, but the .class file in your WEB-INF/classes/user directory is packageless; that's what the wrong name: UserData means. You need to recompile your source. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring SSI in tomcat 6
From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 Sorry for that.I placed the file in this location: C:\Program Files\Apache Software Foundation\Tomcat 6.0\ webapps\pvs\META-INF\context.xml O.k., that's the right location. Make sure that there's no conf/Catalina/[host]/pvs.xml file in existence; if there is, that will override the context.xml file in your webapp's META-INF directory. I created a new context.xml and in that i pasted this Context docBase=PVS path=/PVS reloadable=true As stated before, take out the docBase and path attributes, they're not allowed. privilieged=true You misspelled privileged. Note that the URL used to reference your webapp must be pvs, not PVS, since it's located in webapps/pvs. This is case sensitive, even on Windows. If you want the URL to be PVS, upper-case the name of the directory. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.18 useBean NoClassDefFoundError
From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError The source has been recompiled, Tomcat restarted however, same issue reoccurs. Are you positive that the UserData.class file in WEB-INF/classes/user was replaced by the recompilation? Check the timestamp on it to make sure. Are you running Tomcat by itself, or under an IDE? IDEs sometimes have a mind of their own when deciding where things are located. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.18 useBean NoClassDefFoundError
I'm building everything from scratch/no IDEs save the VIM editor. Timestamp on the UserData.class is up-to-date (recompiled a few minutes ago). Tomcat is running on its own in Windows, it is not running as a service. On Fri, May 22, 2009 at 4:12 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError The source has been recompiled, Tomcat restarted however, same issue reoccurs. Are you positive that the UserData.class file in WEB-INF/classes/user was replaced by the recompilation? Check the timestamp on it to make sure. Are you running Tomcat by itself, or under an IDE? IDEs sometimes have a mind of their own when deciding where things are located. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Performance: switch vs if ... else if
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Performance: switch vs if ... else if If you find that a tableswitch is /not/ being generated, The tableswitch is being generated for the enum switch (rtFields), but not the char switch. However, using the enum generates a ton of other invokes that will far outweigh any advantage of the tableswitch. It's possible the JIT is optimizing much of that away, but it's hard to tell without seeing the generated native code (a tricky thing to dig out). It's also possible the JIT could reorder the char switch into an indexed jump table even when javac doesn't, but again we'd need to see the native code to be sure. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: Tomcat 6.0.18 useBean NoClassDefFoundError
Look closely. There has to be some discrepancy between what you perceive and what tomcat does. Is UserData.class present anywhere else visible to tomcat? Are you sure you are updating the webapp tomcat is running? Is there any way possible tomcat could be picking up an old copy of your class? Is there any way possible you might be updating one file and compiling another? --David Roderick Timmerman wrote: I'm building everything from scratch/no IDEs save the VIM editor. Timestamp on the UserData.class is up-to-date (recompiled a few minutes ago). Tomcat is running on its own in Windows, it is not running as a service. On Fri, May 22, 2009 at 4:12 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError The source has been recompiled, Tomcat restarted however, same issue reoccurs. Are you positive that the UserData.class file in WEB-INF/classes/user was replaced by the recompilation? Check the timestamp on it to make sure. Are you running Tomcat by itself, or under an IDE? IDEs sometimes have a mind of their own when deciding where things are located. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Performance: switch vs if ... else if
Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Performance: switch vs if ... else if If you find that a tableswitch is /not/ being generated, The tableswitch is being generated for the enum switch (rtFields), but not the char switch. However, using the enum generates a ton of other invokes that will far outweigh any advantage of the tableswitch. It's possible the JIT is optimizing much of that away, but it's hard to tell without seeing the generated native code (a tricky thing to dig out). It's also possible the JIT could reorder the char switch into an indexed jump table even when javac doesn't, but again we'd need to see the native code to be sure. And probably not worth the effort right now unless somebody is just curious or doing some deep research. I've already got an order-of-magnitude improvement in my implementation of this piece of code, and more than that on the servlet's overall performance. As a result, right now I don't have any way of generating enough load to find a bottleneck in the overall servlet (which is a very good thing!!). I've got several machines sitting around that I'd probably have to configure as a client farm if I'm going to generate significant loads on this app now. D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring SSI in tomcat 6
Thanks for your help Charles. I tries in this way but now when i started my server and opened the home page ie..,http://localhost:8080/-- the page is reloading from 30 min. I am not able to view the tomcat home page. In the log files too I am not getting any errors. Any idea.. Thanks Raghu On Fri, May 22, 2009 at 11:06 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 Sorry for that.I placed the file in this location: C:\Program Files\Apache Software Foundation\Tomcat 6.0\ webapps\pvs\META-INF\context.xml O.k., that's the right location. Make sure that there's no conf/Catalina/[host]/pvs.xml file in existence; if there is, that will override the context.xml file in your webapp's META-INF directory. I created a new context.xml and in that i pasted this Context docBase=PVS path=/PVS reloadable=true As stated before, take out the docBase and path attributes, they're not allowed. privilieged=true You misspelled privileged. Note that the URL used to reference your webapp must be pvs, not PVS, since it's located in webapps/pvs. This is case sensitive, even on Windows. If you want the URL to be PVS, upper-case the name of the directory. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Raghuram Srinivas
RE: Tomcat 6.0.18 useBean NoClassDefFoundError
From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError I'm building everything from scratch/no IDEs save the VIM editor. Timestamp on the UserData.class is up-to-date (recompiled a few minutes ago). Try using javap to see what's in the class file: javap -classpath %catalina_home%\webapps\test\WEB-INF\classes user.UserData Post the results. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.18 useBean NoClassDefFoundError
ran the given command: public class UserData extends java.lang.Object{ java.lang.String username; java.lang.String email; int age; public UserData(); public void setUsername(java.lang.String); public void setUserEmail(java.lang.String); public void setAge(int); public java.lang.String getUsername(); public java.lang.String getEmail(); public int getAge(); } On Fri, May 22, 2009 at 4:45 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError I'm building everything from scratch/no IDEs save the VIM editor. Timestamp on the UserData.class is up-to-date (recompiled a few minutes ago). Try using javap to see what's in the class file: javap -classpath %catalina_home%\webapps\test\WEB-INF\classes user.UserData Post the results. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring SSI in tomcat 6
From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 I am not able to view the tomcat home page. In all the editing that's been going on, you may have damaged conf/server.xml or conf/web.xml (the latter is more likely). Compare what's in the xml files with unedited versions. Worst case, install a clean Tomcat, verify that it's functional, then add your webapp to it. In the log files too I am not getting any errors. Stop Tomcat, empty the logs directory, and restart Tomcat. Does the log now show that Tomcat fully initialized? This message should appear in catalina.-mm-dd.log: May 22, 2009 8:40:10 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 3670 ms (With different times, of course. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Performance: switch vs if ... else if
From: David kerber [mailto:dcker...@verizon.net] As a result, right now I don't have any way of generating enough load to find a bottleneck in the overall servlet (which is a very good thing!!). That's a win. Congratulations! - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.18 useBean NoClassDefFoundError
From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError ran the given command: public class UserData extends java.lang.Object{ That's proof that the package statement isn't in there. Had it been, javap would show public class user.UserData extends... Looks like what you're editing is not what you're compiling. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring SSI in tomcat 6
Thanks for that...I modified the same thing but while inserting connection pooling in the context.xml...i am getting following error *Cannot establish a database connection. Cannot create JDBC driver of class '' for connect URL 'null'* wat exactly it mean.. On Fri, May 22, 2009 at 11:54 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 I am not able to view the tomcat home page. In all the editing that's been going on, you may have damaged conf/server.xml or conf/web.xml (the latter is more likely). Compare what's in the xml files with unedited versions. Worst case, install a clean Tomcat, verify that it's functional, then add your webapp to it. In the log files too I am not getting any errors. Stop Tomcat, empty the logs directory, and restart Tomcat. Does the log now show that Tomcat fully initialized? This message should appear in catalina.-mm-dd.log: May 22, 2009 8:40:10 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 3670 ms (With different times, of course. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Raghuram Srinivas
Re: Tomcat 6.0.18 useBean NoClassDefFoundError
I concur. Just need to find out how the class file is managing to exist after I've deleted it and shutdown tomcat, its lingering somewhere thus running javap user.UserData from anywhere still returns code. Thanks very much for the help. On Fri, May 22, 2009 at 4:57 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError ran the given command: public class UserData extends java.lang.Object{ That's proof that the package statement isn't in there. Had it been, javap would show public class user.UserData extends... Looks like what you're editing is not what you're compiling. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.18 useBean NoClassDefFoundError
From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError I concur. Just need to find out how the class file is managing to exist after I've deleted it and shutdown tomcat, its lingering somewhere thus running javap user.UserData from anywhere still returns code. Do you have a CLASSPATH environment variable set? If so, get rid of it - that will cause havoc with the classloaders. Run a Windows Search for UserData.class to see where other copies might be hiding. If you're running from a .war file (just in case - there's no evidence you are), Tomcat may be expanding it when it starts, overwriting changes you made to the expanded directory. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: AJP connections just stop working
Fyi, you should be able to use jmeter to test AJP connections -Tony --- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 abia...@formatdynamics.com http://www.formatdynamics.com -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Friday, May 22, 2009 6:42 AM To: Tomcat Users List Subject: Re: AJP connections just stop working On 22.05.2009 14:09, kvancamp wrote: One more question: With my HTTP port, I know I can always easily test it, via my browser or scripted using wget. Anybody know of a simple command-line utility like wget, that works with AJP? I think this would be a good tool to have, to help diagnose AJP problems (and would allow me to easily set up some automated stress tests). Coud you please open an enhancement request in Bugzilla for this? There is some code floating around, which we might be able to bundle with the mod_jk source release. Not sure, how soon we would provide a windows binary, but at least we should offer what we already have lying around. It would definitely make sense to have an AJP commandline client to test connectivity. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.18 useBean NoClassDefFoundError
clean all contents from container folder of CATALINA work folder check $CATALINA_HOME/work/Catalina Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 22 May 2009 17:12:03 +0100 Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError From: roderick.timmer...@gmail.com To: users@tomcat.apache.org I concur. Just need to find out how the class file is managing to exist after I've deleted it and shutdown tomcat, its lingering somewhere thus running javap user.UserData from anywhere still returns code. Thanks very much for the help. On Fri, May 22, 2009 at 4:57 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Roderick Timmerman [mailto:roderick.timmer...@gmail.com] Subject: Re: Tomcat 6.0.18 useBean NoClassDefFoundError ran the given command: public class UserData extends java.lang.Object{ That's proof that the package statement isn't in there. Had it been, javap would show public class user.UserData extends... Looks like what you're editing is not what you're compiling. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Insert movie times and more without leaving Hotmail®. http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009
RE: Configuring SSI in tomcat 6
From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 *Cannot establish a database connection. Cannot create JDBC driver of class '' for connect URL 'null'* This is a new problem, so please start a new thread, and post your entire Context element from your META-INF/context.xml file. Also state the Tomcat version, the JVM level, the platform you're running on (for people who have not been following this thread), and the type of database you're trying to connect to. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring SSI in tomcat 6
ok thanks I will do that. On Fri, May 22, 2009 at 1:21 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 *Cannot establish a database connection. Cannot create JDBC driver of class '' for connect URL 'null'* This is a new problem, so please start a new thread, and post your entire Context element from your META-INF/context.xml file. Also state the Tomcat version, the JVM level, the platform you're running on (for people who have not been following this thread), and the type of database you're trying to connect to. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Raghuram Srinivas
RE: AJP connections just stop working
I was about to say the same earlier, but when i verified with the version (2.3.2) I have installed last month AJP is not listed anymore... Rgds - Fred Anthony J. Biacco wrote: Fyi, you should be able to use jmeter to test AJP connections -Tony --- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 abia...@formatdynamics.com http://www.formatdynamics.com -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Friday, May 22, 2009 6:42 AM To: Tomcat Users List Subject: Re: AJP connections just stop working On 22.05.2009 14:09, kvancamp wrote: One more question: With my HTTP port, I know I can always easily test it, via my browser or scripted using wget. Anybody know of a simple command-line utility like wget, that works with AJP? I think this would be a good tool to have, to help diagnose AJP problems (and would allow me to easily set up some automated stress tests). Coud you please open an enhancement request in Bugzilla for this? There is some code floating around, which we might be able to bundle with the mod_jk source release. Not sure, how soon we would provide a windows binary, but at least we should offer what we already have lying around. It would definitely make sense to have an AJP commandline client to test connectivity. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/AJP-connections-just-stop-working-tp1118618p23674885.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Cannot establish a database connection. Cannot create JDBC driver of class '' for connect URL
Hi All I am getting the following error can any one help me regarding this.please... this is my context.xml--which is under my web application ie.., tomcat-- webapp --- *PVSmy web applicaiton* --- WEBINF META-INF *pvs.xml (contxt.xml)* *pvs.xml (contxt.xml)* Resource name=jdbc/pvs auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=my url.. username= password= maxActive=20 maxIdle=10 maxWait=-1/ web.xml: resource-ref descriptionPVS Oracle DataBase /description res-ref-namejdbc/pvs/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and I also got jojdbc drivers: ojdbc14.jar,ojdbc5.jar,ojdbc6.jar in lib folder. Tomcat version--tomcat 6.0, the JDK --jdk1.6.0_13 os-- windows server 2003 oracle database Can anyone help me whats worng in my configurations? Please -- Raghu
RE: Configuring SSI in tomcat 6
i make a backup of everything (with date extension appended) e.g. web.xml becomes web.xml.22052009 once you have a clean copy configure Datasource as applicationContext-jdbc.xml web.xml contents: context-param param-namecontextConfigLocation/param-name param-value/WEB-INF/applicationContext-jdbc.xml/param-value applicationContext-jdbc.xml contents: beans !-- Configurer that replaces ${...} placeholders with values from a properties file -- !-- (in this case, JDBC-related settings for the dataSource definition below) -- bean id=propertyConfigurer class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer property name=location value=/WEB-INF/jdbc.properties/ /bean !-- Simple local DataSource that works in any environment. This uses the JDBC DriverManager to obtain connections, and does NOT perform connection pooling. Connection pooling is essential to all real-world applications. This definition is good for getting started, as it introduces no dependencies beyond the JDK, but DriverManagerDataSource is not intended for production usage. reconfigure this to the DataSource you are using..for the meanwhile we'll use Spring-- bean id=dataSource class=org.springframework.jdbc.datasource.DriverManagerDataSource property name=driverClassName value=${jdbc.driverClassName}/ property name=url value=${jdbc.url}/ property name=username value=${jdbc.username}/ property name=password value=${jdbc.password}/ /bean hth Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 22 May 2009 11:59:38 -0400 Subject: Re: Configuring SSI in tomcat 6 From: raghuramsriniv...@gmail.com To: users@tomcat.apache.org Thanks for that...I modified the same thing but while inserting connection pooling in the context.xml...i am getting following error *Cannot establish a database connection. Cannot create JDBC driver of class '' for connect URL 'null'* wat exactly it mean.. On Fri, May 22, 2009 at 11:54 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: raghu ram srinivas [mailto:raghuramsriniv...@gmail.com] Subject: Re: Configuring SSI in tomcat 6 I am not able to view the tomcat home page. In all the editing that's been going on, you may have damaged conf/server.xml or conf/web.xml (the latter is more likely). Compare what's in the xml files with unedited versions. Worst case, install a clean Tomcat, verify that it's functional, then add your webapp to it. In the log files too I am not getting any errors. Stop Tomcat, empty the logs directory, and restart Tomcat. Does the log now show that Tomcat fully initialized? This message should appear in catalina.-mm-dd.log: May 22, 2009 8:40:10 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 3670 ms (With different times, of course. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Raghuram Srinivas _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009
Re: Help on tomcat configuration
Hi, On Fri, May 15, 2009 at 2:05 AM, JoshInWV josh.good...@gmail.com wrote: I am in the process of writing some web based software. Tomcat is my server I chose for the back end nuts and bolts because the software is written in Java / JSP. I have an OReilly book on tomcat, but it really lacks on realm configuration and when talking about j_security_check (but of course so does servlet spec 2.3) In a nutshell we designed a program to be installed on a stand alone PC or network. We finished it and turned it over. They came back to us and said, well due to our fear of piracy, we now want to put it on a web server and sell the service :-/. So now the scope of the project shifted by some, but what we have will run, just needs slightly modified. Most of what I need to have happen is at the server level. What do I need to do to have one instance of tomcat running and have multiple copies of the software running throughout the one server? I know this gets into a realms configuration issue, but I am not strong on that. I thought about doing sub-domains with a dedicated instance under each domain, however, I think that's terribly wasteful. Any help would be greatly appreciated. - Josh I have a few questions if you all can make some time for me to answer them, I would be most grateful! -- View this message in context: http://www.nabble.com/Help-on-tomcat-configuration-tp23548536p23548536.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- s.venkatesh kumar
Re: Cannot establish a database connection. Cannot create JDBC driver of class '' for connect URL
On Fri, May 22, 2009 at 10:34 AM, raghu ram srinivas raghuramsriniv...@gmail.com wrote: *PVSmy web applicaiton* --- WEBINF s/b WEB-INF META-INF *pvs.xml (contxt.xml)* *pvs.xml (contxt.xml)* No idea what you're trying to say there, but the file should be named context.xml and should contain a Context element with all this in it Resource name=jdbc/pvs auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver Shouldn't that be oracle.jdbc.driver.OracleDriver ?? and I also got jojdbc drivers: ojdbc14.jar,ojdbc5.jar,ojdbc6.jar in lib folder. And having multiple versions of the same class in your app is most certainly not a good idea -- pick one :-) HTH, -- Hassan Schroeder hassan.schroe...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AJP connections just stop working
I'm pretty sure sebb knows very well JMeter, at least after looking at the subversion history :) The AJP sampler ist still listed in the user guide inside 18.1.2 HTTP Request and the class is still existing in trunk. So they might simply have moved it as a sub type of HTTP request sometime in the past. Regards, Rainer On 22.05.2009 19:26, fredk2 wrote: I was about to say the same earlier, but when i verified with the version (2.3.2) I have installed last month AJP is not listed anymore... Rgds - Fred Anthony J. Biacco wrote: Fyi, you should be able to use jmeter to test AJP connections -Tony --- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 abia...@formatdynamics.com http://www.formatdynamics.com -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Friday, May 22, 2009 6:42 AM To: Tomcat Users List Subject: Re: AJP connections just stop working On 22.05.2009 14:09, kvancamp wrote: One more question: With my HTTP port, I know I can always easily test it, via my browser or scripted using wget. Anybody know of a simple command-line utility like wget, that works with AJP? I think this would be a good tool to have, to help diagnose AJP problems (and would allow me to easily set up some automated stress tests). Coud you please open an enhancement request in Bugzilla for this? There is some code floating around, which we might be able to bundle with the mod_jk source release. Not sure, how soon we would provide a windows binary, but at least we should offer what we already have lying around. It would definitely make sense to have an AJP commandline client to test connectivity. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SSI configuration
Duh! Thanks. I think I need to go away for a long something or other. Have a good MemDay weekend. Ken On May 22, 2009, at 9:53 AM, Caldarale, Charles R wrote: From: Ken Bowen [mailto:kbo...@als.com] Subject: Re: SSI configuration welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list The above is unnecessary on Tomcat, since index.jsp is declared as a welcome file in the global conf/web.xml. However, you may well want to specify index.shtml as an additional welcome file. servlet-mapping servlet-namessi/servlet-name url-pattern*.shtml/url-pattern /servlet-mapping Note the mapping; the SSI servlet is called *only* for references to resources that end in .shtml. In index.html That needs to be index.shtml, otherwise the SSI servlet doesn't get involved. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Upload stop after 30 minutes: Processing of multipart/form-data requestfailed. Stream ended unexpectedly
Hmm. This sounds kinda like something we ran into lately -- maybe this will help you: - our server had TWO nic cards, one for internal 10.10.*.* one for external 208.*.*.* - we'd accidentally set up 'default gateway' on both This meant the system was confused as to where to send replies. Looked like a firewall issue, a router issue... but it was just a mis-configuration in the network settings. Ports didn't matter, firewall was okay, router couldn't get a dependable response... E.G. if your IPs are 10.10.10.10/255.255.0.0 and 1.2.3.4/255.255.255.240 then your network knows which interface a packed aimed at 10.10.1.1 should go out on, or where a packet aimed at 1.2.3.7 should go out on. But where would a packet aimed at 222.222.222.222 go? That's when you have a default gateway, which in this case would probably be something like 1.2.3.1. In case this helps. On Fri, May 22, 2009 at 7:13 AM, Patrick Herber patrick.her...@ticino.com wrote: Thanks a lot for your reply! I've tried your suggestions this are the results. What happens if you go directly into port 8080, bypassing httpd? I've tried but I get the same exception Just for grins, what happens if you change that to 60? Or 10? I've tried but nothing has changed... Is there anything in between httpd and Tomcat (e.g., firewall) that might be dropping the connection? No (and now that I've tested directly on tomcat I presume that it's either a Tomcat or a Commons FileUpload configuration problem) Looking after the problem I also found a suggestion to explicity set disableUploadTimeout to false (see http://www.tek-tips.com/viewthread.cfm?qid=627123): I've also tried this one but without success... Any other suggestion? Thanks a lot again for your help Patrick From: Patrick Herber [mailto:patrick.her...@ticino.com] Subject: Upload stop after 30 minutes: Processing of multipart/form- data requestfailed. Stream ended unexpectedly I'm experiencing problems uploading big files on it: after around 30 minutes (nearly exactly 30 minutes!) the upload stops. What happens if you go directly into port 8080, bypassing httpd? I realize it shouldn't have anything to do with the session timeout (and your AJAX requests should be resetting the timer), but that's the only thing I can think of in Tomcat that has a default value of 30 minutes. Just for grins, what happens if you change that to 60? Or 10? Is there anything in between httpd and Tomcat (e.g., firewall) that might be dropping the connection? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- will trillich Our only real economic security lies in our power to meet human needs. -- S.Covey, the 8th Habit - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
different behavior in processing jar files in Tomcat 5.0.28 and Tomcat 6.0.18
Hi, In the process of migrating an application from Tomcat 5.0.28 to Tomcat 6.0.18, I've identified a different behavior in processing jar files between the two versions. I've attached a small test application (testapp.war) that can be run under both versions to display the differences. I've also included the appropriate lines from the log files of the two versions below. Essentially, when running my Java code which calls method getResource(String name) of class Class to find a resource that is part of a jar file, Tomcat 5.0.28 finds the jar file in the classpath and expands it in directory jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader. And then I can access the resource in the expanded jar file by calling the getPath() method on the instance of the URL class returned by the getResource(String name) method. However, when running the same code with Tomcat 6.0.18, Tomcat finds the resource in the jar file, but it does not expand the jar file under the apache-tomcat-6.0.18/work/Catalina/localhost directory tree and therefore, I cannot access the resource from the jar file. I've checked the Servlet Specification Version 2.4 (Tomcat 5) and Version 2.5 (Tomcat 6) to see if this should be the expected behavior under Tomcat 6, but as far as I can tell, it should process jar files in the same was as Tomcat 5. If anyone can let me know what the correct behavior should be for Tomcat 6, and if there is a way that I can force Tomcat 6 to process jar files in the same way as Tomcat 5, I would greatly appreciate it. Thanks, Pat Tomcat 5.0.28: - ~/opt/jakarta-tomcat-5.0.28/logs % cat ~/opt/jakarta-tomcat-5.0.28/logs/catalina.out | fgrep StartupServlet 2009-05-22_11:56 StartupServlet_init - Initializing servlet StartupServlet 2009-05-22_11:56 StartupServlet_init - url = file:/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/ 2009-05-22_11:56 StartupServlet_init - url.getPath() = /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/ 2009-05-22_11:56 StartupServlet_init - url.getFile() = /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/ 2009-05-22_11:56 StartupServlet_init - url.getProtocol() = file 2009-05-22_11:56 StartupServlet_processPath - pathName = /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/ 2009-05-22_11:56 StartupServlet_processPath - fileName = queryDefns 2009-05-22_11:56 StartupServlet_processPath - File queryDefns exists. 2009-05-22_11:56 StartupServlet_processPath - pathName = /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/describeRawTables.xml 2009-05-22_11:56 StartupServlet_processPath - fileName = describeRawTables.xml 2009-05-22_11:56 StartupServlet_processPath - File describeRawTables.xml exists. 2009-05-22_11:56 StartupServlet_processFile - File describeRawTables.xml is a file. ~/opt/jakarta-tomcat-5.0.28/logs % ~/opt/jakarta-tomcat-5.0.28/logs % ~/opt/jakarta-tomcat-5.0.28/logs % find /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/tldCache.ser /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/META-INF /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/META-INF/MANIFEST.MF /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/describeRawTables.xml ~/opt/jakarta-tomcat-5.0.28/logs % Tomcat 6.0.18: - ~/apps/apache-tomcat-6.0.18/logs % cat ~/apps/apache-tomcat-6.0.18/log/catalina.out | fgrep StartupServlet 2009-05-22_12:27 StartupServlet_init - Initializing servlet StartupServlet 2009-05-22_12:27 StartupServlet_init - url = jar:file:/usr/nlm/kss/apps/apache-tomcat-6.0.18/webapps/testapp/WEB-INF/lib/sample.jar!/queryDefns 2009-05-22_12:27 StartupServlet_init - url.getPath() = file:/usr/nlm/kss/apps/apache-tomcat-6.0.18/webapps/testapp/WEB-INF/lib/sample.jar!/queryDefns 2009-05-22_12:27 StartupServlet_init - url.getFile() = file:/usr/nlm/kss/apps/apache-tomcat-6.0.18/webapps/testapp/WEB-INF/lib/sample.jar!/queryDefns 2009-05-22_12:27 StartupServlet_init - url.getProtocol() = jar 2009-05-22_12:27 StartupServlet_processPath - pathName = file:/usr/nlm/kss/apps/apache-tomcat-6.0.18/webapps/testapp/WEB-INF/lib/sample.jar!/queryDefns 2009-05-22_12:27 StartupServlet_processPath - fileName = queryDefns 2009-05-22_12:27 StartupServlet_processPath - File queryDefns DOES NOT exist. ~/apps/apache-tomcat-6.0.18/logs % ~/apps/apache-tomcat-6.0.18/logs % ~/apps/apache-tomcat-6.0.18/logs % find ../work/ ../work/ ../work/Catalina
RE: different behavior in processing jar files in Tomcat 5.0.28 and Tomcat 6.0.18
Note that the explosion will not occur if the Host is configured so that .WARs are not exploded with a unpackWARs attribute set to false to appBase which is usually webapps, the web application will be simply redeployed as a compressed archive. n unpackWARs Should we unpack WAR files when auto-deploying applications in the appBase directory? http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/startup/HostConfig.html http://www.scribd.com/doc/7430501/Tomcat-War-Deployment ? Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: pguimar...@mail.nlm.nih.gov To: users@tomcat.apache.org Date: Fri, 22 May 2009 14:29:02 -0400 Subject: different behavior in processing jar files in Tomcat 5.0.28 and Tomcat 6.0.18 Hi, In the process of migrating an application from Tomcat 5.0.28 to Tomcat 6.0.18, I’ve identified a different behavior in processing jar files between the two versions. I’ve attached a small test application (testapp.war) that can be run under both versions to display the differences. I’ve also included the appropriate lines from the log files of the two versions below. Essentially, when running my Java code which calls method getResource(String name) of class Class to find a resource that is part of a jar file, Tomcat 5.0.28 finds the jar file in the classpath and expands it in directory jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader. And then I can access the resource in the expanded jar file by calling the getPath() method on the instance of the URL class returned by the getResource(String name) method. However, when running the same code with Tomcat 6.0.18, Tomcat finds the resource in the jar file, but it does not expand the jar file under the apache-tomcat-6.0.18/work/Catalina/localhost directory tree and therefore, I cannot access the resource from the jar file. I’ve checked the Servlet Specification Version 2.4 (Tomcat 5) and Version 2.5 (Tomcat 6) to see if this should be the expected behavior under Tomcat 6, but as far as I can tell, it should process jar files in the same was as Tomcat 5. If anyone can let me know what the correct behavior should be for Tomcat 6, and if there is a way that I can force Tomcat 6 to process jar files in the same way as Tomcat 5, I would greatly appreciate it. Thanks, Pat Tomcat 5.0.28: - ~/opt/jakarta-tomcat-5.0.28/logs % cat ~/opt/jakarta-tomcat-5.0.28/logs/catalina.out | fgrep StartupServlet 2009-05-22_11:56 StartupServlet_init - Initializing servlet StartupServlet 2009-05-22_11:56 StartupServlet_init - url = file:/usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/ 2009-05-22_11:56 StartupServlet_init - url.getPath() = /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/ 2009-05-22_11:56 StartupServlet_init - url.getFile() = /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/ 2009-05-22_11:56 StartupServlet_init - url.getProtocol() = file 2009-05-22_11:56 StartupServlet_processPath - pathName = /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/ 2009-05-22_11:56 StartupServlet_processPath - fileName = queryDefns 2009-05-22_11:56 StartupServlet_processPath - File queryDefns exists. 2009-05-22_11:56 StartupServlet_processPath - pathName = /usr/nlm/kss/opt/jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader/queryDefns/describeRawTables.xml 2009-05-22_11:56 StartupServlet_processPath - fileName = describeRawTables.xml 2009-05-22_11:56 StartupServlet_processPath - File describeRawTables.xml exists. 2009-05-22_11:56 StartupServlet_processFile - File describeRawTables.xml is a file. ~/opt/jakarta-tomcat-5.0.28/logs % ~/opt/jakarta-tomcat-5.0.28/logs % ~/opt/jakarta-tomcat-5.0.28/logs % find
Peering into the pit of jar hell - the mess of tomcat's and other jars in RPM distributions
Sorry to open up with venting, but I truly cannot believe how big of a mess that I found of Tomcat's and others' jars under /usr/share/java in a CentOS 5.2 distribution I examined this morning. For years I've been using tar.gz'd Tomcat that I downloaded and applications I used that had standalone installs would provide similar looking directory layouts of Tomcat. All of those were just great. In the RPM'd Tomcat though, the directories are spread out all over the place (which is acceptable), but from what I've been told, the backporting of patches and possibly attempts to lower the number of the same files (jar files in this case) leave you with a ton of sometimes insane looking symlinks and files. Here is what I'm talking about in /usr/share/java if you're unfamiliar: libgcj-4.1.1.jar libgcj-4.1.2.jar - libgcj-4.1.1.jar libgcj-tools-4.1.1.jar libgcj-tools-4.1.2.jar - libgcj-tools-4.1.1.jar Regardless of how trivial a small change in a version of a jar might be in one case for one version of an application, since this is a shared area for jars, you don't know what some other application would expect out of that jar. And if the person trying to track down an issue thinks they are using one version of a jar, but it is really pointed at a different version. xerces-j2.jar - xerces-j2-2.7.1.jar This seems wrong because you can't assume that, just because you are dependent on a certain jar in one application, the same one would apply to multiple applications. One app might be built with 2.7.1 and another with 2.7.3 that didn't deprecate some method that it removed or changed the signature of, and you might not notice that unless every facet of the jar were tested, and if RedHat or the Fedora community has enough time to do that, they certainly aren't spending their time very wisely. wsdl4j.jar - qname-1.5.2.jar This just looks completely wrong, even if they completely merged the same version of the previous jar into the new one: and servletapi5.jar - tomcat5-servlet-2.4-api-5.5.23.jar This seems wrong on a new counts here as it is a specific implementation and specific version paired with a generic jar name symlink. this one is more excusable than the others though. I don't fundamentally disagree with things often, but I really don't agree that this is a good idea, and it is unfortunately one of the worst messes of jars/dependencies I've seen in my last 10 years as a Java developer (and I've seen some pretty messed up things). How and why could someone RPM Tomcat at all if this is the mess that it falls into? TIA for any comments, facts, or opinions you can provide, Gary Please note that I also just wrote a quick entry about this here (feel free to comment there if you'd rather, although they shut it down for comments after a while to avoid blog link spamming): http://weblogs.java.net/blog/garysweaver/archive/2009/05/peering_into_th.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Peering into the pit of jar hell - the mess of tomcat's and other jars in RPM distributions
On Fri, May 22, 2009 at 12:01 PM, Gary Weaver gary.wea...@duke.edu wrote: Sorry to open up with venting, but I truly cannot believe how big of a mess that I found of Tomcat's and others' jars under /usr/share/java in a CentOS 5.2 distribution I examined this morning. Uh, shouldn't you be bringing this up on a CentOS mailing list then? :-) -- Hassan Schroeder hassan.schroe...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: different behavior in processing jar files in Tomcat 5.0.28 andTomcat 6.0.18
From: Guimaraes, Patricia (NIH/NLM) [C] [mailto:pguimar...@mail.nlm.nih.gov] Subject: different behavior in processing jar files in Tomcat 5.0.28 andTomcat 6.0.18 Essentially, when running my Java code which calls method getResource(String name) of class Class to find a resource that is part of a jar file, Tomcat 5.0.28 finds the jar file in the classpath and expands it in directory jakarta-tomcat- 5.0.28/work/Catalina/localhost/testapp/loader. That's convenience behavior of the container, not defined by the spec. And then I can access the resource in the expanded jar file by calling the getPath() method on the instance of the URL class returned by the getResource(String name) method. The container (Tomcat) is under no obligation to provide any access to the underlying file system (if there is one), other than temporary scratch space. Your use of URL.getPath() - presumably followed by some variation of new File(path) - is risky, and was never guaranteed to work. You should probably be using Class.getResourceAsStream(), which should function properly on any container. - Chuck P.S. Ignore Martin's response - it has no relevance to jars, just to .war files. THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity
-Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Friday, May 22, 2009 2:53 AM To: Tomcat Users List Subject: Re: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity My point is: persistent connections are good, but connections which are idle for a long time are not as good, so close them after some idle time, like e.g. 10 minutes. Of course this means you need to create new ones once your load goes up again, but that's not a big problem. [Pantvaidya, Vishwajit] Why are connections idle for a long time not good? I thought threads when idle take only a little memory and cpu. Are there any other reasons? Thanks a lot Rainer, Chuck, Chris, Andre, Pid, Martin and everyone else I missed. I spent quite some time yesterday chewing on everything I gathered in the last few days' interactions and the conflicting behavior we are seeing in our systems - that led to following conclusions and action plan: Behavior observed in diff production systems: a. medium-to-large thread count whether firewall exists or not b. % of runnable threads is much higher where firewall between httpd/tomcat c. atleast 1 server where firewall exists has run out of threads d. atleast 1 server where no firewall exists has run out of threads Conclusions: 1. In general, runnable threads should not be a prob, unless they correspond to dropped connections. Since on our servers that have firewall between httpd and tomcat, runnable connections are not being used for new requests and tomcat keeps on creating new threads (leading to #b/c above), those threads could correspond to: i. connections dropped by firewall or ii. hanging tomcat threads as httpd recycle timeout disconnected the connection from that side (and there was no connectiontimeout in server.xml so that tomcat could do the same) or iii. combination of these i and ii 2. Runnable threads on servers where no firewall exist (and we do not see server running out of threads) should not be a point of concerns as they do not correspond to dropped connections, as seen from netstat o/p at the end of this email. So #a above could be ignored. 3. Observation #d above is puzzling and currently I have no answers for that Action: - check both sides by using netstat -anop (Apache side and the Tomcat side without connectionTimeout, so you can see the problem in the original form). See whether the number of AJP connections in the various TCP states differs much between the netstat output on the Apache and on the Tomcat system. - Bring workers.properties settings in line with Apache recommendations: - Worker...cachesize=10 - set to 1 - Worker...cache_timeout=600 - remove - Worker...recycle_timeout=300 - remove Netstat o/p's: connector running on 21005, no firewall between httpd/tomcat Httpd Side: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program nameTimer tcp0 0 129.41.29.241:53777 129.41.29.48:21005 ESTABLISHED - keepalive (2869.65/0/0) tcp0 0 129.41.29.241:53943 129.41.29.48:21005 ESTABLISHED - keepalive (3341.39/0/0) tcp0 0 129.41.29.241:49950 129.41.29.48:21005 ESTABLISHED - keepalive (6701.51/0/0) tcp0 0 129.41.29.241:49927 129.41.29.48:21005 ESTABLISHED - keepalive (6240.25/0/0) tcp0 0 129.41.29.241:49926 129.41.29.48:21005 ESTABLISHED - keepalive (6239.47/0/0) tcp0 0 129.41.29.241:49971 129.41.29.48:21005 ESTABLISHED - keepalive (6931.40/0/0) tcp0 0 129.41.29.241:49868 129.41.29.48:21005 ESTABLISHED - keepalive (5743.83/0/0) tcp0 0 129.41.29.241:49865 129.41.29.48:21005 ESTABLISHED - keepalive (5741.65/0/0) tcp0 0 129.41.29.241:49867 129.41.29.48:21005 ESTABLISHED - keepalive (5743.16/0/0) tcp0 0 129.41.29.241:49901 129.41.29.48:21005 ESTABLISHED - keepalive (5906.92/0/0) tcp0 0 129.41.29.241:49795 129.41.29.48:21005 ESTABLISHED - keepalive (4659.11/0/0) tcp0 0 129.41.29.241:49558 129.41.29.48:21005 ESTABLISHED - keepalive (1705.06/0/0) tcp0 0 129.41.29.241:50796 129.41.29.48:21005 ESTABLISHED - keepalive (4551.79/0/0) tcp0 0 129.41.29.241:50784 129.41.29.48:21005 ESTABLISHED - keepalive (4539.53/0/0) tcp0 0 129.41.29.241:50711 129.41.29.48:21005 ESTABLISHED - keepalive
Re: NIO Connector: Too many open files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 5/22/2009 10:32 AM, Rainer Jung wrote: On 22.05.2009 15:46, Christopher Schultz wrote: Rainer, On 5/22/2009 8:55 AM, Rainer Jung wrote: You could run a JSP including a call to System.gc(); Right. The JVM is out of file descriptors. I cannot deploy a new JSP onto the server without restarting it. ;) I mentioned this in my initial post. Yes, of course. In that case you are pretty much restricted to the outside tools you already used. So it would make sense to deploy and precompile/call the new JSP once before starting the next run, so you at least have a chance of calling it. Yeah, I had one of those deployed already. Unfortunately, one of the things that JSP does is call InetAddress.getLocalHost() which fails because ... I was out of file descriptors. It's amazing how much stuff stops working once you hit that wall and nothing will be released ;) Of course the connection the hte http connector needed for the request also needs an FD, but I had the impression from your last post, that a few of those FDs are being closed after some time. Maybe enough for calling the JSP. Yeah, I could make an HTTP connection to the server, but I think that's because the connector already had an fd allocated for the listen. Actually, I'm not sure why some things worked (like making new requests) but others did not (such as doing a localhost lookup). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoW+bIACgkQ9CaO5/Lv0PB2UQCeNTDx5CBnaU3F44sdchJZ29gZ OUEAoJVlwqaRoig1HLi4fBra2QL5JyhU =9czx -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Peering into the pit of jar hell - the mess of tomcat's and other jars in RPM distributions
Probably the most common question asked on this list is: Are you using one of those @#$%$#$ Tomcats from a third party distribution? The follow-up is always: You'll have to get help from the people creating that distribution. BTW: On my own CentOS box, I simply ignore the distribution, and use the download from Apache. Cheers, Ken Bowen On May 22, 2009, at 3:01 PM, Gary Weaver wrote: Sorry to open up with venting, but I truly cannot believe how big of a mess that I found of Tomcat's and others' jars under /usr/share/ java in a CentOS 5.2 distribution I examined this morning. For years I've been using tar.gz'd Tomcat that I downloaded and applications I used that had standalone installs would provide similar looking directory layouts of Tomcat. All of those were just great. In the RPM'd Tomcat though, the directories are spread out all over the place (which is acceptable), but from what I've been told, the backporting of patches and possibly attempts to lower the number of the same files (jar files in this case) leave you with a ton of sometimes insane looking symlinks and files. Here is what I'm talking about in /usr/share/java if you're unfamiliar: libgcj-4.1.1.jar libgcj-4.1.2.jar - libgcj-4.1.1.jar libgcj-tools-4.1.1.jar libgcj-tools-4.1.2.jar - libgcj-tools-4.1.1.jar Regardless of how trivial a small change in a version of a jar might be in one case for one version of an application, since this is a shared area for jars, you don't know what some other application would expect out of that jar. And if the person trying to track down an issue thinks they are using one version of a jar, but it is really pointed at a different version. xerces-j2.jar - xerces-j2-2.7.1.jar This seems wrong because you can't assume that, just because you are dependent on a certain jar in one application, the same one would apply to multiple applications. One app might be built with 2.7.1 and another with 2.7.3 that didn't deprecate some method that it removed or changed the signature of, and you might not notice that unless every facet of the jar were tested, and if RedHat or the Fedora community has enough time to do that, they certainly aren't spending their time very wisely. wsdl4j.jar - qname-1.5.2.jar This just looks completely wrong, even if they completely merged the same version of the previous jar into the new one: and servletapi5.jar - tomcat5-servlet-2.4-api-5.5.23.jar This seems wrong on a new counts here as it is a specific implementation and specific version paired with a generic jar name symlink. this one is more excusable than the others though. I don't fundamentally disagree with things often, but I really don't agree that this is a good idea, and it is unfortunately one of the worst messes of jars/dependencies I've seen in my last 10 years as a Java developer (and I've seen some pretty messed up things). How and why could someone RPM Tomcat at all if this is the mess that it falls into? TIA for any comments, facts, or opinions you can provide, Gary Please note that I also just wrote a quick entry about this here (feel free to comment there if you'd rather, although they shut it down for comments after a while to avoid blog link spamming): http://weblogs.java.net/blog/garysweaver/archive/2009/05/peering_into_th.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Upload stop after 30 minutes: Processing of multipart/form-data requestfailed. Stream ended unexpectedly
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Will, On 5/22/2009 2:01 PM, will trillich wrote: Hmm. This sounds kinda like something we ran into lately -- maybe this will help you: - our server had TWO nic cards, one for internal 10.10.*.* one for external 208.*.*.* - we'd accidentally set up 'default gateway' on both This meant the system was confused as to where to send replies. I recently had a sever misconfiguration in a slightly different way: the default route was set to use an eth device that wasn't physically connected to anything, and the server's primary IP address was also bound to that device. The symptoms were that no outgoing connections could be made successfully, but that incoming connections worked just fine. This was on a Linux 2.4 kernel, which appears to route the replies without a problem even with such an egregious misconfiguration: the kernel appeared to be smart enough to send replies to the right place regardless of the stupidity of the configuration. In what environment did this default route misconfiguration cause unreliable responses? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoW+5MACgkQ9CaO5/Lv0PAIZACgwGFY2HpaUbGUg99CRrS3RGtj S5MAnjyriSd0OZm/lEbBnLr+bQmP6uHA =MOIv -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Peering into the pit of jar hell - the mess of tomcat's and other jars in RPM distributions
From: Gary Weaver [mailto:gary.wea...@duke.edu] Subject: Peering into the pit of jar hell - the mess of tomcat's and otherjars in RPM distributions For years I've been using tar.gz'd Tomcat that I downloaded and applications I used that had standalone installs would provide similar looking directory layouts of Tomcat. All of those were just great. In the RPM'd Tomcat though, the directories are spread out all over the place (which is acceptable), but from what I've been told, the backporting of patches and possibly attempts to lower the number of the same files (jar files in this case) leave you with a ton of sometimes insane looking symlinks and files. Yup - which is why many of us strongly recommend not to use the 3rd-party repackaged junk, but instead get a real Tomcat download. Unfortunately, the Tomcat committers have no control over what the repackagers do, and the repackagers seem oblivious to the damage done and trouble caused. Here is what I'm talking about in /usr/share/java if you're unfamiliar: libgcj-4.1.1.jar libgcj-4.1.2.jar - libgcj-4.1.1.jar libgcj-tools-4.1.1.jar libgcj-tools-4.1.2.jar - libgcj-tools-4.1.1.jar The above has nothing to do with Tomcat, luckily. BTW, you should toss the libgcj stuff if you need to run serious Java programs, and install a real JVM. I don't fundamentally disagree with things often, but I really don't agree that this is a good idea, and it is unfortunately one of the worst messes of jars/dependencies I've seen in my last 10 years as a Java developer (and I've seen some pretty messed up things). Completely concur - but it's not done by Apache Tomcat, but rather whoever decided to repackage it in an anti-social manner. You can lodge your complaints to CentOS, and then stick with running a real Tomcat (and JVM). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NIO Connector: Too many open files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 5/22/2009 8:48 AM, Rainer Jung wrote: The file descriptos thing is totaly independent. I hijacked the thread :) Yeah, I know. Filip independently mentioned that there's a fd leak in the NIO implementation includes in 6.0.18. I have yet to test the fix, but I'm hopeful. Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoW+fsACgkQ9CaO5/Lv0PBGBQCgnlcDb+h+LZ1/qggGuyLq+P77 gvwAoKy3tPXilE+4poxrhl9wRLE7XQaK =PmtD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: different behavior in processing jar files in Tomcat 5.0.28 and Tomcat 6.0.18
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Patricia, On 5/22/2009 2:29 PM, Guimaraes, Patricia (NIH/NLM) [C] wrote: Essentially, when running my Java code which calls method getResource(String name) of class Class to find a resource that is part of a jar file, Tomcat 5.0.28 finds the jar file in the classpath and expands it in directory jakarta-tomcat-5.0.28/work/Catalina/localhost/testapp/loader. And then I can access the resource in the expanded jar file by calling the getPath() method on the instance of the URL class returned by the getResource(String name) method. So, you're calling ServletContext.getResource(String) (which returns a URL) and then calling URL.getPath (which returns a String) and then using /that/ to look on the filesystem? That is not recommended technique. However, when running the same code with Tomcat 6.0.18, Tomcat finds the resource in the jar file, but it does not expand the jar file under the apache-tomcat-6.0.18/work/Catalina/localhost directory tree and therefore, I cannot access the resource from the jar file. There is no guarantee made by the servlet specification that files will be available on any kind of filesystem. No guarantee is made at all that a filesystem will even exist! If you want to load the contents of a file, why not call ServletContext.getResourceAsStream(String) instead? You don't have to mess around with URLs in that case, which is nice: you just get the bytes you want. 2009-05-22_12:27 StartupServlet_init - Initializing servlet StartupServlet Instead of using a StartupServlet, it's more appropriate to use a ServletContextListener: the listener will be notified that the web application has been started before any requests are accepted for processing, and these listeners were explicitly designed for the purpose you (likely) have here. Hope that helps, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoW/NMACgkQ9CaO5/Lv0PD+oACgpf5+2D/rlW/AJ6fW+8r/tThJ UvgAoKudmJOeJ/MkXB1eW8D6W1frhXOZ =HP4d -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Upload stop after 30 minutes: Processing of multipart/form-data requestfailed. Stream ended unexpectedly
On Fri, May 22, 2009 at 2:22 PM, Christopher Schultz ch...@christopherschultz.net wrote: On 5/22/2009 2:01 PM, will trillich wrote: - we'd accidentally set up 'default gateway' on both This meant the system was confused as to where to send replies. I recently had a sever misconfiguration in a slightly different way: the default route was set to use an eth device that wasn't physically connected to anything, and the server's primary IP address was also bound to that device. The symptoms were that no outgoing connections could be made successfully, but that incoming connections worked just fine. This was on a Linux 2.4 kernel, which appears to route the replies without a problem even with such an egregious misconfiguration: the kernel appeared to be smart enough to send replies to the right place regardless of the stupidity of the configuration. In what environment did this default route misconfiguration cause unreliable responses? Windo~1 2003 Enterprise. It was really weird. For hours at a time, all was well. Packets came, packets went. Pages were browsed. Then -- poof! -- no traffic at all. We were originally thinking it was another computer with the same IP address that had no server, getting all the traffic. Nope. Just too many default gateways. :) -- will trillich Our only real economic security lies in our power to meet human needs. -- S.Covey, the 8th Habit - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: different behavior in processing jar files in Tomcat 5.0.28 andTomcat 6.0.18
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: different behavior in processing jar files in Tomcat 5.0.28 andTomcat 6.0.18 On 5/22/2009 2:29 PM, Guimaraes, Patricia (NIH/NLM) [C] wrote: Essentially, when running my Java code which calls method getResource(String name) of class Class to find a resource So, you're calling ServletContext.getResource(String) No, Class.getResource() - the difference is significant. I don't think ServletContext.getResource() will look inside .jar files. The proper method is still getResourceAsStream(), but using the classloader or the class. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
RE: Running out of tomcat threads - why many threads in RUNNABLE stage even with no activity
From: Pantvaidya, Vishwajit [mailto:vpant...@selectica.com] Subject: RE: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity [Pantvaidya, Vishwajit] Why are connections idle for a long time not good? He didn't say they weren't good, he said they weren't _as_ good - a relative, not absolute, assessment. Things sitting around idle are not /as good/ as things in use. It doesn't make them bad. 1. In general, runnable threads should not be a prob, unless they correspond to dropped connections. Correct; need to focus on why the connections are becoming unusable. 3. Observation #d above is puzzling and currently I have no answers for that That is strange; is there anything else between httpd and Tomcat in that situation? (E.g., an overly clever router?) Netstat o/p's: connector running on 21005, no firewall between httpd/tomcat That all looks reasonable to me - the port numbers match. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity
On 22.05.2009 21:09, Pantvaidya, Vishwajit wrote: -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Friday, May 22, 2009 2:53 AM To: Tomcat Users List Subject: Re: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity My point is: persistent connections are good, but connections which are idle for a long time are not as good, so close them after some idle time, like e.g. 10 minutes. Of course this means you need to create new ones once your load goes up again, but that's not a big problem. [Pantvaidya, Vishwajit] Why are connections idle for a long time not good? I thought threads when idle take only a little memory and cpu. Are there any other reasons? Because you might want to monitor connections in order to learn how many threads you need for your load and how things grow or shrink over time. If you keep connections open an infinite number of time, you'll only monitor the biggest need since restart, which is often not very interesting, because it often is artificial (triggered by some performance slowness you might have a very big connection number created during a short time). Second: because they are making trouble so often in combination with firewalls. So in general I like persistent connections as long as they are closed when idle for a longer time. So usually I set the pool min size to 0 and the idle connection timeout to 10 minutes. Thanks a lot Rainer, Chuck, Chris, Andre, Pid, Martin and everyone else I missed. I spent quite some time yesterday chewing on everything I gathered in the last few days' interactions and the conflicting behavior we are seeing in our systems - that led to following conclusions and action plan: Behavior observed in diff production systems: a. medium-to-large thread count whether firewall exists or not b. % of runnable threads is much higher where firewall between httpd/tomcat c. atleast 1 server where firewall exists has run out of threads d. atleast 1 server where no firewall exists has run out of threads Concurrency = Load * ResponseTime Concurrency: number of requests being processed in parallel Load: Number of Requests per Second being handled ResponseTime: Average Response time in seconds. So in case you have a performance problem and for a given load your response time goes up by a factor of ten, the number of connections will also go up by a factpr of 10. That's most often the reason for d) and was the reason, why we asked for thread dumps. Conclusions: 1. In general, runnable threads should not be a prob, unless they correspond to dropped connections. Since on our servers that have firewall between httpd and tomcat, runnable connections are not being used for new requests and tomcat keeps on creating new threads (leading to #b/c above), those threads could correspond to: i. connections dropped by firewall or ii. hanging tomcat threads as httpd recycle timeout disconnected the connection from that side (and there was no connectiontimeout in server.xml so that tomcat could do the same) or iii. combination of these i and ii 2. Runnable threads on servers where no firewall exist (and we do not see server running out of threads) should not be a point of concerns as they do not correspond to dropped connections, as seen from netstat o/p at the end of this email. So #a above could be ignored. 3. Observation #d above is puzzling and currently I have no answers for that If d) happens again, do some thread dumps. Action: - check both sides by using netstat -anop (Apache side and the Tomcat side without connectionTimeout, so you can see the problem in the original form). See whether the number of AJP connections in the various TCP states differs much between the netstat output on the Apache and on the Tomcat system. - Bring workers.properties settings in line with Apache recommendations: - Worker...cachesize=10 - set to 1 respectively when using Apache, remove this. Rely on the defaults for that one. - Worker...cache_timeout=600 - remove - Worker...recycle_timeout=300 - remove Hmmm. Netstat o/p's: connector running on 21005, no firewall between httpd/tomcat Httpd Side: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program nameTimer tcp0 0 129.41.29.241:53777 129.41.29.48:21005 ESTABLISHED - keepalive (2869.65/0/0) tcp0 0 129.41.29.241:53943 129.41.29.48:21005 ESTABLISHED - keepalive (3341.39/0/0) tcp0 0 129.41.29.241:49950 129.41.29.48:21005 ESTABLISHED - keepalive (6701.51/0/0) tcp0 0 129.41.29.241:49927 129.41.29.48:21005 ESTABLISHED - keepalive (6240.25/0/0) tcp0 0 129.41.29.241:49926 129.41.29.48:21005
RE: Peering into the pit of jar hell - the mess of tomcat's and other jars in RPM distributions
MGGood Afternoon Gary MG(hopefully brief) comment annotations displayed below Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 22 May 2009 15:01:37 -0400 From: gary.wea...@duke.edu To: users@tomcat.apache.org Subject: Peering into the pit of jar hell - the mess of tomcat's and other jars in RPM distributions Sorry to open up with venting, but I truly cannot believe how big of a mess that I found of Tomcat's and others' jars under /usr/share/java in a CentOS 5.2 distribution I examined this morning. For years I've been using tar.gz'd Tomcat that I downloaded and applications I used that had standalone installs would provide similar looking directory layouts of Tomcat. All of those were just great. In the RPM'd Tomcat though, the directories are spread out all over the place (which is acceptable), but from what I've been told, the backporting of patches and possibly attempts to lower the number of the same files (jar files in this case) leave you with a ton of sometimes insane looking symlinks and files. Here is what I'm talking about in /usr/share/java if you're unfamiliar: libgcj-4.1.1.jar libgcj-4.1.2.jar - libgcj-4.1.1.jar libgcj-tools-4.1.1.jar libgcj-tools-4.1.2.jar - libgcj-tools-4.1.1.jar Regardless of how trivial a small change in a version of a jar might be in one case for one version of an application, since this is a shared area for jars, you don't know what some other application would expect out of that jar. And if the person trying to track down an issue thinks they are using one version of a jar, but it is really pointed at a different version. xerces-j2.jar - xerces-j2-2.7.1.jar This seems wrong because you can't assume that, just because you are dependent on a certain jar in one application, the same one would apply to multiple applications. One app might be built with 2.7.1 and another with 2.7.3 that didn't deprecate some method that it removed or changed the signature of, and you might not notice that unless every facet of the jar were tested, and if RedHat or the Fedora community has enough time to do that, they certainly aren't spending their time very wisely. wsdl4j.jar - qname-1.5.2.jar MGwhat is qname? who builds qname? a quick glance at wsdl4j build.xml contains: MGjar jarfile=${build.lib}/qname.jar basedir=${build.dest} MG include name=javax/xml/**/*.class/ MGwho in wsdl4j references wsdl4j? MG%WSDL4J_HOME%\src\javaxgrep -S -l wsdl4j *.* MG .\wsdl\OperationType.java MGonly 1 reference here and thats a comment MGthat means qname is now the DRIVER (and wsdl4j is supporting library) MG/* The following equals method is not used within wsdl4j but MG * it is historically part of the jsr110 wsdl4j API, so it MG * will not likely be removed. Although it overloads the MG * Object.equals method (i.e. it has a different arg) it does MG * not override it, so Object.equals will still be used by MG * the readResolve method at deserialization. MG */ MG MGwhat is wsdl4j? who builds wsdl4j? a quick glance at wsdl4j build.xml contains: MGjar jarfile=${build.lib}/${name}.jar basedir=${build.dest} MG exclude name=javax/xml/**/ MGa quick hop to the ibm code tree and a grep on qname displays MG%WSDL4J_HOME%\src\comgrep -S -l qname *.* MG.\ibm\wsdl\AbstractWSDLElement.java MG.\ibm\wsdl\DefinitionImpl.java MG.\ibm\wsdl\extensions\schema\SchemaConstants.java MG.\ibm\wsdl\util\xml\QNameUtils.java MG.\ibm\wsdl\xml\WSDLReaderImpl.java MGas you can see wsdl4j functions are empty stubs that call to qname for real work MG(the justification for symlink alias of wsdl4j.jar - qname-1.5.2.jar is validated) This just looks completely wrong, even if they completely merged the same version of the previous jar into the new one: and servletapi5.jar - tomcat5-servlet-2.4-api-5.5.23.jar This seems wrong on a new counts here as it is a specific implementation and specific version paired with a
RE: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity
-Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Friday, May 22, 2009 12:39 PM To: Tomcat Users List Subject: Re: Running out of tomcat threads - why many threads in RUNNABLEstage even with no activity [Pantvaidya, Vishwajit] Why are connections idle for a long time not good? I thought threads when idle take only a little memory and cpu. Are there any other reasons? Because you might want to monitor connections in order to learn how many threads you need for your load and how things grow or shrink over time. If you keep connections open an infinite number of time, you'll only monitor the biggest need since restart, which is often not very interesting, because it often is artificial (triggered by some performance slowness you might have a very big connection number created during a short time). [Pantvaidya, Vishwajit] Good reason - I think ultimately after some immediate testing to diagnose the outofthread issues, I will use timeouts. d. atleast 1 server where no firewall exists has run out of threads Concurrency = Load * ResponseTime Concurrency: number of requests being processed in parallel Load: Number of Requests per Second being handled ResponseTime: Average Response time in seconds. So in case you have a performance problem and for a given load your response time goes up by a factor of ten, the number of connections will also go up by a factpr of 10. That's most often the reason for d) and was the reason, why we asked for thread dumps. [Pantvaidya, Vishwajit] Again good explanation and makes a lot of sense - I do seem to remember we had performance problems on that machine. Will keep this in mind and monitor threads and take dumps if outofthreads reoccurs on that server. - Bring workers.properties settings in line with Apache recommendations: - Worker...cachesize=10 - set to 1 respectively when using Apache, remove this. Rely on the defaults for that one. [Pantvaidya, Vishwajit] Sure will do - once we migrate to jk 1.2.28. - Worker...cache_timeout=600 - remove - Worker...recycle_timeout=300 - remove Hmmm. [Pantvaidya, Vishwajit] Considering the excellent reasons you have given above - ultimately I will retain timeouts. But for testing firewall issues, I need to rollback connTimeout in server.xml and to make sure that my settings are consistent I need to rollback the above timeouts also. Again thanks - I think I have reasonable explanations for most of the issues / conflicting observations. This thread may be quiet for some time as I do more testing as per the actions I mentioned - will get back with results and final conclusions later. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Peering into the pit of jar hell - the mess of tomcat's and other jars in RPM distributions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gary, On 5/22/2009 3:01 PM, Gary Weaver wrote: Sorry to open up with venting, but I truly cannot believe how big of a mess that I found of Tomcat's and others' jars under /usr/share/java in a CentOS 5.2 distribution I examined this morning. Oh, this is gonna be great ;) Here is what I'm talking about in /usr/share/java if you're unfamiliar: libgcj-4.1.1.jar libgcj-4.1.2.jar - libgcj-4.1.1.jar libgcj-tools-4.1.1.jar libgcj-tools-4.1.2.jar - libgcj-tools-4.1.1.jar Regardless of how trivial a small change in a version of a jar might be in one case for one version of an application, since this is a shared area for jars, you don't know what some other application would expect out of that jar. And if the person trying to track down an issue thinks they are using one version of a jar, but it is really pointed at a different version. xerces-j2.jar - xerces-j2-2.7.1.jar It's even more obnoxious to link the 4.1.2 version to the 4.1.1 JAR since you'd think you were getting 4.1.2 but you're really getting 4.1.1. Shared libraries do this all the time, but they do it in a sane way: libfoo.so - libfoo.1.so libfoo.1.so - libfoo.1.2.3.4.5.so libfoo.1.2.3.4.5.so (this is the real one) So, basically, clients can either load a specific version (1.2.3.4.5) or the latest in a major version (1) and they always get what's appropriate. They can also say latest by loading libfoo.so directly. This is great for shared libraries and /might/ be great for JAR files, but the above does not look sane to me. You wouldn't link libfoo.1.so to libfoo.2.so. :( servletapi5.jar - tomcat5-servlet-2.4-api-5.5.23.jar This seems wrong on a new counts here as it is a specific implementation and specific version paired with a generic jar name symlink. this one is more excusable than the others though. The API JAR should not be stuck to a specific version of Tomcat: this is a generic JAR. I suspect this packaging reflects an ignorance of the relationship between the Servlet API and Tomcat. The servlet 2.4 API is the servlet 2.4 API, no matter who is using it. The version used for 5.5.23 is (or at least should be!) the same as is used for 5.5.1 and 5.5.27. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoXCBkACgkQ9CaO5/Lv0PDEIgCfU9mbxPF0M0EEuUMUgb5sTobw wvQAn38hwlIF7I2n9LtbEgEGe/EbmUr0 =EUPj -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: different behavior in processing jar files in Tomcat 5.0.28 andTomcat 6.0.18
Thank you all for your comments! They were very helpful! Unfortunately, the war file containing the test application was stripped from my original e-mail. This is actually code that I inherited from someone else. They were running it under Tomcat 5 and when I ran it under Tomcat 6, it didn't work the same way, which is why I started looking into this. Also, the actual code is not in a servlet. I just put it in a servlet in the test application so I could easily execute the same code when Tomcat was started. Thanks again, Pat -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, May 22, 2009 3:34 PM To: Tomcat Users List Subject: RE: different behavior in processing jar files in Tomcat 5.0.28 andTomcat 6.0.18 From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: different behavior in processing jar files in Tomcat 5.0.28 andTomcat 6.0.18 On 5/22/2009 2:29 PM, Guimaraes, Patricia (NIH/NLM) [C] wrote: Essentially, when running my Java code which calls method getResource(String name) of class Class to find a resource So, you're calling ServletContext.getResource(String) No, Class.getResource() - the difference is significant. I don't think ServletContext.getResource() will look inside .jar files. The proper method is still getResourceAsStream(), but using the classloader or the class. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: Peering into the pit of jar hell - the mess of tomcat's and other jars in RPM distributions
Martin, Thanks much for the time you spent on the explanation. However (and hopefully I'm being brief also)- one of issues in doing this is that wsdl4j.jar could (in-general) be any version of wsdl4j not necessarily something that just happens to be populated with one or more classes that do nothing more than have methods that just then call classes in (version specific, because method signatures/classes/packages could change in diff versions) qname-1.5.2.jar. (This is - if that is what you are saying- I do not know what version of wsdl4j it is here, nor have I looked at the source, since I don't know what version it is from the name). The impression I get from looking at the mess of symlinks is that people are assuming (like vendors of Windows products that contributed to Microsoft's DLL hell starting mostly in Win95) that playing around with filenames and versions is perfectly acceptable if it gets the job done (for reducing space they take up in an attempt to share files, or in this case possible reducing the stack level by bypassing methods in an interface jar completely). But in fact, when this is done the only substantial good it does that is not outweighed by negatives is that RedHat will end up selling more support licenses for people that get fed up with RPMs on CentOS/Fedora not working properly (after all, they make money off of support, right?). That maybe a fatalistic viewpoint on my part, and I don't mean to start a firestorm, but basically (in this case) unless you were to have a directory that contained a bunch of jars where each filename were to have a version that actually corresponds to the well-known version of that specific jar, then I think you are really asking for trouble. Thanks, Gary Martin Gainty wrote: MGGood Afternoon Gary MG(hopefully brief) comment annotations displayed below Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Fri, 22 May 2009 15:01:37 -0400 From: gary.wea...@duke.edu To: users@tomcat.apache.org Subject: Peering into the pit of jar hell - the mess of tomcat's and other jars in RPM distributions Sorry to open up with venting, but I truly cannot believe how big of a mess that I found of Tomcat's and others' jars under /usr/share/java in a CentOS 5.2 distribution I examined this morning. For years I've been using tar.gz'd Tomcat that I downloaded and applications I used that had standalone installs would provide similar looking directory layouts of Tomcat. All of those were just great. In the RPM'd Tomcat though, the directories are spread out all over the place (which is acceptable), but from what I've been told, the backporting of patches and possibly attempts to lower the number of the same files (jar files in this case) leave you with a ton of sometimes insane looking symlinks and files. Here is what I'm talking about in /usr/share/java if you're unfamiliar: libgcj-4.1.1.jar libgcj-4.1.2.jar - libgcj-4.1.1.jar libgcj-tools-4.1.1.jar libgcj-tools-4.1.2.jar - libgcj-tools-4.1.1.jar Regardless of how trivial a small change in a version of a jar might be in one case for one version of an application, since this is a shared area for jars, you don't know what some other application would expect out of that jar. And if the person trying to track down an issue thinks they are using one version of a jar, but it is really pointed at a different version. xerces-j2.jar - xerces-j2-2.7.1.jar This seems wrong because you can't assume that, just because you are dependent on a certain jar in one application, the same one would apply to multiple applications. One app might be built with 2.7.1 and another with 2.7.3 that didn't deprecate some method that it removed or changed the signature of, and you might not notice that unless every facet of the jar were tested, and if RedHat or the Fedora community has enough time to do that, they certainly aren't spending their time very wisely. wsdl4j.jar - qname-1.5.2.jar
RE: mod_jk status code and loadbalancer monitoring
Rainer, Thanks for great advice, unfortunately I am not a programmer and have some issues when I try to compile the updated mod_jk. What I have tried is to compile mod_jk under Centos. Below are my proceedures. My config. [r...@localhost native]# head -n1 /etc/issue CentOS release 5.2 (Final) [r...@localhost native]# httpd -v Server version: Apache/2.2.3 Server built: Nov 12 2008 10:41:27 I started as instructed with ./buildconf.sh ./configure --with-apxs=/usr/sbin/apxs Make As far as I can see there were no error, I then copied the mod_jk.so to the apache modukes dir. The concern that I have was the location of the new file. /usr/src/tomcat-connectors-1.2.28-src/native/apache-2.0 My apache install is /etc/httpd/ The version of apache I am running is 2.2.3 and the one that was installed for is 2.0? Other than that I am completely lost. Thanks again for your help and advice. Kind regards Lawrence Lamprecht Read our blog: Intelligent Supply Management - Your advantage -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Friday, May 22, 2009 3:10 PM To: Tomcat Users List Subject: Re: mod_jk status code and loadbalancer monitoring Hi Lawrence, I will answer in a slightly different order below. On 22.05.2009 13:58, Lawrence Lamprecht wrote: I found a really old entry from way back in 2005. Reading through a trail of messages under the heading Adding working dynamically with mod_jk status What I would very much appreciate is two things. I would like to know where I can get some clear documents on the status codes for mod_jk. The status codes appear in the mod_jk.log file in the following format. [Wed May 20 06:27:47 2009] [21343:33088] [debug] jk_handler::mod_jk.c (1969): Service finished with status=200 for worker=loadbalancer1 I have also seen other entries for status=302 etc. I would like to understand what these status code mean or represent. The second thing that I would like to see is, do you have any information on monitoring the workers in the mod_jk config. I know about the jkstatus function, but that is not very dynamic. It only really reports errors if the wroker is called. I had an issue where I took down on of the two workers in the loadbalancer config, I saw the error that the first worker was no longer available, but as soon as the second worker took over the work, then the error was cleared and nothing more was reported. I have had an idea, but seeing as I am not a programmer, I have no idea how to achieve this, but I hope that someone else has also had the same bright spark. I was hoping that there was some application that did something similar to what webalizer does with the access.log file for the apache web server that could analyze the mod_jk.log file and dynamically report the status of the workers as things happen. Something like a dashboard to show what state the workers are in at any given time. When the log file is rolling in debug mode, there is very much information that could be used to report back on the worker status. I hope that someone might have some good ideas. Somehting that I have also thought about is possibly upgrading the mod_jk version that I am running at the mo. I have the following setup. Server version: Apache/2.0.52 Server built: Jun 29 2007 05:08:11 JK Version: 1.2.15 I get really confused with the different versions and compatibility, so could I keep the current Apache version and only upgrade mod_jk, Where would I find instauction on how to go about doing this. Thanks in advnce Lawrence Lamprecht The status worker was added to mod_jk around the time of your version 1.2.15. It improved *a lot* since then. Actually during the last releases it was the focus of most of the development. So do yourself a favour and update mod_jk. Recent is 1.2.28. Compatibility: mod_jk works for Apache httpd 1.3, 2.0 and 2.2. You need to either compile it against your web server (preferred way) or fetch a binary for your httpd version somewhere, e.g. in our download area. You cannot use a mod_jk for 2.2 to run in 2.0 or vice versa, but the minor digits behind usually do not matter. Compiling is easy (depending a bit on your OS), so you best go that way. We deprecated some configuration attributes long ago, so after updateing have a look at the mod_jk log during startup, if it contains info about not supported or deprecated attributes. The docs contain info about how to replace those. There are only few such attributes. We didn't deprecate anything during the last 10 releases, but chances are, that you should change a few configuration attributes you used with 1.2.15. There is one caveat: JkMount not isn't inherited from the global server to any virtual host or between virtual hosts. If you have virtual hosts, put your JkMount into those or use JkMountCopy. See docs. Now about status codes: The code in the log line you cited is the HTTP status code we
Re: mod_jk status code and loadbalancer monitoring
On 22.05.2009 23:09, Lawrence Lamprecht wrote: Rainer, Thanks for great advice, unfortunately I am not a programmer and have some issues when I try to compile the updated mod_jk. What I have tried is to compile mod_jk under Centos. Below are my proceedures. My config. [r...@localhost native]# head -n1 /etc/issue CentOS release 5.2 (Final) [r...@localhost native]# httpd -v Server version: Apache/2.2.3 Server built: Nov 12 2008 10:41:27 I started as instructed with ./buildconf.sh Don't do buildconf.sh. It is only needed if you checkout mod_jk directly from the source code repository. It will create the configure script, which is already contained in the official source code distributions. It might not produce any problem, but you need more tools installed to be able to run buildconf.sh, than only for the real build. ./configure --with-apxs=/usr/sbin/apxs Make As far as I can see there were no error, I then copied the mod_jk.so to the apache modukes dir. The concern that I have was the location of the new file. /usr/src/tomcat-connectors-1.2.28-src/native/apache-2.0 My apache install is /etc/httpd/ The version of apache I am running is 2.2.3 and the one that was installed for is 2.0? No, odules for 2.0 and 2.2 will both be build inside the apache-2.0 directory. It should have been named 2.x some time in the past. This simply comes from the fact, that the module for 2.0 and for 2.2 can be build form exactly the same source. Below that apache-2.0 there should be a .libs directory, that contains the new mod_jk.so file. You then need to find out where your Apache installation keeps its modules. Either look for the LoadModule lines in the config, or you could try /usr/sbin/apxs -q libexecdir Caution: on some linux systems there's an apxs and an apxs2. The first is to compile things for Apache 1.3 and the second for 2.x. Other than that I am completely lost. Thanks again for your help and advice. HTH Rainer Read our blog: Intelligent Supply Management - Your advantage -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Friday, May 22, 2009 3:10 PM To: Tomcat Users List Subject: Re: mod_jk status code and loadbalancer monitoring Hi Lawrence, I will answer in a slightly different order below. On 22.05.2009 13:58, Lawrence Lamprecht wrote: I found a really old entry from way back in 2005. Reading through a trail of messages under the heading Adding working dynamically with mod_jk status What I would very much appreciate is two things. I would like to know where I can get some clear documents on the status codes for mod_jk. The status codes appear in the mod_jk.log file in the following format. [Wed May 20 06:27:47 2009] [21343:33088] [debug] jk_handler::mod_jk.c (1969): Service finished with status=200 for worker=loadbalancer1 I have also seen other entries for status=302 etc. I would like to understand what these status code mean or represent. The second thing that I would like to see is, do you have any information on monitoring the workers in the mod_jk config. I know about the jkstatus function, but that is not very dynamic. It only really reports errors if the wroker is called. I had an issue where I took down on of the two workers in the loadbalancer config, I saw the error that the first worker was no longer available, but as soon as the second worker took over the work, then the error was cleared and nothing more was reported. I have had an idea, but seeing as I am not a programmer, I have no idea how to achieve this, but I hope that someone else has also had the same bright spark. I was hoping that there was some application that did something similar to what webalizer does with the access.log file for the apache web server that could analyze the mod_jk.log file and dynamically report the status of the workers as things happen. Something like a dashboard to show what state the workers are in at any given time. When the log file is rolling in debug mode, there is very much information that could be used to report back on the worker status. I hope that someone might have some good ideas. Somehting that I have also thought about is possibly upgrading the mod_jk version that I am running at the mo. I have the following setup. Server version: Apache/2.0.52 Server built: Jun 29 2007 05:08:11 JK Version: 1.2.15 I get really confused with the different versions and compatibility, so could I keep the current Apache version and only upgrade mod_jk, Where would I find instauction on how to go about doing this. Thanks in advnce Lawrence Lamprecht The status worker was added to mod_jk around the time of your version 1.2.15. It improved *a lot* since then. Actually during the last releases it was the focus of most of the development. So do yourself a favour and update mod_jk. Recent is 1.2.28. Compatibility: mod_jk works for Apache httpd 1.3,
RE: Tomcat 6 - not started AJP/NIO on CentOS
From: Dmitriy Repin [mailto:d...@inbox.ru] Subject: Tomcat 6 - not started AJP/NIO on CentOS Tomcat 6.0.18 JDK 1.6.0_13 I want to use AJP/NIO connector, but it didn't started on CentOS Post the server.xml from your CentOS attempt so we can look at it. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: different behavior in processing jar files in Tomcat 5.0.28 andTomcat 6.0.18
Feel free to post the aberrant code as 90% of the folks on the list have coded at one time or another HTH Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: pguimar...@mail.nlm.nih.gov To: users@tomcat.apache.org Date: Fri, 22 May 2009 16:04:24 -0400 Subject: RE: different behavior in processing jar files in Tomcat 5.0.28 andTomcat 6.0.18 Thank you all for your comments! They were very helpful! Unfortunately, the war file containing the test application was stripped from my original e-mail. This is actually code that I inherited from someone else. They were running it under Tomcat 5 and when I ran it under Tomcat 6, it didn't work the same way, which is why I started looking into this. Also, the actual code is not in a servlet. I just put it in a servlet in the test application so I could easily execute the same code when Tomcat was started. Thanks again, Pat -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, May 22, 2009 3:34 PM To: Tomcat Users List Subject: RE: different behavior in processing jar files in Tomcat 5.0.28 andTomcat 6.0.18 From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: different behavior in processing jar files in Tomcat 5.0.28 andTomcat 6.0.18 On 5/22/2009 2:29 PM, Guimaraes, Patricia (NIH/NLM) [C] wrote: Essentially, when running my Java code which calls method getResource(String name) of class Class to find a resource So, you're calling ServletContext.getResource(String) No, Class.getResource() - the difference is significant. I don't think ServletContext.getResource() will look inside .jar files. The proper method is still getResourceAsStream(), but using the classloader or the class. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. _ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009
RE: mod_jk status code and loadbalancer monitoring
any clue where i can download apxs? thanks/danke Martin __ Verzicht und Vertraulichkeitanmerkung Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Date: Fri, 22 May 2009 23:21:02 +0200 From: rainer.j...@kippdata.de To: users@tomcat.apache.org Subject: Re: mod_jk status code and loadbalancer monitoring On 22.05.2009 23:09, Lawrence Lamprecht wrote: Rainer, Thanks for great advice, unfortunately I am not a programmer and have some issues when I try to compile the updated mod_jk. What I have tried is to compile mod_jk under Centos. Below are my proceedures. My config. [r...@localhost native]# head -n1 /etc/issue CentOS release 5.2 (Final) [r...@localhost native]# httpd -v Server version: Apache/2.2.3 Server built: Nov 12 2008 10:41:27 I started as instructed with ./buildconf.sh Don't do buildconf.sh. It is only needed if you checkout mod_jk directly from the source code repository. It will create the configure script, which is already contained in the official source code distributions. It might not produce any problem, but you need more tools installed to be able to run buildconf.sh, than only for the real build. ./configure --with-apxs=/usr/sbin/apxs Make As far as I can see there were no error, I then copied the mod_jk.so to the apache modukes dir. The concern that I have was the location of the new file. /usr/src/tomcat-connectors-1.2.28-src/native/apache-2.0 My apache install is /etc/httpd/ The version of apache I am running is 2.2.3 and the one that was installed for is 2.0? No, odules for 2.0 and 2.2 will both be build inside the apache-2.0 directory. It should have been named 2.x some time in the past. This simply comes from the fact, that the module for 2.0 and for 2.2 can be build form exactly the same source. Below that apache-2.0 there should be a .libs directory, that contains the new mod_jk.so file. You then need to find out where your Apache installation keeps its modules. Either look for the LoadModule lines in the config, or you could try /usr/sbin/apxs -q libexecdir Caution: on some linux systems there's an apxs and an apxs2. The first is to compile things for Apache 1.3 and the second for 2.x. Other than that I am completely lost. Thanks again for your help and advice. HTH Rainer Read our blog: Intelligent Supply Management - Your advantage -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Friday, May 22, 2009 3:10 PM To: Tomcat Users List Subject: Re: mod_jk status code and loadbalancer monitoring Hi Lawrence, I will answer in a slightly different order below. On 22.05.2009 13:58, Lawrence Lamprecht wrote: I found a really old entry from way back in 2005. Reading through a trail of messages under the heading Adding working dynamically with mod_jk status What I would very much appreciate is two things. I would like to know where I can get some clear documents on the status codes for mod_jk. The status codes appear in the mod_jk.log file in the following format. [Wed May 20 06:27:47 2009] [21343:33088] [debug] jk_handler::mod_jk.c (1969): Service finished with status=200 for worker=loadbalancer1 I have also seen other entries for status=302 etc. I would like to understand what these status code mean or represent. The second thing that I would like to see is, do you have any information on monitoring the workers in the mod_jk config. I know about the jkstatus function, but that is not very dynamic. It only really reports errors if the wroker is called. I had an issue where I took down on of the two workers in the loadbalancer config, I saw the error that the first worker was no longer available, but as soon as the second worker took over the work, then the error was cleared and nothing more was reported. I have had an idea, but seeing as I am not a programmer, I have no idea how to achieve this, but I hope that someone else has also had the same bright spark. I was hoping that there was some application that did something similar to what webalizer does with the access.log file for the apache web server that could analyze the mod_jk.log file and dynamically report the status of the workers as things happen. Something like a dashboard to show what state the workers are in at any given time. When the log file is rolling in debug mode, there is very much information that could be used to report back
Re: mod_jk status code and loadbalancer monitoring
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin, On 5/22/2009 10:09 PM, Martin Gainty wrote: any clue where i can download apxs? Apxs comes bundled with Apache httpd. If you have httpd already, you should have apxs. On some package-managed systems where Apache httpd 2.2.x is installed, the script is called 'apxs2'. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoXYiwACgkQ9CaO5/Lv0PDCLACeN256x6lCMMudPaHk34j7XArI iIoAn1IuTzSR/W2i/295SKbQJF3hlx20 =d4hs -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: enterprise tomcat hosting, architecture. How will u do it?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 DW, On 5/20/2009 1:00 PM, List Member wrote: At the same time it should be flexible as it will support multiple applications, multiple JVMs, each app very different from each other. We do this on our production systems. Each application gets its own JVM which can, of course, be a different version from the others if necessary (although we try to stick to one JVM for all apps). The same is true for Tomcat: they can each run under a different TC version, or share a single install base (using CATALINA_HOME) with others. It's totally mix-and-match. We do this all using ant scripts to convert a relatively generic set of files along with the code, libraries, etc. into a running instance of Tomcat (whichever version). We can prepare an installation, deploy the web app to it, start and stop tomcat, etc. all using simple ant targets. Once the environment is set up properly, we just run: $ ant install (builds code, prepares Tomcat based upon shared CATALINA_HOME, installs the webapp) $ ant tomcat-start (starts Tomcat) ...and we've got a working application. You can even re-name the application (by changing the project name in the build.xml file) and get yourself a different set of configuration options. So, you can have webapp foo and foo-testing that each deploy to a different Tomcat instance that could potentially be on different JVMs, different Tomcat versions, etc. We are planning to use default appbase and use webapps as directory where users will put in their war files. The data source information should be in the war file itself. And most of the jar's, extra configuration should be built into the war file. The main criteria being that we would like to keep the installation as clean as possible. Exactly why we use the above techniques. Upgrading Tomcat (once we've testing our apps on it sufficiently :) involves nothing more that: $ ant tomcat-stop $ ant install-clean $ (edit environment file to point to the new Tomcat CATALINA_BASE) $ ant install $ ant tomcat-start Upgrade accomplished. If you're interested, I could post samples of the ant scripts we use to perform all this magic. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoXZi4ACgkQ9CaO5/Lv0PAdrwCePRL2g5MVud+IeiPq/t6X0diB s8MAnRB1RplRcwnek0tb8eDb5oAo3GeK =z1TI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org