Re: Tomcat 6.0.29 using more and more RAM until it collapses?
On 14/11/2010 19:11, André Warnier wrote: Great. For the using JMX clients page, may I recommend : http://code.google.com/p/jmxsh/ which for Java ignorami of my level, is a useful tool to do nifty things in a scripting (non-graphic) mode. I use it only for really simple things, but I have the feeling it can used for much more, such as the recurrent take n threads dumps at regular intervals kind of thing. Folks, This is a Wiki we are discussing. Anyone can edit it. Just create an account and start adding content. The content doesn't need to be perfect. Anything that adds to or improves what is already there - even if the change just adds a TODO - is good. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem in accessing jsp:useBean
On 15/11/2010 07:10, Rekha Ravi Pai wrote: Hi, I have installed tomcat-6.0.20 and postgresql-9.0.1 I have created a java bean PasswordEncryptService.java I have kept it in WEB-INF/classes/beans directory and in beans package. I compiled the java file and successfully ran the class and could enter a data in a table in pgsql database. I have created a jsp file under webapps/apps/InfoMgmt/secure directory. In this jsp file I imported the PasswordEncryptService class and used the bean under the tag jsp:useBean. But I am getting the following error. The value for the useBean class attribute PasswordEncryptService is invalid. Can anybody please, help me in resolving this issue? Not without you showing us the source for the simplest JSP and bean that recreates this issue. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Shutting down one instance of tomcat 6 from a listener
That's it! I have a single Tomcat/JVM instance but multiple applications running on it. In fact with System.exit(1) Tomcat is not completely stopped; it is still running but it hangs. I have to kill the process to terminate it. So, how to shut down properly the current application from a 'listener' leaving the other webapps deployed into Tomcat to continue their business? I was unsuccessful looking for some source code to do so. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: mardi 9 novembre 2010 20:52 To: Tomcat Users List Subject: Re: Shutting down one instance of tomcat 6 from a listener -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Patrick, On 11/9/2010 11:36 AM, Patrick Sauts wrote: I'm sorry I'm French. No problem: we can work around language difficulties. More explanation usually helps. Multiple cores, maybe? The number of CPU cores should not affect the number of instances that you have. As when you use the manager to deploy different web applications, several war. So, it sounds like you have a single Tomcat/JVM instance but multiple applications running on it. You want to have one of your webapps check some configuration and gracefully stop if there is a problem, leaving the other webapps deployed into Tomcat to continue their business. If that's the case, then calling System.exit will certainly cause Tomcat to become unstable, where unstable means completely stopped. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzZpk8ACgkQ9CaO5/Lv0PDIzwCeL7AFHpsLKcpNbRPprDxnPKRF yMUAoJSOfLBrIw0mvW/HlbRyKM7bl5Nj =olUO -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: Using mod_jk in cluster environment responds HTTP 500
Chris, Also one more information: None of my tomcat is configured with HTTP connector. They are configured only for AJP. Does the jkmanager requires this HTTP port? Any relation between the non-SSL HTTP connector and jkmanager? Regards. rikslovein wrote: Thanks for the quick response Chris. Please find the details given below: Let me know if you need more information. Thanks regards... Server.xml Connector port=8009 address=localhost enableLookups=false redirectPort=8443 protocol=AJP/1.3 / workers.properties: workers.tomcat_home=/opt/webhost/DWH-Tomcat-Inst/tomcat5.5.23 workers.java_home=/usr/lib/jvm/java-1.5.0 ps=/ worker.list=loadbal_hub_prod,jkstatus,hub0,hub1 worker.hub0.port=8009 worker.hub0.host=localhost worker.hub0.type=ajp13 worker.hub0.lbfactor=1 worker.hub0.redirect=hub1 worker.hub1.port=9009 worker.hub1.host=localhost worker.hub1.type=ajp13 worker.hub1.lbfactor=1 worker.hub1.redirect=hub0 worker.jkstatus.type=status worker.loadbal_hub_prod.type=lb worker.loadbal_hub_prod.balanced_workers=hub0,hub1 worker.loadbal_hub_prod.sticky_session=false Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rikslovein, On 11/12/2010 7:19 AM, rikslovein wrote: I've one apache and two tomcat installed in my server. The communication happens using AJP 1.3. I'm using the jkmanager URL to activate/deactivate the tomcat instances. Also, I'm making sure atleast one of the two tomcat instance is up when other one is down. The problem is sometimes the client request does go to deactivated tomcat instance resulting in HTTP 500 error. I want the request to be redirected only to the active tomcat instance and not the deactivated one. Please suggest how can I do this. Can you post your workers.properties file (minus any secrets) and also your Connector configuration from Tomcat's server.xml file? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzdY9oACgkQ9CaO5/Lv0PAt9ACeMGF7xMjQl3oM+qz66LP0cENS mEQAmwZ2pRzawrlcBaOlqOD3tXyES9ap =zsLx -END PGP SIGNATURE- - 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://old.nabble.com/Using-mod_jk-in-cluster-environment-responds-HTTP-500-tp30198809p30215578.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
Tomcat Going down Frequently
Hello team, Tomcat Server going down frequently with the following messages in the logs. kindly help. body { margin: 0pt; padding: 0pt; }td, div { font-family: Tahoma; font-size: 8pt; vertical-align: top; }body { margin: 0pt; padding: 0pt; }.transcript { background-color: rgb(210, 210, 210); }.messageBlock { margin-left: 4px; margin-bottom: 3px; }.message { margin-left: 100px; word-wrap: break-word; }.messageCont { margin-left: 100px; word-wrap: break-word; }.other { color: rgb(57, 87, 122); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.myself { color: rgb(218, 129, 3); font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont { font-size: 8px; text-align: right; color: rgb(57, 87, 122); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.myselfCont { font-size: 8px; text-align: right; color: rgb(218, 129, 3); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.system { margin-left: 4px; word-wrap: break-word; color: rgb(218, 129, 3); font-style: normal; font-weight: normal; }.showTimestamp { margin-right: 3px; float: right; color: rgb(153, 153, 153); font-style: normal; font-weight: normal; }.other1 { color: rgb(172, 32, 0); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont1 { font-size: 8px; text-align: right; color: rgb(172, 32, 0); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other2 { color: rgb(60, 159, 168); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont2 { font-size: 8px; text-align: right; color: rgb(60, 159, 168); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other3 { color: rgb(226, 86, 20); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont3 { font-size: 8px; text-align: right; color: rgb(226, 86, 20); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other4 { color: rgb(11, 106, 200); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont4 { font-size: 8px; text-align: right; color: rgb(11, 106, 200); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other5 { color: rgb(178, 50, 144); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont5 { font-size: 8px; text-align: right; color: rgb(178, 50, 144); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other6 { color: rgb(2, 231, 199); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont6 { font-size: 8px; text-align: right; color: rgb(2, 231, 199); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other7 { color: rgb(91, 50, 132); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont7 { font-size: 8px; text-align: right; color: rgb(91, 50, 132); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.tsDisplay { display: block; } Nov 12, 2010 1:29:23 PM org.apache.catalina.core.ContainerBase backgroundProcess WARNING: Exception processing manager org.apache.catalina.session.standardmana...@a20981 background process java.lang.IllegalStateException: getAttributeNames: Session already invalidated at org.apache.catalina.session.StandardSession.getAttributeNames(StandardSession.java:1052) at org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:120) at com.ericsson.mars.jspbean.LoginBean.logout(LoginBean.java:2366) at com.ericsson.mars.jspbean.LoginBean.valueUnbound(LoginBean.java:2450) at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1654) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:756) at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592) at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:680) at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:665) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at
Re: Tomcat Going down Frequently
Amol Puglia wrote: Hello team, Tomcat Server going down frequently with the following messages in the logs. kindly help. Hello Amol. If it is not too much of an inconvenience, would you kindly care to let us know which version of Tomcat this is, which JVM, on which platform, and where you got it from ? For info, there is a script in tomcat_dir/bin, named version.(sh|bat), which should print this all out nicely. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Going down Frequently
On 15/11/2010 11:35, André Warnier wrote: Amol Puglia wrote: Hello team, Tomcat Server going down frequently with the following messages in the logs. kindly help. Hello Amol. If it is not too much of an inconvenience, would you kindly care to let us know which version of Tomcat this is, which JVM, on which platform, and where you got it from ? And if all of the CSS content I saw in the previous email is actually in your logs? p For info, there is a script in tomcat_dir/bin, named version.(sh|bat), which should print this all out nicely. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: Shutting down one instance of tomcat 6 from a listener
On 15/11/2010 09:37, Patrick Sauts wrote: So, how to shut down properly the current application from a 'listener' leaving the other webapps deployed into Tomcat to continue their business? It depends on what the problem actually is, and when it occurs. If you do all of your initialisation in a ServletContextListener and throw an exception on fail, then the context won't start up. This is not the same as shutting it down after a certain period of time and after a fault condition occurs. Where is the code which is going to shut down the application? Presumably outside of the application itself? p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Re: Problem in accessing jsp:useBean
2010/11/15 Rekha Ravi Pai re...@softjin.com: The value for the useBean class attribute PasswordEncryptService is invalid. According to your description, your class name is beans.PasswordEncryptService. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Using mod_jk in cluster environment responds HTTP 500
awarnier, Thanks for your response. I changed this and still it didn't solve my problem. The request are still reaching to the server which I made down using jkmanager. Here's the updated workers.proeprties: worker.list=loadbal_hub_prod,jkstatus worker.loadbal_hub_prod.type=lb worker.loadbal_hub_prod.balance_workers=hub0,hub1 worker.loadbal_hub_prod.sticky_session=false worker.jkstatus.type=status worker.list=hub0 worker.hub0.port=8009 worker.hub0.host=localhost worker.hub0.type=ajp13 worker.hub0.lbfactor=1 #worker.hub0.redirect=hub1 worker.list=hub1 worker.hub1.port=9009 worker.hub1.host=localhost worker.hub1.type=ajp13 worker.hub1.lbfactor=1 #worker.hub1.redirect=hub0 Regards... awarnier wrote: rikslovein wrote: Thanks for the quick response Chris. Please find the details given below: Let me know if you need more information. Thanks regards... Server.xml Connector port=8009 address=localhost enableLookups=false redirectPort=8443 protocol=AJP/1.3 / workers.properties: workers.tomcat_home=/opt/webhost/DWH-Tomcat-Inst/tomcat5.5.23 workers.java_home=/usr/lib/jvm/java-1.5.0 The above 2 properties are obsolete (since a long time). Remove them. ps=/ I think this one too (not sure). worker.list=loadbal_hub_prod,jkstatus,hub0,hub1 This is wrong. If the workers are already balanced (by the loadbal_hub_prod balancer), then they should not be separately listed in worker.list. Correct : worker.list=loadbal_hub_prod,jkstatus worker.hub0.port=8009 worker.hub0.host=localhost worker.hub0.type=ajp13 worker.hub0.lbfactor=1 worker.hub0.redirect=hub1 worker.hub1.port=9009 worker.hub1.host=localhost worker.hub1.type=ajp13 worker.hub1.lbfactor=1 worker.hub1.redirect=hub0 worker.jkstatus.type=status worker.loadbal_hub_prod.type=lb worker.loadbal_hub_prod.balanced_workers=hub0,hub1 The property is balance_workers, not balanced_workers. worker.loadbal_hub_prod.balance_workers=hub0,hub1 (http://tomcat.apache.org/connectors-doc/generic_howto/loadbalancers.html) worker.loadbal_hub_prod.sticky_session=false Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rikslovein, On 11/12/2010 7:19 AM, rikslovein wrote: I've one apache and two tomcat installed in my server. The communication happens using AJP 1.3. I'm using the jkmanager URL to activate/deactivate the tomcat instances. Also, I'm making sure atleast one of the two tomcat instance is up when other one is down. The problem is sometimes the client request does go to deactivated tomcat instance resulting in HTTP 500 error. I want the request to be redirected only to the active tomcat instance and not the deactivated one. Please suggest how can I do this. Can you post your workers.properties file (minus any secrets) and also your Connector configuration from Tomcat's server.xml file? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzdY9oACgkQ9CaO5/Lv0PAt9ACeMGF7xMjQl3oM+qz66LP0cENS mEQAmwZ2pRzawrlcBaOlqOD3tXyES9ap =zsLx -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 -- View this message in context: http://old.nabble.com/Using-mod_jk-in-cluster-environment-responds-HTTP-500-tp30198809p30218786.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: Tomcat Going down Frequently
Hello Pid, Thanks for your response. We are using following versions of softwares. 1)Tomcat version :- 6.0.20 2)Jdk version :- jdk160_05 3)Operating System :- Solaris 5.10 4)Apache version :- 2.2.16 Also CSS contents are not form logs it came by mistake. Please help and let me know in case any information is required. --- On Mon, 11/15/10, Pid p...@pidster.com wrote: From: Pid p...@pidster.com Subject: Re: Tomcat Going down Frequently To: Tomcat Users List users@tomcat.apache.org Date: Monday, November 15, 2010, 5:09 PM On 15/11/2010 11:35, André Warnier wrote: Amol Puglia wrote: Hello team, Tomcat Server going down frequently with the following messages in the logs. kindly help. Hello Amol. If it is not too much of an inconvenience, would you kindly care to let us know which version of Tomcat this is, which JVM, on which platform, and where you got it from ? And if all of the CSS content I saw in the previous email is actually in your logs? p For info, there is a script in tomcat_dir/bin, named version.(sh|bat), which should print this all out nicely. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.29 using more and more RAM until it collapses?
André, On 14.11.2010 20:11, André Warnier wrote: For the using JMX clients page, may I recommend : http://code.google.com/p/jmxsh/ which for Java ignorami of my level, is a useful tool to do nifty things in a scripting (non-graphic) mode. I use it only for really simple things, but I have the feeling it can used for much more, such as the recurrent take n threads dumps at regular intervals kind of thing. I'm a bit disappointed. I thought you are a my hammer is Perl guy ;) What about http://search.cpan.org/~roland/jmx4perl/ Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Shutting down one instance of tomcat 6 from a listener
Of course ... Sorry to bother ... I was catching the exceptions in order to log properly but I was doing System.exit(1) I'll resend the exception. Thx a lot. -Original Message- From: Pid [mailto:p...@pidster.com] Sent: lundi 15 novembre 2010 12:44 To: Tomcat Users List Subject: Re: Shutting down one instance of tomcat 6 from a listener On 15/11/2010 09:37, Patrick Sauts wrote: So, how to shut down properly the current application from a 'listener' leaving the other webapps deployed into Tomcat to continue their business? It depends on what the problem actually is, and when it occurs. If you do all of your initialisation in a ServletContextListener and throw an exception on fail, then the context won't start up. This is not the same as shutting it down after a certain period of time and after a fault condition occurs. Where is the code which is going to shut down the application? Presumably outside of the application itself? p - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.29 using more and more RAM until it collapses?
Rainer Jung wrote: André, On 14.11.2010 20:11, André Warnier wrote: For the using JMX clients page, may I recommend : http://code.google.com/p/jmxsh/ which for Java ignorami of my level, is a useful tool to do nifty things in a scripting (non-graphic) mode. I use it only for really simple things, but I have the feeling it can used for much more, such as the recurrent take n threads dumps at regular intervals kind of thing. I'm a bit disappointed. I thought you are a my hammer is Perl guy ;) What about http://search.cpan.org/~roland/jmx4perl/ Meine Güte, how right you are ! I did not even know this mighty module existed ! Digging into Tomcat and Java from Perl, I love the idea ! And like most CPAN modules, it seems to have a good documentation, well-worth reading even if only to understand JMX. Thanks for the pointer ! - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Going down Frequently
Is LoginBean.java your code (or code that you control)? You might have to change that code a bit to handle a session that has already been invalidated. On Mon, Nov 15, 2010 at 6:03 AM, Amol Puglia amolcpug...@yahoo.com wrote: Hello team, Tomcat Server going down frequently with the following messages in the logs. kindly help. body { margin: 0pt; padding: 0pt; }td, div { font-family: Tahoma; font-size: 8pt; vertical-align: top; }body { margin: 0pt; padding: 0pt; }.transcript { background-color: rgb(210, 210, 210); }.messageBlock { margin-left: 4px; margin-bottom: 3px; }.message { margin-left: 100px; word-wrap: break-word; }.messageCont { margin-left: 100px; word-wrap: break-word; }.other { color: rgb(57, 87, 122); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.myself { color: rgb(218, 129, 3); font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont { font-size: 8px; text-align: right; color: rgb(57, 87, 122); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.myselfCont { font-size: 8px; text-align: right; color: rgb(218, 129, 3); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.system { margin-left: 4px; word-wrap: break-word; color: rgb(218, 129, 3); font-style: normal; font-weight: normal; }.showTimestamp { margin-right: 3px; float: right; color: rgb(153, 153, 153); font-style: normal; font-weight: normal; }.other1 { color: rgb(172, 32, 0); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont1 { font-size: 8px; text-align: right; color: rgb(172, 32, 0); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other2 { color: rgb(60, 159, 168); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont2 { font-size: 8px; text-align: right; color: rgb(60, 159, 168); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other3 { color: rgb(226, 86, 20); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont3 { font-size: 8px; text-align: right; color: rgb(226, 86, 20); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other4 { color: rgb(11, 106, 200); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont4 { font-size: 8px; text-align: right; color: rgb(11, 106, 200); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other5 { color: rgb(178, 50, 144); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont5 { font-size: 8px; text-align: right; color: rgb(178, 50, 144); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other6 { color: rgb(2, 231, 199); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont6 { font-size: 8px; text-align: right; color: rgb(2, 231, 199); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.other7 { color: rgb(91, 50, 132); vertical-align: top; font-weight: bold; font-style: normal; float: left; width: 95px; }.otherCont7 { font-size: 8px; text-align: right; color: rgb(91, 50, 132); font-family: Arial,Lucida Grande; font-style: normal; vertical-align: top; font-weight: bold; float: left; width: 95px; }.tsDisplay { display: block; } Nov 12, 2010 1:29:23 PM org.apache.catalina.core.ContainerBase backgroundProcess WARNING: Exception processing manager org.apache.catalina.session.standardmana...@a20981 background process java.lang.IllegalStateException: getAttributeNames: Session already invalidated at org.apache.catalina.session.StandardSession.getAttributeNames(StandardSession.java:1052) at org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:120) at com.ericsson.mars.jspbean.LoginBean.logout(LoginBean.java:2366) at com.ericsson.mars.jspbean.LoginBean.valueUnbound(LoginBean.java:2450) at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1654) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:756) at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592) at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:680) at
Re: Tomcat log files
Am Tue, 09 Nov 2010 16:06:14 -0500 schrieb Christopher Schultz ch...@christopherschultz.net: Have you correctly replaced lib/tomcat-juli.jar and installed lib/tomcat-juli-adapters.jar? If not, you may be falling back to the old logger which requires logging.properties. For whatever-reason and different than tomcat-juli-adapters.jar the default location of tomcat-juli.jar is bin/, not lib/. Regards, Tobias. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Configuring users
All, I'm trying to configure a user to use the manager web application. I have read the comments in the tomcat-users.xml file on my server and added the following two lines to the file: role rolename=manager/ user username=user password=pass roles=manager/ I have saved the file and restarted the server, but am still unable to get to the manager web application. When I try to browse to the manager web application at http://localhost:8084/manager/, I get a 404 report stating the requested resource is not available. What am I missing? Craig Noah Booz Allen Hamilton noah_cr...@bah.com smime.p7s Description: S/MIME cryptographic signature
Re: Configuring users
On 15/11/2010 15:51, Noah, Craig [USA] wrote: All, I'm trying to configure a user to use the manager web application. I have read the comments in the tomcat-users.xml file on my server and added the following two lines to the file: role rolename=manager/ user username=user password=pass roles=manager/ I have saved the file and restarted the server, but am still unable to get to the manager web application. When I try to browse to the manager web application at http://localhost:8084/manager/, I get a 404 report stating the requested resource is not available. What am I missing? Telling us which Tomcat version and providing the complete contents of tomcat-users.xml would be a start. Without that, my best guess is you didn't spot the comment markers in the default file. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring users
Sorry. I'm using tomcat 6.0.26. I made sure my changes are not within comments. The full file is: ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- tomcat-users !-- NOTE: By default, no user is included in the manager role required to operate the /manager web application. If you wish to use this app, you must define such a user - the username and password are arbitrary. -- !-- NOTE: The sample user and role entries below are wrapped in a comment and thus are ignored when reading this file. Do not forget to remove !.. .. that surrounds them. -- !-- role rolename=tomcat/ role rolename=role1/ user username=tomcat password=tomcat roles=tomcat/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ -- role rolename=manager/ user username=user password=pass roles=manager/ /tomcat-users -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Monday, November 15, 2010 9:55 AM To: Tomcat Users List Subject: Re: Configuring users On 15/11/2010 15:51, Noah, Craig [USA] wrote: All, I'm trying to configure a user to use the manager web application. I have read the comments in the tomcat-users.xml file on my server and added the following two lines to the file: role rolename=manager/ user username=user password=pass roles=manager/ I have saved the file and restarted the server, but am still unable to get to the manager web application. When I try to browse to the manager web application at http://localhost:8084/manager/, I get a 404 report stating the requested resource is not available. What am I missing? Telling us which Tomcat version and providing the complete contents of tomcat-users.xml would be a start. Without that, my best guess is you didn't spot the comment markers in the default file. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Configuring users
On 15/11/2010 16:01, Noah, Craig [USA] wrote: Sorry. I'm using tomcat 6.0.26. OK, manager is the correct role. I made sure my changes are not within comments. The full file is: Looks good. Try: http://localhost:8084/manager/html Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Configuring users
2010/11/15 Noah, Craig [USA] noah_cr...@bah.com: When I try to browse to the manager web application at http://localhost:8084/manager/, I get a 404 report stating the requested resource is not available. That URL is incomplete. Try http://localhost:8084/manager/html Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring users
Thanks, that's better. I get prompted for a username and password, but it won't accept the values I've configured. No, I don't have caps lock turned on. -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Monday, November 15, 2010 10:04 AM To: Tomcat Users List Subject: Re: Configuring users On 15/11/2010 16:01, Noah, Craig [USA] wrote: Sorry. I'm using tomcat 6.0.26. OK, manager is the correct role. I made sure my changes are not within comments. The full file is: Looks good. Try: http://localhost:8084/manager/html Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Configuring users
On 15/11/2010 16:07, Noah, Craig [USA] wrote: Thanks, that's better. I get prompted for a username and password, but it won't accept the values I've configured. No, I don't have caps lock turned on. OK. Moving in the right direction. Clearly, from the URL you provided, the default server.xml isn't being used. Has the Realm definition been changed? A copy of the complete server.xml (less comments with any sensitive info replaced with ***) is the next thing to look at. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring users
I don't remember making changes to the server.xml file, but here is mine: ?xml version='1.0' encoding='utf-8'? Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.core.JreMemoryLeakPreventionListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / GlobalNamingResources Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / Connector port=8009 protocol=AJP/1.3 redirectPort=8443 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Monday, November 15, 2010 10:13 AM To: Tomcat Users List Subject: Re: Configuring users On 15/11/2010 16:07, Noah, Craig [USA] wrote: Thanks, that's better. I get prompted for a username and password, but it won't accept the values I've configured. No, I don't have caps lock turned on. OK. Moving in the right direction. Clearly, from the URL you provided, the default server.xml isn't being used. Has the Realm definition been changed? A copy of the complete server.xml (less comments with any sensitive info replaced with ***) is the next thing to look at. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org smime.p7s Description: S/MIME cryptographic signature
RE: Configuring users
From: Mark Thomas [mailto:ma...@apache.org] Subject: Re: Configuring users Clearly, from the URL you provided, the default server.xml isn't being used. Has the Realm definition been changed? A copy of the complete server.xml (less comments with any sensitive info replaced with ***) is the next thing to look at. Also tell us how you're launching Tomcat. If you're doing it from inside and IDE - don't; IDEs often substitute their own configurations rather than using the one you specify. Use the provided scripts and see what happens. - 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 users
On 15/11/2010 16:21, Noah, Craig [USA] wrote: I don't remember making changes to the server.xml file, but here is mine: You aren't using the Tomcat instance you think you are. Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / The URL fro your previous e-mails was connecting to port 8084. http://localhost:8080/manager/html should give you what you expect. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Configuring users
Thank you. That was it. I'm using NetBeans and was trying to start the server within the IDE. Why can't they just use the scripts themselves? Oh well. I'm up and running now. Thanks Mark and Charles for your help. Craig -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Monday, November 15, 2010 10:23 AM To: Tomcat Users List Subject: RE: Configuring users From: Mark Thomas [mailto:ma...@apache.org] Subject: Re: Configuring users Clearly, from the URL you provided, the default server.xml isn't being used. Has the Realm definition been changed? A copy of the complete server.xml (less comments with any sensitive info replaced with ***) is the next thing to look at. Also tell us how you're launching Tomcat. If you're doing it from inside and IDE - don't; IDEs often substitute their own configurations rather than using the one you specify. Use the provided scripts and see what happens. - 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 smime.p7s Description: S/MIME cryptographic signature
Re: Tomcat Going down Frequently
On 15/11/2010 11:03, Amol Puglia wrote: at org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:120) at com.ericsson.mars.jspbean.LoginBean.logout(LoginBean.java:2366) at com.ericsson.mars.jspbean.LoginBean.valueUnbound(LoginBean.java:2450) The problem is in your HttpSessionBindingListener LoginBean, it appears to be operating on the session object after the session has been invalidated. I don't know whether this could take Tomcat down, unless you've included* a System.exit call in a catch - which seems to be popular again all of a sudden. p * which is A Really Bad Idea. 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
RE: Absence of isapi_redirect log file
It's really difficult to troubleshoot ISAPI redirector problems. No one really seems to be able to help much when you get a problem and the logs are either unhelpful or vastly too verbose. I think that changes in IIS have dramatically complicated it and the Tomcat Docs have not kept up. In particular there's no discussion of which application pool the jakarta redirector is running as versus the default application pool for the server. I know for certain that if they don't match up, things break in mysterious and unusual ways. Unfortunately, some of these things only come up when you're dealing with real-world servers. If you have a toy server set up for testing, none of these things like Application Pools break. George Sexton MH Software, Inc. 303 438-9585 www.mhsoftware.com -Original Message- From: Nick Beare [mailto:nick.be...@causeway.com] Sent: Thursday, November 11, 2010 3:09 AM To: Tomcat Users List Subject: RE: Absence of isapi_redirect log file Thanks for your help on this. Georges instructions set me on the right lines. Firstly I set full access on the log directory to all and restarted IIS. The log file had then been created. Hooray. Obviously this is not ideal from a security angle. I noted the creator user (NETWORK SERVICE in my case), then changed permissions to turn off full access. Added NETWORK SERVICE as an allowed user on the log directory and ensured this user had modify and write access). I removed the log file. Restarted IIS and again the log file was created ok. Regards Nick Beare Developer www.causeway.com -Original Message- From: George Sexton [mailto:geor...@mhsoftware.com] Sent: 09 November 2010 04:16 To: 'Tomcat Users List' Subject: RE: Absence of isapi_redirect log file Oops. Cut and pasted out of my manual. Substitute web app. George Sexton MH Software, Inc. 303 438-9585 www.mhsoftware.com -Original Message- From: Nick Beare [mailto:nickbearetom...@gmail.com] Sent: Monday, November 08, 2010 9:15 AM To: Tomcat Users List Subject: Re: Absence of isapi_redirect log file Hi George, Not sure what you mean by 'calendar'. If I right click on my websiteproperties'Home Directory' tab I observe that the Application Pool is set to 'DefaultAppPool'. I then right click on 'DefaultAppPool' under the 'Application Pools' nodeProperties'Identity Tab'. This shows the security account is set to 'predefined'. I noted the greyed out user name against the unselected 'Configurable' option. I then went and added the 'greyed' user above to the users for the log directory and file and set enabled modify and write permissions for the same. Restarted IIS. Still no log file. Any suggestions? Regards Nick On Mon, Nov 8, 2010 at 2:59 PM, George Sexton geor...@mhsoftware.comwrote: Every time I have ever seen this problem, it's a permissions problem. Verify the user your app pool is running as has permissions. Don't make assumptions about what user your app pool is running as. 1. Open Windows Internet Information Services Manager and right click on the virtual host (or default website) for the calendar and choose Properties. 2. Switch to the Home tab and write down the Application Pool name. 3. In the left frame, click on the Application Pools folder, and then right-click on the application pool name from the step above. 4. Click on the identity tab and write down the identity used. George Sexton MH Software, Inc. 303 438-9585 www.mhsoftware.com -Original Message- From: Nick Beare [mailto:nickbearetom...@gmail.com] Sent: Monday, November 08, 2010 3:45 AM To: users@tomcat.apache.org Subject: Absence of isapi_redirect log file Hi I have successfully installed several JK redirect systems on various platforms (all windows based), linking IIS to JBoss(Tomcat) via AJP. (Always version 30 of the dll) Most recently, an NLB IIS cluster on twin windows 2003 R2 32 bit servers. I have never managed to get any output to the isapi_log file, no matter what logging level I stipulate in the registry keys. I have double, triple and quadruple checked that registry entries are complete and spelled correctly. I have check permissions on the log directory and they look okay. Does the dll create the log file if it doesn't yet exist? Does logging work? Has anybody seen the log file getting populated in a windows environment? Regards --- -- 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
RE: Any tools to detect tomcat services failure, and start it again automatically?
-Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Thursday, November 11, 2010 10:18 AM To: Tomcat Users List Subject: Re: Any tools to detect tomcat services failure, and start it again automatically? Pid, On 11/11/2010 3:40 AM, Pid wrote: You could set CATALINA_PID and check that the process ID* contained in the file is active. That is one way of doing things, but Tomcat might not be healthy even though the process is running. For instance, I can imagine the following scenarios where the process would be running, but not considered healthy: 1. Database connection pool is exhausted - possibly permanently 2. Request processing thread pool is exhausted - possibly permanently 3. JVM has experienced an OOME and parts of Tomcat may be unstable That last one is very difficult to detect. ;) What I have SEEN (which means there are probably things you've seen that I haven't) is: 1) JSVC terminates. I scripted around this by having a cron job run every two minutes, doing something like: PIDLIST=`ps -h -o pid -C jsvc` if [ -z $PIDLIST]; then // re-start tomcat fi 2) The JVM terminates and jsvc re-starts itself. The problem for me is that I dynamically add/remove virtual hosts. I'm in the middle of re-working things so that a file gets included by server.xml and that file is kept up to date. I'm fighting this right now. The JVM crashes in the hotspot compiler when it tries to request 2GB of memory... I've turned it in as a bug but haven't heard anything. This particular thing started with JDK 1.6.0_21. I suppose I could go back, but the garbage collector seems to be MUCH better in 1.6.0_21 so I live with it. 3) The JVM just hangs on OOME. This could probably be caught by using a cron job with wget and if a timeout happens kill the JSVC application and then re-start it. In these cases, a Tomcat bounce might be the best action to take. - -chris George Sexton MH Software, Inc. 303 438-9585 www.mhsoftware.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Any tools to detect tomcat services failure, and start it again automatically?
Has anyone successfully used (or experimented with) either of these? -XX:OnError=cmd args;cmd args -XX:OnOutOfMemoryError=cmd args; cmd args -Tim - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Any tools to detect tomcat services failure, and start it again automatically?
On 15/11/2010 17:39, Tim Funk wrote: Has anyone successfully used (or experimented with) either of these? -XX:OnError=cmd args;cmd args -XX:OnOutOfMemoryError=cmd args; cmd args Yes. Context: an occasional app bug which started occurring with more frequency, under load. Couldn't track down the source easily and it was bringing the system down. Automatically restarting the server process turned out to be a bad idea, as the side-effect was that the heap dumps (also configured) got corrupted with a reasonable degree of frequency. (If you kill the JVM during heap write the dump borks, I needed the heap dumps.) I tried with a short delay, but that didn't seem to help matters. I also experienced cyclic reload failure conditions. What did work: creating a fail file, which a polling process would check for periodically restart the server when the fail file was a certain age (which managed to be 2mins). If more than 3 fail files existed, wait longer for a restart. If more than 5 existed, don't restart. External alerting systems notified me that the system was down. This worked until I'd resolved the actual issue. p 0x62590808.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature
Is this correct behavior of cookies
I run development on Tomcat 6.0.29 and IE 8. I need help to understand behavior of cookies. I created a new cookie and setup maxAge to 60 seconds running script setMaxAge(60). I expected this cookie to be persistent and to exist for 60 seconds. I ran this script to create the cookie Cookie newCookie = new Cookie(request.getParameter(cookiename), request.getParameter(cookievalue)); newCookie.setMaxAge(60); response.addCookie(newCookie); That is what I found: When I display maxAge by getMaxAge, I get -1, not 60 as I expected Cookie was actually alive for 60 seconds (as it was supposed to be) while a browser was opened even though getMaxAge() returned -1. Cookie was not persistent. It means when I closed all browsers and opened one again in less than 60 seconds, I found the cookie disappeared. I expected the cookie to be saved on my computer and exist after starting a browser within maximum age. Please explain this behavior of cookie.
AJP connector connectionTimeOut
Tomcat 6.0.29, HotSpot 1.6.0_21 on CentOS 5. I had a problem recently where someone configured a standard AJP connector like this: Connector port=8009 connectionTimeOut=6 acceptCount=100 maxThreads=250 protocol=AJP/1.3 / See the typo? connectionTimeOut should be connectionTimeout. Normally Tomcat complains when you have bogus properties, e.g.: WARNING org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Listener} Setting property 'aasdfhgakjs' to '1' did not find a matching property. But for connectors, it's silently ignored. And for an AJP connector, with no connectionTimeout set, the default is never to timeout. Which might not be a problem usually, but a firewall was randomly dropping connections and the threads holding a connection were sitting there waiting forever. Eventually the thread pool would run out and the server stopped responding to AJP requests. Three questions: 1) Why doesn't Tomcat complain about setting bogus connector properties? 2) Why is the default connectionTimeout (and thus keepaliveTimeout) on an AJP connector forever? Combined with (1) this seems like an accident waiting to happen. 3) AFAICS none of the docs on tomcat.apache.org mention that properties are case-sensitive. I guess it's kind of obvious, but... shouldn't it be stated somewhere? Bonus question: should any/all of these be considered bugs? -Luke - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: AJP connector connectionTimeOut
On 15/11/2010 20:30, Luke Meyer wrote: Tomcat 6.0.29, HotSpot 1.6.0_21 on CentOS 5. I had a problem recently where someone configured a standard AJP connector like this: Connector port=8009 connectionTimeOut=6 acceptCount=100 maxThreads=250 protocol=AJP/1.3 / See the typo? connectionTimeOut should be connectionTimeout. Normally Tomcat complains when you have bogus properties, e.g.: WARNING org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Listener} Setting property 'aasdfhgakjs' to '1' did not find a matching property. But for connectors, it's silently ignored. And for an AJP connector, with no connectionTimeout set, the default is never to timeout. Which might not be a problem usually, but a firewall was randomly dropping connections and the threads holding a connection were sitting there waiting forever. Eventually the thread pool would run out and the server stopped responding to AJP requests. Three questions: 1) Why doesn't Tomcat complain about setting bogus connector properties? The BIO connector doesn't complain due to how properties are handled internally. The NIO and APR/native connector will log warnings. 2) Why is the default connectionTimeout (and thus keepaliveTimeout) on an AJP connector forever? Combined with (1) this seems like an accident waiting to happen. AJP connections are intended to persistent. 3) AFAICS none of the docs on tomcat.apache.org mention that properties are case-sensitive. I guess it's kind of obvious, but... shouldn't it be stated somewhere? Maybe. The configuration is via XML and XML is case sensitive. Seems like stating the obvious to me. Also, not sure where such a statement should be put. As always, patches welcome... Bonus question: should any/all of these be considered bugs? 1. No. Valid configuration properties are correctly documented. It may be possible to enhance the BIO connector to log a warning. 2. No. This is by design. 3. No. 1 and 3 are possible enhancement requests. Enhancement requests should be entered in Bugzilla. Enhancement requests that include patches are more likely to get applied. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Is this correct behavior of cookies
On 15/11/2010 19:25, Igor Barkon wrote: I run development on Tomcat 6.0.29 and IE 8. Try testing with a browser that implements RFC2109. Unless there have been some major improvements since I last tested IE8, it doesn't even come close. I'd also recommend using a tool that lets you examine HTTP request and response headers. Most browsers have at least one plug-in for this. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: AJP connector connectionTimeOut
The BIO connector doesn't complain due to how properties are handled internally. The NIO and APR/native connector will log warnings. OK, good to know. I noticed the default HTTP connector also doesn't warn about bogus properties. Hadn't checked the rest. AJP connections are intended to persistent. Sure, but is it really going to hurt performance if they're dropped after a few minutes of inactivity by default? 1 and 3 are possible enhancement requests. Enhancement requests should be entered in Bugzilla. Enhancement requests that include patches are more likely to get applied. Roger that, thanks for the quick response. -Luke - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 6.0.29 using more and more RAM until it collapses?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian, On 11/14/2010 1:30 AM, Brian wrote: It seems that I solved my problems! So far, these are my conclutions: - Very often, when I restart/redeploy my app, some garbage is left in the memory. I don't know why, given that my code closes everything (relationships with the database, etc), unloads the JDBC drivers, etc. Now I'm restarting Tomcat very often, instead of just restarting/deploying my app. The above is certainly compounding the issues below... - The Tag bodies made some buffers to grow to huge objects. I have told Tomcat to decrease those buffers if they get bigger than the standard size (512 bytes), and now the problem seems to be gone! I wonder why isn't that LIMIT=true directive a standard. I bet millions of sites are having the same problem, and they don't even imagine what a memory profiler is, and how this can be happening. This problem was swallowing hundreds of MB! Yes: hundreds of MBs of buffers for each webapp instance that is not cleanly undeployed can certainly bust your heap. I'm not entirely sure how Tomcat expects to free all those buffers (or simply relies on GC), but it's certainly possible that retaining some reference to a webapp-loaded object ends up keeping those buffers around forever, unable to free them. That isn't a standard option because in (most?) cases where the buffers are being constantly used, the performance increase is significant. Since your webapp is both misbehaving and being re-loaded often, you must use this workaround. I don't mean to say that you are doing anything wrong, but our production webapps aren't undeployed for months at a time -- between releases. What is it that requires you to redeploy your webapp so often? - I configured the Context so it wont use a cache for the static pages. At least for now, I made this to all the contexts. Maybe I will restore this capability to just my java app that doesn't have more than a few static resources, and keep it disabled for the 20 WARs full of static pages. This problem was also swallowing hundreds of MB! Again, these caches might expect to die with the rest of the webapp. If they don't you'll certainly exhaust your heap after a couple of reloads. I believe Chuck and Mark have both suggested that you simply fix your webapp's leaks (as reported at un-deploy) or post the warning messages to allow us to help you fix those. If you fix your resource leaks, you may be able to restore the default value for LIMIT_BUFFER and thereby restore performance of your JSPs. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzh5nsACgkQ9CaO5/Lv0PCqYwCgl6Op7gScXfTvzfupBQIQ/pPH rOUAoJwK7794A/SpbHEW3JQ8k5U1Fv36 =NajF -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.29 using more and more RAM until it collapses?
Hi Chris, -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Monday, November 15, 2010 09:04 PM To: Tomcat Users List Subject: Re: Tomcat 6.0.29 using more and more RAM until it collapses? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian, On 11/14/2010 1:30 AM, Brian wrote: It seems that I solved my problems! So far, these are my conclutions: - Very often, when I restart/redeploy my app, some garbage is left in the memory. I don't know why, given that my code closes everything (relationships with the database, etc), unloads the JDBC drivers, etc. Now I'm restarting Tomcat very often, instead of just restarting/deploying my app. The above is certainly compounding the issues below... - The Tag bodies made some buffers to grow to huge objects. I have told Tomcat to decrease those buffers if they get bigger than the standard size (512 bytes), and now the problem seems to be gone! I wonder why isn't that LIMIT=true directive a standard. I bet millions of sites are having the same problem, and they don't even imagine what a memory profiler is, and how this can be happening. This problem was swallowing hundreds of MB! Yes: hundreds of MBs of buffers for each webapp instance that is not cleanly undeployed can certainly bust your heap. I'm not entirely sure how Tomcat expects to free all those buffers (or simply relies on GC), but it's certainly possible that retaining some reference to a webapp-loaded object ends up keeping those buffers around forever, unable to free them. mmm OK, this is what I have understood so far: - The tag body buffers are stored in a growing array of chars. There is a pointer that know which of the chars is the last one being used. Initially, they are 512 chars, but if a bigger buffer is needed, the quantity of chars increases. But it never decreases. So if at one instant 1 million of chars are needed, the array will grow for that, but will never shrink even if the next use of the buffer is for a 10 characters value (I'm assuming that there is a pool of buffers to reuse, that the buffers are part of a pool). - Some some reason (I don't know why), sometimes Tomcat thinks that needs a huge buffer, so it makes the array to increase to millions of chars. I have no such big pages in my site, so I can't understand how can that happen, but it does. Then, the buffer stays with millions of chars, so the object uses millions of bytes. Do you think a leak has something to do with that? - I think Tomcat doesn't even expect to free those buffers as you say, but use them again and again instead, cause I THINK (correct me if I'm wrong) that they belong to a pool. So they just say like that forever. - Now that I set the flag, everytime Tomcat decides to empty the content of the buffer so it will be used again (emtpy=set the lastUsedCharPointer to cero), it sets it to a new array of 512 bytes if it was bigger that that. I don't know if this issue is retaled to the other one (leaks at undeployment). That isn't a standard option because in (most?) cases where the buffers are being constantly used, the performance increase is significant. Since your webapp is both misbehaving and being re-loaded often, you must use this workaround. Well, I don't know how can Tomcat think that a 8MB buffer is needed in my site for a page. That is the source of the problem. But even if its my fault somehow (leaks in my code), or just the planets aligned so this will happen, I think Tomcat should always think If the buffer got too big when I clear it, I will make it again to be 512 bytes. That just means creating a new array of chars. How much cost would that be? I don't mean to say that you are doing anything wrong, but our production webapps aren't undeployed for months at a time -- between releases. What is it that requires you to redeploy your webapp so often? I'm constantly developing, improving and correcting my site. - I configured the Context so it wont use a cache for the static pages. At least for now, I made this to all the contexts. Maybe I will restore this capability to just my java app that doesn't have more than a few static resources, and keep it disabled for the 20 WARs full of static pages. This problem was also swallowing hundreds of MB! Again, these caches might expect to die with the rest of the webapp. If they don't you'll certainly exhaust your heap after a couple of reloads. Well, given that I have about 20 WARs, these caches were using about 200MB of ram. Even if my app never leaks when redeploying and doesn't degenerate, or even if I would never stop my app, I don't like to spend 200MB in these caches. I could also limit the size of the caches, but I started trying to disable them, and my site still runs pretty fast without these caches now. I believe Chuck and Mark have both suggested that you simply fix your webapp's leaks (as
RE: Tomcat 6.0.29 using more and more RAM until it collapses?
From: Brian [mailto:bbprefix-m...@yahoo.com] Subject: RE: Tomcat 6.0.29 using more and more RAM until it collapses? sometimes Tomcat thinks that needs a huge buffer, so it makes the array to increase to millions of chars. I have no such big pages in my site This is the crux of the problem - you apparently *do* have something that requires such a large buffer. Don't know if it's nested JSPs, some kind of recursive include, or ???. Unfortunately, I'm not aware of any existing mechanism in Jasper that will log these exceptional allocations, so someone would have to put in some new logging code to catch the situation. The method that does this is reAllocBuff() at the end of org.apache.jasper.runtime.BodyContentImpl; the current algorithm usually just doubles the size of the buffer when the size of the current one is exceeded. It would be easy just to add a simple logging call (or even a print statement, temporarily) that includes a stack trace when some size threshold is exceeded. - 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.
After manager says that there was a leak, how to use a profiler?
Hi, After the Tomcat manager warns that there was a leak with one app what was stopped or undeployed, how do I use the profiler to investigate that? I mean, that is the starting point to analize that? What should I look for? Brian
Re: After manager says that there was a leak, how to use a profiler?
2010/11/16 Brian bbprefix-m...@yahoo.com: Hi, After the Tomcat manager warns that there was a leak with one app what was stopped or undeployed, how do I use the profiler to investigate that? I mean, that is the starting point to analize that? What should I look for? E.g., using Eclipse MAT, [1] http://www.eclipse.org/mat/ [2] http://dev.eclipse.org/blogs/memoryanalyzer/2008/05/17/the-unknown-generation-perm/ Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: After manager says that there was a leak, how to use a profiler?
Maybe my question sounded too vague and repetitive. What I meant is something like this Is the a class loader (or something like that) than I should start analyzing? I mean, is there a route I should follow in order to see which objects are stucked? If the Tomcat Manager knows that something got stucked in the memory, how does it know that? Is there a clue we should start?. -Original Message- From: Brian [mailto:bbprefix-m...@yahoo.com] Sent: Monday, November 15, 2010 10:58 PM To: users@tomcat.apache.org Subject: After manager says that there was a leak, how to use a profiler? Hi, After the Tomcat manager warns that there was a leak with one app what was stopped or undeployed, how do I use the profiler to investigate that? I mean, that is the starting point to analize that? What should I look for? Brian - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat 6.0.29 using more and more RAM until it collapses?
Hi Chuck, Now I think you must be right.It is not impossible that one of my pages is huge. They are dynamically created, so something could be wrong in my programming to deliver a huge page for some requests. Isn't there a log of all the requests? I have one running Maybe the log could show the size of the responses if that is possible, I could see what is the URL of the gigantic page and easily find the reason I will check that -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Monday, November 15, 2010 10:38 PM To: Tomcat Users List Subject: RE: Tomcat 6.0.29 using more and more RAM until it collapses? From: Brian [mailto:bbprefix-m...@yahoo.com] Subject: RE: Tomcat 6.0.29 using more and more RAM until it collapses? sometimes Tomcat thinks that needs a huge buffer, so it makes the array to increase to millions of chars. I have no such big pages in my site This is the crux of the problem - you apparently *do* have something that requires such a large buffer. Don't know if it's nested JSPs, some kind of recursive include, or ???. Unfortunately, I'm not aware of any existing mechanism in Jasper that will log these exceptional allocations, so someone would have to put in some new logging code to catch the situation. The method that does this is reAllocBuff() at the end of org.apache.jasper.runtime.BodyContentImpl; the current algorithm usually just doubles the size of the buffer when the size of the current one is exceeded. It would be easy just to add a simple logging call (or even a print statement, temporarily) that includes a stack trace when some size threshold is exceeded. - 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.29 using more and more RAM until it collapses?
From: Brian [mailto:bbprefix-m...@yahoo.com] Subject: RE: Tomcat 6.0.29 using more and more RAM until it collapses? Isn't there a log of all the requests? Not by default, but you can enable the AccessLogValve in server.xml, that will display the request URI and the response size. However, if you have trimSpaces on for the JSP servlet, the size shown in the log will be the one after white space is removed - and odds are that it's white space eating up the buffer. - 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.29 using more and more RAM until it collapses?
Well, I am using the valve indeed! I will check if it is showing the size of the responses. I guess I can find the huge pages easily there. I'm not using the trimSpaces flag. If I find it, I wont need to limit the buffer. That would be more elegant than having to do it. :-) But the other issue is that I still have to find the reason of the leak. I'm exploring YourKit for that. I guess I will find how to do it soon. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Tuesday, November 16, 2010 12:00 AM To: Tomcat Users List Subject: RE: Tomcat 6.0.29 using more and more RAM until it collapses? From: Brian [mailto:bbprefix-m...@yahoo.com] Subject: RE: Tomcat 6.0.29 using more and more RAM until it collapses? Isn't there a log of all the requests? Not by default, but you can enable the AccessLogValve in server.xml, that will display the request URI and the response size. However, if you have trimSpaces on for the JSP servlet, the size shown in the log will be the one after white space is removed - and odds are that it's white space eating up the buffer. - 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: Any tools to detect tomcat services failure, and start it again automatically?
Thanks everyone, I simplify the problem with my own request. In our real env, only one application deployed in one apache-tomcat server. And application will always have its name under opt folder as: /opt/tomcat/APP_NAME/tomcat-VERSION/webapp/APP_NAME tomcat version: 5.5, 6.0.18, 6.0.29 Unix env:Solaris 8/10 I wrote a small script to detect the application status easily. $ cat tomcat_status instance=$1 status=$(/usr/ucb/ps -auwwwx |nawk '$1=$1' OFS=\n |nawk -F \/ -v s=$instance '/Dcatalina.home=/($4==s)') if [[ $status == ]]; then echo Application $instance is NOT running. exit 0 else echo Application $instance is running. exit 1 fi With that, I can detect the exit ID in cronjob, if find any application is not running, the cronjob will try to start it. This simple script has fixed my current problem, I will think to write another script, which will detect the application service status by error logs. Happy to share it to everyone, if you have any question regarding this script, just ask. Regards, Bill On Fri, Nov 12, 2010 at 4:17 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pid, On 11/11/2010 3:40 AM, Pid wrote: You could set CATALINA_PID and check that the process ID* contained in the file is active. That is one way of doing things, but Tomcat might not be healthy even though the process is running. For instance, I can imagine the following scenarios where the process would be running, but not considered healthy: 1. Database connection pool is exhausted - possibly permanently 2. Request processing thread pool is exhausted - possibly permanently 3. JVM has experienced an OOME and parts of Tomcat may be unstable That last one is very difficult to detect. ;) In these cases, a Tomcat bounce might be the best action to take. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzcJUMACgkQ9CaO5/Lv0PBwwgCgky9a2BYJuKrPLUMMSLp9vSZ/ 0bMAni/grbihuKLgPMG070pKJdBL5/Te =3jNj -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
the tomcat encoding
hi all: I wrote an app and there are some chinese content, and there are some code like this str = new String(chineseContentString.getBytes(iso-8859-1), utf-8); the app runs pretty well in the tomcat of my pc. however ,when it was deployed in other machine. all the Chinese content becomes messy code. so ,does anyone know how to got to encoding of the tomcat. or it was just iso-8859-1 and cannot be changed? thanks by the way , the edition is 6.0.20
Re: Tomcat Going down Frequently
Hello Pid, Thanks for the updates.It would be great if you could let us know whether the issue is in application server or application. Also we are using apache to load balance tomcat instances using following modules. LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_scgi_module modules/mod_proxy_scgi.so LoadModule proxy_ajp_module modules/mod_proxy_ajp.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so Is there anything we have to tune configuration on apache,tomcat or application,please suggest. --- On Mon, 11/15/10, Pid p...@pidster.com wrote: From: Pid p...@pidster.com Subject: Re: Tomcat Going down Frequently To: Tomcat Users List users@tomcat.apache.org Date: Monday, November 15, 2010, 10:04 PM On 15/11/2010 11:03, Amol Puglia wrote: at org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:120) at com.ericsson.mars.jspbean.LoginBean.logout(LoginBean.java:2366) at com.ericsson.mars.jspbean.LoginBean.valueUnbound(LoginBean.java:2450) The problem is in your HttpSessionBindingListener LoginBean, it appears to be operating on the session object after the session has been invalidated. I don't know whether this could take Tomcat down, unless you've included* a System.exit call in a catch - which seems to be popular again all of a sudden. p * which is A Really Bad Idea.