Re: Configuring a context specific JNDI/JDBC Realm
Thank you for your quick reply. I made the changes you suggested (and had to re-read some configuration HOWTOs) and the application behaves as expected. Thanks again. Mark Le 02/05/2011 18:22, Mark Thomas a écrit : On 02/05/2011 17:11, Mark Hoebeke wrote: So, I'm using Tomcat 6.0.26 and I'm developing an application relying on a Realm to authenticate users. The Realm is a DataSourceRealm pointing to a JNDI Resource declared in the ${catalina.home}/conf/context.xml as follows : You almost certainly don't want to do that. Entries in that file provide defaults for *every* web application. You have just exposed this datasource to every context on the Tomcat instance. Resource name=jdbc/mydb auth=Container type=javax.sql.DataSource driverClassName=org.postgresql.Driver url=jdbc:postgresql://dbhost:5437/dbname username=dbuser password=dbpasswd/ This declaration is fully functional as the same application relies on it for non-authentication related uses that actually work. I've tried putting the Realm declaration in the META-INF/context.xml file of my application, as follows : Context path=/myapp Realm className=org.apache.catalina.realm.DataSourceRealm auth=Container debug=99 dataSourceName=jdbc/mydb userTable=users userRoleTable=roles userNameCol=name userCredCol=password roleNameCol=role digest=SHA-1 / /Context (As I'm (re)deploying the app quite frequently I cannot put this declaration in the ${catalina.home}/conf/server.xml file, if I'm right). Wrong. There is nothing stopping you defining the resource in server.xml. The following changes should fix this: - move the resource definition to server.xml (under GlobalResources) - add a resource link to META-INF/context.xml that is included with the WAR - leave the Realm in META-INF/context.xml If you do decide to more the Resource definition to META-INF/context.xml rather than server.xml then you'll need to add the localDataSource=true the the Realm definition. Mark - 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: Async servlets and Tomcat 7 vs. mod_jk
On 02/05/2011 22:49, Jess Holle wrote: What are the limitations/requirements of using asynchronous servlets in Tomcat 7? We use Apache and mod_jk to balance load over multiple Tomcats. I note that there is no NIO AJP connector -- only BIO and APR. I have /no /interest in the native APR connectors -- as it's simply /*far* /too painful to produce 7 different native builds of this (some on platforms with unbelievably horrific linkers). What does this mean for us? Does this mean asynchronous servlets won't work for us? Or that they'll work, but we won't actually reduce the thread usage in Tomcat at all? They'll work, and you'll see decreased thread usage will all connectors including HTTP-BIO and AJP-BIO. However, it isn't quite that simple. With Servlet 3 async requests in progress, Tomcat will have more concurrent connections than it is using threads to process them since some of those connections will be associated with async requests that are currently 'paused'. Since maxThreads still controls the number of maximum threads then this means BIO now supports more concurrent connections than there are threads available. This causes a different problem. When there are more connections than threads, Tomcat needs to know which connection service next when a thread becomes available. With NIO and APR this is easy since they support non-blocking IO. Add all the connections to a poller and then poller will signal when one of the connections has some data to read. This connection can then be passed to a thread for processing. With BIO pollers simply aren't available. The current BIO implementation adds the connections to a queue and they are processed in turn as threads become available. This can create some unepxected behaviours. Consider the following: maxThreads = 200 connectionTimeout = 5000 connections = 1000, all in http keep-alive In the worst case scenario if those 1000 connections enter keep-alive around same time, a new connection is going to wait more than 25 seconds to be processed. Let me explain why: 1001 connections in keep-alive, 200 of which are assigned to threads 5s later, those 200 threads timeout the connection and are passed the next 200 connections to process now 801 connections in keep-alive, 200 of which are assigned to threads another 5 seconds, those 200 threads timeout now 601 connections another 5s... now 401 connections another 5s... now 201 connections another 5s now 1 connection left in the queue (the new one) this now gets processed. So despite there being nothing to process in those 1000 keep-alive connections, the new connection where there was data took 25s+ to process. Part of this is due to a TODO in the BIO connector (that is fixed for the next release). Timeouts where calculated from when the thread started processing the connection, not from when the connection entered the kepp-alive state (i.e. when it was added to the processing queue). With this bug fixed, the new connection in the scenario above would wait just over 5 seconds. I am currently working on simulating polling with the BIO connector. The good news is that it works but the price is significantly increased CPU usage. In my tests CPU usage increased from ~38% to 51% when simulated polling is used. I haven't completed the patch and once committed the other committers may not like it so keep an eye on the dev list for the eventual solution but I am currently working towards something along the lines of: maxThreads defaults to 200 (as it does now) maxConnections defaults to maxThreads (currently defaults to 1) maxConnections =maxThreads do nothing maxConnections maxThreads enable pollTime (new feature, defaults to 100ms) The recommendation will be not to set maxConnections maxThreads without a lot of performance testing and to use NIO or APR instead if at all possible. pollTime is how long a thread waits for data on a connection before putting it back in the connection queue. By using this, Tomcat effectively scans through the current connections looking for data to process. Gong back to my example above this would mean the new connection waiting ~0.5s before being processed. Not ideal, but better than the 5s it was. As I write this it occurs to me that an AJP-NIO connector would be a big help to you here. I don't know how much work that would be to write but with the refactoring already completed for Tomcat 7 it might be as little as 1000 lines of code. If you would be interested in such a connector create an enhancement request in Bugzilla. In Apache, I note that there are noises about broader/better support for the mod_event MPM worker. Does mod_jk work with mod_event there to reduce the threads required in Apache? Sorry, don't know. I have relatively little to do with the native mod_jk code. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail:
default document doesnot work with IIS
HI, Though default document is set in IIS ,it doesn't seem to pick it up when IIS connector is configured with tomcat. When we provide the path like http://localhost/test it doesn't automatically add index.cfm and it return 404,but if I access the full url like http://localhost/test/index.cfm it works fine. Thanks, Asha
Re: Async servlets and Tomcat 7 vs. mod_jk
On 5/3/2011 3:18 AM, Mark Thomas wrote: As I write this it occurs to me that an AJP-NIO connector would be a big help to you here. I don't know how much work that would be to write but with the refactoring already completed for Tomcat 7 it might be as little as 1000 lines of code. If you would be interested in such a connector create an enhancement request in Bugzilla. That would almost certainly be the biggest help to me, yes. While I have nothing against Apache HTTPD or APR in theory, in practice native builds (and bugs) across numerous platforms are just too much to deal with. In Apache, I note that there are noises about broader/better support for the mod_event MPM worker. Does mod_jk work with mod_event there to reduce the threads required in Apache? Sorry, don't know. I have relatively little to do with the native mod_jk code. Thanks. I was hoping someone on this list could answer (Mladen?), but realize there are relatively few involved in mod_jk code. -- Jess Holle
Re: Async servlets and Tomcat 7 vs. mod_jk
On 5/3/2011 6:14 AM, Jess Holle wrote: On 5/3/2011 3:18 AM, Mark Thomas wrote: As I write this it occurs to me that an AJP-NIO connector would be a big help to you here. I don't know how much work that would be to write but with the refactoring already completed for Tomcat 7 it might be as little as 1000 lines of code. If you would be interested in such a connector create an enhancement request in Bugzilla. That would almost certainly be the biggest help to me, yes. While I have nothing against Apache HTTPD or APR in theory, in practice native builds (and bugs) across numerous platforms are just too much to deal with. Bug 51145 https://issues.apache.org/bugzilla/show_bug.cgi?id=51145 filed. -- Jess Holle
Changing embedded Tomcat from v6 to v7 causes InitialContext lookup to fail
(Note: this question is also on StackExchange at http://stackoverflow.com/questions/5866237/) I'm using JUnit test cases to exercise my web service using embedded Tomcat. Under Tomcat 6 everything was working fine, but when I switched my project to Tomcat 7 I'm coming unstuck. The code I was using for Tomcat 6: Embedded container = new Embedded(); container.setCatalinaHome(C:\\Program Files\\Apache Software Foundation\\Tomcat 7.0.11); container.setRealm(new MemoryRealm()); container.setName(Catalina); Engine engine = container.createEngine(); container.addEngine(engine); Host host = container.createHost(localhost, /DecoderServiceTest); Context rootContext = container.createContext(/DecoderServiceTest, System.getProperty(user.dir) + /build/web); host.addChild(rootContext); engine.setName(Catalina); engine.addChild(host); engine.setDefaultHost(localhost); container.addEngine(engine); Connector connector = container.createConnector(InetAddress.getLocalHost(), 4321, false); container.addConnector(connector); container.start(); I've changed my code to use the new org.apache.catalina.startup.Tomcat class (available in Tomcat 7) as follows: ** Tomcat tomcat = new Tomcat(); tomcat.setBaseDir(C:\\Program Files\\Apache Software Foundation\\Tomcat 7.0.11); tomcat.setPort(1234); tomcat.addWebApp(/DecoderServiceTest, System.getProperty(user.dir)+/build/web); tomcat.setHostname(localhost); tomcat.start(); ** The web application works when deployed to Tomcat 7 (in a non-embedded state - obviously not using any of the above code), but when I run it as an embedded server using the above Tomcat 7 code, I get JNDI InitialContext complaints. The constructor of my web service does the usual calls to setup a Context as follows: Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup(java:comp/env); int thumbnailSize = (Integer) envCtx.lookup(thumbnail-pixel-size); but I receive a NamingException with the message that Name java:comp is not bound in this Context when I try and create the envCtx variable. I assume that I've missed a configuration parameter in the setup of the embedded Tomcat 7 server but I haven't been able to put my finger on it. Can anyone suggest what I can try? I'm using Tomcat 7.0.11, Windows XP SP3 and NetBeans 7.0 Thanks. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Changing embedded Tomcat from v6 to v7 causes InitialContext lookup to fail
On 03/05/2011 12:54, Andrew Brock wrote: (Note: this question is also on StackExchange at http://stackoverflow.com/questions/5866237/) I'm using JUnit test cases to exercise my web service using embedded Tomcat. Under Tomcat 6 everything was working fine, but when I switched my project to Tomcat 7 I'm coming unstuck. I've changed my code to use the new org.apache.catalina.startup.Tomcat class (available in Tomcat 7) as follows: ** Tomcat tomcat = new Tomcat(); tomcat.setBaseDir(C:\\Program Files\\Apache Software Foundation\\Tomcat 7.0.11); tomcat.setPort(1234); tomcat.addWebApp(/DecoderServiceTest, System.getProperty(user.dir)+/build/web); tomcat.setHostname(localhost); tomcat.start(); Add the following before you start the instance: tomcat.enableNaming() Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: default document doesnot work with IIS
Maybe you have to set the index.cfm in a welcome attribute in the web.xml file in the conf folder? -Original Message- From: Asha K S [mailto:a...@adobe.com] Sent: Tuesday, May 03, 2011 6:01 AM To: tomcat-u...@jakarta.apache.org Subject: default document doesnot work with IIS HI, Though default document is set in IIS ,it doesn't seem to pick it up when IIS connector is configured with tomcat. When we provide the path like http://localhost/test it doesn't automatically add index.cfm and it return 404,but if I access the full url like http://localhost/test/index.cfm it works fine. Thanks, Asha - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: default document doesnot work with IIS
HI, Thanks a lot for the reply. Tried that too but doesn't seem to work :( Thanks, Asha -Original Message- From: Propes, Barry L [mailto:barry.l.pro...@citi.com] Sent: Tuesday, May 03, 2011 7:05 PM To: Tomcat Users List Subject: RE: default document doesnot work with IIS Maybe you have to set the index.cfm in a welcome attribute in the web.xml file in the conf folder? -Original Message- From: Asha K S [mailto:a...@adobe.com] Sent: Tuesday, May 03, 2011 6:01 AM To: tomcat-u...@jakarta.apache.org Subject: default document doesnot work with IIS HI, Though default document is set in IIS ,it doesn't seem to pick it up when IIS connector is configured with tomcat. When we provide the path like http://localhost/test it doesn't automatically add index.cfm and it return 404,but if I access the full url like http://localhost/test/index.cfm it works fine. Thanks, Asha - 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
100% CPU Usage when stopping Tomcat after OOM condition
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, Moments ago in our development environment, our webapp suffered an OOME after many re-reployments (we know we have an undeploy-related leak). When attempting to bounce Tomcat, the shutdown failed and I took a thread dump which included the one non-trivial thread shown below. I haven't looked at the code yet to see if there is some kind of loop around this code, but top reported 100% CPU usage from this process so I suspect something like that was happening. We are using TC 6.0.32 on Debian Lenny and Sun/Oracle 32-bit 1.6.0_22-b04 Server VM. This is less of a help request as it is an observation of an unfortunate situation: the OOME is clearly the real problem and has nothing to do with Tomcat itself. Unfortunately, after the OOME, Tomcat was unable to shut down gracefully and that could be a problem in and of itself. Thanks, - -chris Stack trace hung during shutdown: main prio=10 tid=0x08059400 nid=0x7da1 runnable [0xb7276000] java.lang.Thread.State: RUNNABLE at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2291) at java.lang.Class.getDeclaredFields(Class.java:1743) at org.apache.catalina.loader.WebappClassLoader.clearReferencesStaticFinal(WebappClassLoader.java:2034) at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1929) at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833) at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4913) - locked 0xb01a3e68 (a org.apache.catalina.core.StandardContext) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:932) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1357) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1328) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:326) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1094) - locked 0xb01a3cf0 (a org.apache.catalina.core.StandardHost) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1106) - locked 0xb0220538 (a org.apache.catalina.core.StandardEngine) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468) at org.apache.catalina.core.StandardService.stop(StandardService.java:604) - locked 0xb0220538 (a org.apache.catalina.core.StandardEngine) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788) at org.apache.catalina.startup.Catalina.stop(Catalina.java:662) at org.apache.catalina.startup.Catalina.start(Catalina.java:629) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3AD6MACgkQ9CaO5/Lv0PA8wwCfWLN7kwtFEhy/xgvBHIhr7jxR 93MAn3F101tNSYhmeO+yqEUElcGScTE+ =6Xnu -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: default document doesnot work with IIS
Oh, ok. Well then I'm not sure. Maybe in IIS you have to make the index.cfm the first choice in the default queue. As opposed to default.htm or index.htm. Maybe you also have to set both index.cfm and index.cfml ? -Original Message- From: Asha K S [mailto:a...@adobe.com] Sent: Tuesday, May 03, 2011 8:43 AM To: Tomcat Users List Subject: RE: default document doesnot work with IIS HI, Thanks a lot for the reply. Tried that too but doesn't seem to work :( Thanks, Asha -Original Message- From: Propes, Barry L [mailto:barry.l.pro...@citi.com] Sent: Tuesday, May 03, 2011 7:05 PM To: Tomcat Users List Subject: RE: default document doesnot work with IIS Maybe you have to set the index.cfm in a welcome attribute in the web.xml file in the conf folder? -Original Message- From: Asha K S [mailto:a...@adobe.com] Sent: Tuesday, May 03, 2011 6:01 AM To: tomcat-u...@jakarta.apache.org Subject: default document doesnot work with IIS HI, Though default document is set in IIS ,it doesn't seem to pick it up when IIS connector is configured with tomcat. When we provide the path like http://localhost/test it doesn't automatically add index.cfm and it return 404,but if I access the full url like http://localhost/test/index.cfm it works fine. Thanks, Asha - 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 100% CPU Usage when stopping Tomcat after OOM condition
On 03/05/2011 15:22, Christopher Schultz wrote: All, Moments ago in our development environment, our webapp suffered an OOME after many re-reployments (we know we have an undeploy-related leak). When attempting to bounce Tomcat, the shutdown failed and I took a thread dump which included the one non-trivial thread shown below. I haven't looked at the code yet to see if there is some kind of loop around this code, but top reported 100% CPU usage from this process so I suspect something like that was happening. We are using TC 6.0.32 on Debian Lenny and Sun/Oracle 32-bit 1.6.0_22-b04 Server VM. This is less of a help request as it is an observation of an unfortunate situation: the OOME is clearly the real problem and has nothing to do with Tomcat itself. Unfortunately, after the OOME, Tomcat was unable to shut down gracefully and that could be a problem in and of itself. After an OOME there are no guarantees as to the state of the JVM. That Tomcat is unable to shut down cleanly in that case is not suprising. Mark Thanks, -chris Stack trace hung during shutdown: main prio=10 tid=0x08059400 nid=0x7da1 runnable [0xb7276000] java.lang.Thread.State: RUNNABLE at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2291) at java.lang.Class.getDeclaredFields(Class.java:1743) at org.apache.catalina.loader.WebappClassLoader.clearReferencesStaticFinal(WebappClassLoader.java:2034) at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1929) at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833) at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4913) - locked 0xb01a3e68 (a org.apache.catalina.core.StandardContext) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:932) at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1357) at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1328) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:326) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1094) - locked 0xb01a3cf0 (a org.apache.catalina.core.StandardHost) at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1106) - locked 0xb0220538 (a org.apache.catalina.core.StandardEngine) at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468) at org.apache.catalina.core.StandardService.stop(StandardService.java:604) - locked 0xb0220538 (a org.apache.catalina.core.StandardEngine) at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788) at org.apache.catalina.startup.Catalina.stop(Catalina.java:662) at org.apache.catalina.startup.Catalina.start(Catalina.java:629) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) - 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: 100% CPU Usage when stopping Tomcat after OOM condition
Mark Thomas wrote: On 03/05/2011 15:22, Christopher Schultz wrote: All, Moments ago in our development environment, our webapp suffered an OOME after many re-reployments (we know we have an undeploy-related leak). When attempting to bounce Tomcat, the shutdown failed and I took a thread dump which included the one non-trivial thread shown below. I haven't looked at the code yet to see if there is some kind of loop around this code, but top reported 100% CPU usage from this process so I suspect something like that was happening. We are using TC 6.0.32 on Debian Lenny and Sun/Oracle 32-bit 1.6.0_22-b04 Server VM. This is less of a help request as it is an observation of an unfortunate situation: the OOME is clearly the real problem and has nothing to do with Tomcat itself. Unfortunately, after the OOME, Tomcat was unable to shut down gracefully and that could be a problem in and of itself. After an OOME there are no guarantees as to the state of the JVM. That Tomcat is unable to shut down cleanly in that case is not suprising. Do I not remember seeing somewhere, at some point, a parameter named OOMParachute or similar ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Restarting Tomcat remotely
On 03/05/2011 12:29 AM, Asha K S wrote: Hi, Can anybody please let me know if there is way to start/stop Tomcat remotely(Not start/stop of applications but server itself) Thanks, Asha What operating system? For Linux, you just need to make the shutdown and startup scripts run. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 100% CPU Usage when stopping Tomcat after OOM condition
On 03/05/2011 15:46, André Warnier wrote: Mark Thomas wrote: On 03/05/2011 15:22, Christopher Schultz wrote: All, Moments ago in our development environment, our webapp suffered an OOME after many re-reployments (we know we have an undeploy-related leak). When attempting to bounce Tomcat, the shutdown failed and I took a thread dump which included the one non-trivial thread shown below. I haven't looked at the code yet to see if there is some kind of loop around this code, but top reported 100% CPU usage from this process so I suspect something like that was happening. We are using TC 6.0.32 on Debian Lenny and Sun/Oracle 32-bit 1.6.0_22-b04 Server VM. This is less of a help request as it is an observation of an unfortunate situation: the OOME is clearly the real problem and has nothing to do with Tomcat itself. Unfortunately, after the OOME, Tomcat was unable to shut down gracefully and that could be a problem in and of itself. After an OOME there are no guarantees as to the state of the JVM. That Tomcat is unable to shut down cleanly in that case is not suprising. Do I not remember seeing somewhere, at some point, a parameter named OOMParachute or similar ? Yes, in the NIO connector. It may, or may not, provide the JVM with enough memory to exit gracefully. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: default document doesnot work with IIS
Asha, What CFML server are you using and what method did you use to install it? There is quite a bit of documentation on how to get the default document working with the open-source CFML engines and if I knew what you were using, I could point you in the right direction. -Jordan - Original Message - From: Barry L Propes barry.l.pro...@citi.com To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, May 3, 2011 7:36:38 AM Subject: RE: default document doesnot work with IIS Oh, ok. Well then I'm not sure. Maybe in IIS you have to make the index.cfm the first choice in the default queue. As opposed to default.htm or index.htm. Maybe you also have to set both index.cfm and index.cfml ? -Original Message- From: Asha K S [mailto:a...@adobe.com] Sent: Tuesday, May 03, 2011 8:43 AM To: Tomcat Users List Subject: RE: default document doesnot work with IIS HI, Thanks a lot for the reply. Tried that too but doesn't seem to work :( Thanks, Asha -Original Message- From: Propes, Barry L [mailto:barry.l.pro...@citi.com] Sent: Tuesday, May 03, 2011 7:05 PM To: Tomcat Users List Subject: RE: default document doesnot work with IIS Maybe you have to set the index.cfm in a welcome attribute in the web.xml file in the conf folder? -Original Message- From: Asha K S [mailto:a...@adobe.com] Sent: Tuesday, May 03, 2011 6:01 AM To: tomcat-u...@jakarta.apache.org Subject: default document doesnot work with IIS HI, Though default document is set in IIS ,it doesn't seem to pick it up when IIS connector is configured with tomcat. When we provide the path like http://localhost/test it doesn't automatically add index.cfm and it return 404,but if I access the full url like http://localhost/test/index.cfm it works fine. Thanks, Asha - 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 - 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: Restarting Tomcat remotely
I use SC which allows you to communication with a remote Service Control Manager on an NT platform to stop the Tomcat service; deploy the WAR file and then restart the server in one simple execution. On *nix you could use some flavor of an secure shell script to stop the process, do your secure copy and then secure shell to restart the application server. -Original Message- From: Asha K S [mailto:a...@adobe.com] Sent: Monday, May 02, 2011 11:30 PM To: tomcat-u...@jakarta.apache.org Subject: Restarting Tomcat remotely Hi, Can anybody please let me know if there is way to start/stop Tomcat remotely(Not start/stop of applications but server itself) Thanks, Asha - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
What is JAVA_HOME?
What is the use of the Java Home directory to Tomcat.What are the files of the Java installation that Tomcat uses?I am asking this to determine the set of files and their Home directory which should be set as JAVA_HOME Varuna - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: What is JAVA_HOME?
From: Varuna Seneviratna [mailto:varunasenevira...@gmail.com] Subject: What is JAVA_HOME? What is the use of the Java Home directory to Tomcat.What are the files of the Java installation that Tomcat uses?I am asking this to determine the set of files and their Home directory which should be set as JAVA_HOME Read the doc. To quote from RUNNING.txt: (1) Download and Install the Java SE Runtime Environment (JRE) (1.1) Download the Java SE Runtime Environment (JRE), release version 6.0 or later, from http://www.oracle.com/technetwork/java/javase/downloads/index.html (1.2) Install the JRE according to the instructions included with the release. (1.3) Set an environment variable named JRE_HOME to the pathname of the directory into which you installed the JRE, e.g. c:\jre6.0 or /usr/local/java/jre6.0. NOTE: You may also use the full JDK rather than just the JRE. In this case set your JAVA_HOME environment variable to the pathname of the directory into which you installed the JDK, e.g. c:\jdk6.0 or /usr/local/java/jdk6.0. - 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: What is JAVA_HOME?
On 3 May 2011 22:21, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Varuna Seneviratna [mailto:varunasenevira...@gmail.com] Subject: What is JAVA_HOME? What is the use of the Java Home directory to Tomcat.What are the files of the Java installation that Tomcat uses?I am asking this to determine the set of files and their Home directory which should be set as JAVA_HOME Read the doc. To quote from RUNNING.txt: (1) Download and Install the Java SE Runtime Environment (JRE) (1.1) Download the Java SE Runtime Environment (JRE), release version 6.0 or later, from http://www.oracle.com/technetwork/java/javase/downloads/index.html (1.2) Install the JRE according to the instructions included with the release. (1.3) Set an environment variable named JRE_HOME to the pathname of the directory into which you installed the JRE, e.g. c:\jre6.0 or /usr/local/java/jre6.0. NOTE: You may also use the full JDK rather than just the JRE. In this case set your JAVA_HOME environment variable to the pathname of the directory into which you installed the JDK, e.g. c:\jdk6.0 or /usr/local/java/jdk6.0. - 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. How to set environment variables permanently.Without having to set each time it is needed to be used. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: What is JAVA_HOME?
Depends on your OS and how you start tomcat (startup script or as a service). --David On 5/3/2011 1:43 PM, Varuna Seneviratna wrote: On 3 May 2011 22:21, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Varuna Seneviratna [mailto:varunasenevira...@gmail.com] Subject: What is JAVA_HOME? What is the use of the Java Home directory to Tomcat.What are the files of the Java installation that Tomcat uses?I am asking this to determine the set of files and their Home directory which should be set as JAVA_HOME Read the doc. To quote from RUNNING.txt: (1) Download and Install the Java SE Runtime Environment (JRE) (1.1) Download the Java SE Runtime Environment (JRE), release version 6.0 or later, from http://www.oracle.com/technetwork/java/javase/downloads/index.html (1.2) Install the JRE according to the instructions included with the release. (1.3) Set an environment variable named JRE_HOME to the pathname of the directory into which you installed the JRE, e.g. c:\jre6.0 or /usr/local/java/jre6.0. NOTE: You may also use the full JDK rather than just the JRE. In this case set your JAVA_HOME environment variable to the pathname of the directory into which you installed the JDK, e.g. c:\jdk6.0 or /usr/local/java/jdk6.0. - 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. How to set environment variables permanently.Without having to set each time it is needed to be used. - 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: What is JAVA_HOME?
On 3 May 2011 23:16, David Smith david.sm...@cornell.edu wrote: Depends on your OS and how you start tomcat (startup script or as a service). --David On 5/3/2011 1:43 PM, Varuna Seneviratna wrote: On 3 May 2011 22:21, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Varuna Seneviratna [mailto:varunasenevira...@gmail.com] Subject: What is JAVA_HOME? What is the use of the Java Home directory to Tomcat.What are the files of the Java installation that Tomcat uses?I am asking this to determine the set of files and their Home directory which should be set as JAVA_HOME Read the doc. To quote from RUNNING.txt: (1) Download and Install the Java SE Runtime Environment (JRE) (1.1) Download the Java SE Runtime Environment (JRE), release version 6.0 or later, from http://www.oracle.com/technetwork/java/javase/downloads/index.html (1.2) Install the JRE according to the instructions included with the release. (1.3) Set an environment variable named JRE_HOME to the pathname of the directory into which you installed the JRE, e.g. c:\jre6.0 or /usr/local/java/jre6.0. NOTE: You may also use the full JDK rather than just the JRE. In this case set your JAVA_HOME environment variable to the pathname of the directory into which you installed the JDK, e.g. c:\jdk6.0 or /usr/local/java/jdk6.0. - 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. How to set environment variables permanently.Without having to set each time it is needed to be used. - 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 I am using Fedora 14 at the time if that is so what is the way to do it? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: What is JAVA_HOME?
Varuna Seneviratna wrote: On 3 May 2011 23:16, David Smith david.sm...@cornell.edu wrote: Depends on your OS and how you start tomcat (startup script or as a service). --David On 5/3/2011 1:43 PM, Varuna Seneviratna wrote: On 3 May 2011 22:21, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Varuna Seneviratna [mailto:varunasenevira...@gmail.com] Subject: What is JAVA_HOME? What is the use of the Java Home directory to Tomcat.What are the files of the Java installation that Tomcat uses?I am asking this to determine the set of files and their Home directory which should be set as JAVA_HOME Read the doc. To quote from RUNNING.txt: (1) Download and Install the Java SE Runtime Environment (JRE) (1.1) Download the Java SE Runtime Environment (JRE), release version 6.0 or later, from http://www.oracle.com/technetwork/java/javase/downloads/index.html (1.2) Install the JRE according to the instructions included with the release. (1.3) Set an environment variable named JRE_HOME to the pathname of the directory into which you installed the JRE, e.g. c:\jre6.0 or /usr/local/java/jre6.0. NOTE: You may also use the full JDK rather than just the JRE. In this case set your JAVA_HOME environment variable to the pathname of the directory into which you installed the JDK, e.g. c:\jdk6.0 or /usr/local/java/jdk6.0. - 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. How to set environment variables permanently.Without having to set each time it is needed to be used. - 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 I am using Fedora 14 at the time if that is so what is the way to do it? In the bin directory of Tomcat (*), create (or edit) a script named setenv.sh, and put the definitions there. At least, if you downloaded and installed tomcat from the tomcat website. If you are using a Fedora package, then you should ask the people who created that package. (*) where you should also find scripts named catalina.sh and startup.sh. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: What is JAVA_HOME?
From: Varuna Seneviratna varunasenevira...@gmail.com To: Tomcat Users List users@tomcat.apache.org; david.sm...@cornell.edu Cc: Sent: Tuesday, May 3, 2011 10:48 AM Subject: Re: What is JAVA_HOME? On 3 May 2011 23:16, David Smith david.sm...@cornell.edu wrote: Depends on your OS and how you start tomcat (startup script or as a service). --David On 5/3/2011 1:43 PM, Varuna Seneviratna wrote: On 3 May 2011 22:21, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Varuna Seneviratna [mailto:varunasenevira...@gmail.com] Subject: What is JAVA_HOME? What is the use of the Java Home directory to Tomcat.What are the files of the Java installation that Tomcat uses?I am asking this to determine the set of files and their Home directory which should be set as JAVA_HOME Read the doc. To quote from RUNNING.txt: (1) Download and Install the Java SE Runtime Environment (JRE) (1.1) Download the Java SE Runtime Environment (JRE), release version 6.0 or later, from http://www.oracle.com/technetwork/java/javase/downloads/index.html (1.2) Install the JRE according to the instructions included with the release. (1.3) Set an environment variable named JRE_HOME to the pathname of the directory into which you installed the JRE, e.g. c:\jre6.0 or /usr/local/java/jre6.0. NOTE: You may also use the full JDK rather than just the JRE. In this case set your JAVA_HOME environment variable to the pathname of the directory into which you installed the JDK, e.g. c:\jdk6.0 or /usr/local/java/jdk6.0. - 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. How to set environment variables permanently.Without having to set each time it is needed to be used. - 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 I am using Fedora 14 at the time if that is so what is the way to do it? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org One way to do this globally for Fedora 14 is to create a custom.sh file in /etc/profile.d. Place the values in there. For example: JAVA_HOME=where you installed the JDK JRE_HOME=where you installed the JRE export JAVA_HOME JRE_HOME This suggestion is taken from the comments in /etc/profile. just my two cents . . . /mde/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: 100% CPU Usage when stopping Tomcat after OOM condition
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 5/3/2011 10:52 AM, Mark Thomas wrote: On 03/05/2011 15:46, André Warnier wrote: Mark Thomas wrote: On 03/05/2011 15:22, Christopher Schultz wrote: All, Moments ago in our development environment, our webapp suffered an OOME after many re-reployments (we know we have an undeploy-related leak). When attempting to bounce Tomcat, the shutdown failed and I took a thread dump which included the one non-trivial thread shown below. I haven't looked at the code yet to see if there is some kind of loop around this code, but top reported 100% CPU usage from this process so I suspect something like that was happening. We are using TC 6.0.32 on Debian Lenny and Sun/Oracle 32-bit 1.6.0_22-b04 Server VM. This is less of a help request as it is an observation of an unfortunate situation: the OOME is clearly the real problem and has nothing to do with Tomcat itself. Unfortunately, after the OOME, Tomcat was unable to shut down gracefully and that could be a problem in and of itself. After an OOME there are no guarantees as to the state of the JVM. That Tomcat is unable to shut down cleanly in that case is not suprising. Chuck's assertion is that an OOME isn't fatal to the JVM but almost always fatal to the application since it's unlikely equipped to handle the bizarre situations that arise from it's occurrence. A bit of a hair-split if you ask me, but it's always worth examining any options TC has to at least be able to stop itself gracefully. Do I not remember seeing somewhere, at some point, a parameter named OOMParachute or similar ? Yes, in the NIO connector. It may, or may not, provide the JVM with enough memory to exit gracefully. Since this is a PegmGen issue, it's unlikely that the NIO connector's OOM parachute will help, here. Also, I'm not using the NIO connector :) Any reason the parachute is in the /connector/ and not somewhere more universal? I was mostly interested in why I was getting 100% CPU usage... checking the code, I *do* see a loop in WebappClassLoader.clearReferencesStaticFinal but it's over an iterator that will presumably run out of entries. The CPU spike seems to be happening within the native code in java.lang.Class.getDeclaredFields, so there's nothing TC can do to prevent it. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3AWvEACgkQ9CaO5/Lv0PAodwCfUxrRVV0TZihjiS1d6QwF1LCo 8PgAn3jOrCy4IvUTe4diJ68gGrqIyQXZ =Ys5e -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Async servlets and Tomcat 7 vs. mod_jk
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 5/3/2011 4:18 AM, Mark Thomas wrote: In Apache, I note that there are noises about broader/better support for the mod_event MPM worker. Does mod_jk work with mod_event there to reduce the threads required in Apache? Sorry, don't know. I have relatively little to do with the native mod_jk code. I'm also not sure about mod_jk support for mod_event, but at ApacheCon one of the presenters said that httpd 2.4 will have the event MPM as the default. Given that, looking to get mod_jk working well with the event MPM sounds like a good thing for us to do. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3AXaoACgkQ9CaO5/Lv0PA/QACgi+hzO65le7nTGCga+mnhTx5G 19sAn3uG3G0Fd/bk4qsGRWAReA0aQEbM =wBe7 -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 Struts 1.3
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 cpanon, On 5/2/2011 4:04 PM, cpanon wrote: Thank you for your attention. No problem. What is odd and almost answers all the questions, leaving the BIG one, is that all three techniques work the first time. Hah... that actually raises more questions than answers IMO. That means that all the resolving, mapping and substitution work. The proxy names are all resolved in the framset(not shown), tiles and jsp:include. In the second state what I expected is the recompiling of the ccAuth15_soDetail_fragment.jsp, caching the other areas and presenting the different view to the client. By nothing I mean that the original view is shown even thought I know, via setting a breakpoint, I hit the second state but do now show the proper jsp. Why would the JSP be recompiled? You aren't changing the code, so it should just be re-running the already-compiled code. Maybe you're not explaining it well enough for me to understand. Are you sure you don't somehow hit the first state again somehow? I have read this about the attribute antiResourceLocking, however that was in 5.5 and I assume it is fully fixed or know(no google cit it), but 6.0.30. Does this help with any further ideas? anti resource locking has mostly do to with not performing file-locking on .jar files that your webapp uses. If you're having problems undeploying webapps where the files aren't being deleted, you may have to mess with this setting. It does not appear to be related to anything you are doing. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3AYNIACgkQ9CaO5/Lv0PDeLQCdGpAQd4la81wZWYfqwDIG9qYB T5kAoLmk8CtM2sjdqwMhMBaymKUebjJu =Yqxy -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: modjk apache response questions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 5/2/2011 12:40 PM, André Warnier wrote: He has 3 tomcats though. Or did I misread that ? Oh, well, there still might be a problem. No httpd configuration was shown (only workers.properties), so there are still situations where the connections can be way-off. For instance, if session stickiness is used and you get very unlucky, it's possible that two Tomcat backends will sit idle while the third will be handling 100% of the traffic. If that instance only has 500 connections available, there will be 1500 active connections bearing-down on it. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3AYc8ACgkQ9CaO5/Lv0PCSVACfYPoX2a1FCZ+yYEgEhcW8Ofrt nuEAnRPsvhBuqbpkuLiVNHyOmPR0d9Qi =72aF -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: pure tomcat failover (no loadbalacing)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Felix, On 5/2/2011 12:20 PM, Felix Schumacher wrote: That would be nice, if it would work, but sadly it doesn't. redirect is only alowed for a sub-worker, which is referenced indirectly by a load balancer group. See http://tomcat.apache.org/connectors-doc/reference/workers.html Aw, crap. I didn't notice the SUB worker type restriction while reading the docs. Sorry for the noise. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3AYncACgkQ9CaO5/Lv0PD6QgCgmIPofWHEvMVlrJ8+2AYoKZRz g5YAn2fUPL4yOCRVwEI481CVmwVAle7b =+dIS -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Can anybody Please tell me How to Configure Tomcat 5 on Fedora 14 or refer me to relevant documentation.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Varuna, On 5/2/2011 2:19 PM, Varuna Seneviratna wrote: I wont't Tomcat5 becauseI want to study for the SWCDE Exam which uses Tomcat5 Assuming you mean SCWCD, I can tell you you're going to have a rough road ahead of you. Obtaining this certification will be tough for you if you are asking questions such as what should JAVA_HOME be set to and how do I do that?. Good luck, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3AbOsACgkQ9CaO5/Lv0PCsCQCeMXVqB8S61QCwFrX5hmSS4wGo CPoAoLjeLBkAwmJFrvEMvRY4RcUCw2XO =hCua -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: modjk apache response questions
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 5/2/2011 12:40 PM, André Warnier wrote: He has 3 tomcats though. Or did I misread that ? Oh, well, there still might be a problem. No httpd configuration was shown (only workers.properties), so there are still situations where the connections can be way-off. For instance, if session stickiness is used and you get very unlucky, it's possible that two Tomcat backends will sit idle while the third will be handling 100% of the traffic. If that instance only has 500 connections available, there will be 1500 active connections bearing-down on it. :( Yes. Session stickines is used, and this scenario has been mentioned. I have been trying to get the OP to use the standard Apache ab program, with a simple request to a static page, to make sure that this was not the case, in conditions that we can relate to. Unfortunately, he does not seem convinced by the need to do so, so it is a bit difficult to help further in that case. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Async servlets and Tomcat 7 vs. mod_jk
On 5/3/2011 2:55 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 5/3/2011 4:18 AM, Mark Thomas wrote: In Apache, I note that there are noises about broader/better support for the mod_event MPM worker. Does mod_jk work with mod_event there to reduce the threads required in Apache? Sorry, don't know. I have relatively little to do with the native mod_jk code. I'm also not sure about mod_jk support for mod_event, but at ApacheCon one of the presenters said that httpd 2.4 will have the event MPM as the default. Given that, looking to get mod_jk working well with the event MPM sounds like a good thing for us to do. If mod_event is going to be the default, then ensuring mod_jk works well with it sounds like a rather critical thing to do. -- Jess Holle - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: modjk apache response questions
Hi i have done testing as required using ab- please find details :. Please let me knw if anything other details required. Is this always manadatory that maxthread in tomcat shoud equal to maxclient(apache)? in my case traffic always distributes among 3 tomcats so i assume to give 500 maxthread on each tomcat(also high values for maxthread in tomcat not recomended) Not sure if following worker setting is proper? *http.conf* IfModule mpm_worker_module ServerLimit 50 StartServers 2 MaxClients 1500 MinSpareThreads 50 MaxSpareThreads 600 ThreadsPerChild 50 MaxRequestsPerChild 0 /IfModule *Server.xml(for three tomcat)*** Connector port=8008 enableLookups=false redirectPort=8443 maxThreads=500 minSpareThreads=25 maxSpareThreads=75 acceptCount=100 protocol=AJP/1.3 / *TEST* # ./ab -n 150 -c 50 http://10.58.116.20/test/test.html This is ApacheBench, Version 2.3 $Revision: 655654 $ Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 10.58.116.20 (be patient).done Server Software:Apache/2.2.17 Server Hostname:10.58.116.20 Server Port:80 Document Path: /test/test.html Document Length:104 bytes Concurrency Level: 50 Time taken for tests: 0.369 seconds Complete requests: 150 Failed requests:0 Write errors: 0 Total transferred: 52500 bytes HTML transferred: 15600 bytes Requests per second:406.96 [#/sec] (mean) Time per request: 122.863 [ms] (mean) Time per request: 2.457 [ms] (mean, across all concurrent requests) Transfer rate: 139.10 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect:01 0.3 1 1 Processing: 1 112 111.2 84 337 Waiting:1 112 111.2 84 337 Total: 1 113 111.3 85 338 Percentage of the requests served within a certain time (ms) 50% 85 66%141 75%185 80%215 90%330 95%335 98%336 99%337 100%338 (longest request) *]# ./ab -n 3000 -c 1000 **http://10.58.116.20/test/test.html*** This is ApacheBench, Version 2.3 $Revision: 655654 $ Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 10.58.116.20 (be patient) Completed 300 requests Completed 600 requests Completed 900 requests Completed 1200 requests Completed 1500 requests Completed 1800 requests Completed 2100 requests Completed 2400 requests Completed 2700 requests Completed 3000 requests Finished 3000 requests Server Software:Apache/2.2.17 Server Hostname:10.58.116.20 Server Port:80 Document Path: /test/test.html Document Length:104 bytes Concurrency Level: 1000 Time taken for tests: 7.246 seconds Complete requests: 3000 Failed requests:0 Write errors: 0 Total transferred: 105 bytes HTML transferred: 312000 bytes Requests per second:414.00 [#/sec] (mean) Time per request: 2415.471 [ms] (mean) Time per request: 2.415 [ms] (mean, across all concurrent requests) Transfer rate: 141.50 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect:0 31 277.8 03001 Processing: 1 1384 2297.01367218 Waiting:1 1383 2296.01367217 Total: 57 1415 2308.51407246 Percentage of the requests served within a certain time (ms) 50%140 66%326 75% 1756 80% 3103 90% 6392 95% 6670 98% 7065 99% 7175 100% 7246 (longest request) On Wed, May 4, 2011 at 2:55 AM, André Warnier a...@ice-sa.com wrote: Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 5/2/2011 12:40 PM, André Warnier wrote: He has 3 tomcats though. Or did I misread that ? Oh, well, there still might be a problem. No httpd configuration was shown (only workers.properties), so there are still situations where the connections can be way-off. For instance, if session stickiness is used and you get very unlucky, it's possible that two Tomcat backends will sit idle while the third will be handling 100% of the traffic. If that instance only has 500 connections available, there will be 1500 active connections bearing-down on it. :( Yes. Session stickines is used, and this scenario has been mentioned. I have been trying to get the OP to use the standard Apache ab program, with a simple request to a static page, to make sure that
Re: 100% CPU Usage when stopping Tomcat after OOM condition
Christopher Schultz ch...@christopherschultz.net schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 5/3/2011 10:52 AM, Mark Thomas wrote: On 03/05/2011 15:46, André Warnier wrote: Mark Thomas wrote: On 03/05/2011 15:22, Christopher Schultz wrote: All, Moments ago in our development environment, our webapp suffered an OOME after many re-reployments (we know we have an undeploy-related leak). When attempting to bounce Tomcat, the shutdown failed and I took a thread dump which included the one non-trivial thread shown below. I haven't looked at the code yet to see if there is some kind of loop around this code, but top reported 100% CPU usage from this process so I suspect something like that was happening. We are using TC 6.0.32 on Debian Lenny and Sun/Oracle 32-bit 1.6.0_22-b04 Server VM. This is less of a help request as it is an observation of an unfortunate situation: the OOME is clearly the real problem and has nothing to do with Tomcat itself. Unfortunately, after the OOME, Tomcat was unable to shut down gracefully and that could be a problem in and of itself. After an OOME there are no guarantees as to the state of the JVM. That Tomcat is unable to shut down cleanly in that case is not suprising. Chuck's assertion is that an OOME isn't fatal to the JVM but almost always fatal to the application since it's unlikely equipped to handle the bizarre situations that arise from it's occurrence. A bit of a hair-split if you ask me, but it's always worth examining any options TC has to at least be able to stop itself gracefully. Do I not remember seeing somewhere, at some point, a parameter named OOMParachute or similar ? Yes, in the NIO connector. It may, or may not, provide the JVM with enough memory to exit gracefully. Since this is a PegmGen issue, it's unlikely that the NIO connector's OOM parachute will help, here. Also, I'm not using the NIO connector :) Any reason the parachute is in the /connector/ and not somewhere more universal? I was mostly interested in why I was getting 100% CPU usage... checking It could've been the garbage collector itself. Just yesterday I had an oom on permgen, which lead to a major-gc loop. I could see the loop nicely as I had enabled logging of gc activity with -Xloggc:$CATALINA_BASE/logs/gc.log -XX:+PrintGCDetails -XX:PrintGCTimeStamps Regards Felix the code, I *do* see a loop in WebappClassLoader.clearReferencesStaticFinal but it's over an iterator that will presumably run out of entries. The CPU spike seems to be happening within the native code in java.lang.Class.getDeclaredFields, so there's nothing TC can do to prevent it. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3AWvEACgkQ9CaO5/Lv0PAodwCfUxrRVV0TZihjiS1d6QwF1LCo 8PgAn3jOrCy4IvUTe4diJ68gGrqIyQXZ =Ys5e -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: default document doesnot work with IIS
HI Jordan, I am trying to deploy Adobe ColdFusion on Tomcat and configured Tomcat IIS connector, but I am not able to get the default document to work. Please point me to the links you had mentioned earlier, i will try those as well. Thanks, Asha -Original Message- From: Jordan Michaels [mailto:jor...@viviotech.net] Sent: Tuesday, May 03, 2011 9:08 PM To: Tomcat Users List Subject: Re: default document doesnot work with IIS Asha, What CFML server are you using and what method did you use to install it? There is quite a bit of documentation on how to get the default document working with the open-source CFML engines and if I knew what you were using, I could point you in the right direction. -Jordan - Original Message - From: Barry L Propes barry.l.pro...@citi.com To: Tomcat Users List users@tomcat.apache.org Sent: Tuesday, May 3, 2011 7:36:38 AM Subject: RE: default document doesnot work with IIS Oh, ok. Well then I'm not sure. Maybe in IIS you have to make the index.cfm the first choice in the default queue. As opposed to default.htm or index.htm. Maybe you also have to set both index.cfm and index.cfml ? -Original Message- From: Asha K S [mailto:a...@adobe.com] Sent: Tuesday, May 03, 2011 8:43 AM To: Tomcat Users List Subject: RE: default document doesnot work with IIS HI, Thanks a lot for the reply. Tried that too but doesn't seem to work :( Thanks, Asha -Original Message- From: Propes, Barry L [mailto:barry.l.pro...@citi.com] Sent: Tuesday, May 03, 2011 7:05 PM To: Tomcat Users List Subject: RE: default document doesnot work with IIS Maybe you have to set the index.cfm in a welcome attribute in the web.xml file in the conf folder? -Original Message- From: Asha K S [mailto:a...@adobe.com] Sent: Tuesday, May 03, 2011 6:01 AM To: tomcat-u...@jakarta.apache.org Subject: default document doesnot work with IIS HI, Though default document is set in IIS ,it doesn't seem to pick it up when IIS connector is configured with tomcat. When we provide the path like http://localhost/test it doesn't automatically add index.cfm and it return 404,but if I access the full url like http://localhost/test/index.cfm it works fine. Thanks, Asha - 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 - 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