R: Apache / Tomcat Load Balanced mode
-Messaggio originale- Da: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] Inviato: martedì 21 aprile 2009 7.34 A: Tomcat Users List Oggetto: Apache / Tomcat Load Balanced mode Hi Would the same work with Apache / Tomcat Load Balanced mode Configuration for single installation of the web application acme www.acme.com being exposed to INTERNET www.acme.com/adminbeing exposed to INTRANET Reason : The application uses a single DB to request of orders (from Subscribers) and same URL with *admin* would process the orders ( Internal Employees) and should not be exposed to outside world. Is there any Configuration with in Apache or Tomcat to achieve the same? With regards Karthik Maybe I don't understand your question, but to me there is no difference in configuring access in Load Balanced or not Load Balanced mode. As regarding the admin section, you can filter it using apache access control. Leandro - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Directed Load Balancing with Sticky Sessions
On 21.04.2009 07:48, Mike Duffy wrote: I've read through the load balancing info in the docs: Using Apache HTTP Server 2.x with mod_proxy What I would like to do is have users sign in on one server and then, based on geographic characteristics, redirect them to another server. If I simply use the method sendRedirect(String location) from HttpServletResponse will the redirected users have a sticky sessions on the server I am redirecting them to? We have a large base of geographically dispersed users. Our data base is a far greater bottleneck than our application servers. Our plan is to geographically segment the data base and then match a Tomcat server to a data base. Any suggestions? Geographic balancing via redirects will only work, if the different locations use different server *names*. Otherwise any redirect URL will point to the same server name, and since the client already resolved the address, the request will be send to the same server IP. Geo-based redirects can be done e.g. with Apache using GeoIP. They have a free geo database. The commercial one is a bit better, but the free one is not to bad. If you need to use the same server name for all locations, you need to make the geographic balancing in the DNS layer. The third possibility is, that you only want to geographically distribute the Tomcat layer and not the Apache layer. This is not very likely, because then you will of course need a very good global internal network between the Apaches and the distributed Tomcats. If you have reasons for this concept, you could do this again with GeoIP and either mod_proxy or mod_jk. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: R: Apache / Tomcat Load Balanced mode
On 21.04.2009 09:06, Leandro Dardini wrote: -Messaggio originale- Da: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] Inviato: martedì 21 aprile 2009 7.34 A: Tomcat Users List Oggetto: Apache / Tomcat Load Balanced mode Hi Would the same work with Apache / Tomcat Load Balanced mode Configuration for single installation of the web application acme www.acme.com being exposed to INTERNET www.acme.com/adminbeing exposed to INTRANET Reason : The application uses a single DB to request of orders (from Subscribers) and same URL with *admin* would process the orders ( Internal Employees) and should not be exposed to outside world. Is there any Configuration with in Apache or Tomcat to achieve the same? With regards Karthik Maybe I don't understand your question, but to me there is no difference in configuring access in Load Balanced or not Load Balanced mode. As regarding the admin section, you can filter it using apache access control. I agree, load balancing seems to be not related to the question. One first decision would be, whether you are able to deploy your application twice, once as the ROOT context and once as admin. Then everything will become obvious. If you only want to deploy it once, e.g. as admin, then you will need to do URL rewriting in the Apache-Layer. When using mod_proxy, you can find info about that at http://httpd.apache.org/docs/2.2/mod/mod_proxy.html When using mod_jk, look at http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
datetime missing in stdout log file
Hi I am having multiple project on tomcat server. I get output and error logged in stdout file. but when error logs in stdout file it done not get the output date an d time. I like stdout log the error with date and time and the application name before logging the error. like [application name] [datetime] [output] this will help me to find out which application is throwing error can anybody help me. Thanks Gagan -- View this message in context: http://www.nabble.com/datetime-missing-in-stdout-log-file-tp23152287p23152287.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: datetime missing in stdout log file
users-unsubscr...@tomcat.apache.org On 4/21/09, gaganjoshi007 gagan.joshi...@gmail.com wrote: Hi I am having multiple project on tomcat server. I get output and error logged in stdout file. but when error logs in stdout file it done not get the output date an d time. I like stdout log the error with date and time and the application name before logging the error. like [application name] [datetime] [output] this will help me to find out which application is throwing error can anybody help me. Thanks Gagan -- View this message in context: http://www.nabble.com/datetime-missing-in-stdout-log-file-tp23152287p23152287.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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: datetime missing in stdout log file
This is a novel combination : someone hijacking another thread, with the only purpose of unsubscribing from the list, and getting it wrong anyway... :-) ali navadeh wrote: users-unsubscr...@tomcat.apache.org On 4/21/09, gaganjoshi007 gagan.joshi...@gmail.com wrote: Hi I am having multiple project on tomcat server. I get output and error logged in stdout file. but when error logs in stdout file it done not get the output date an d time. I like stdout log the error with date and time and the application name before logging the error. like [application name] [datetime] [output] this will help me to find out which application is throwing error can anybody help me. Thanks Gagan -- View this message in context: http://www.nabble.com/datetime-missing-in-stdout-log-file-tp23152287p23152287.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 - 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
Problem with maximum threads
Hi, I am using Tomcat 6.0.9 with the following server.xml config file: The Java version I am using is JDK1.6.0_06. The problem is with the tomcat web app being used for a load test at 200 messages/sec. The application runs well enough for half an hour but after that time, the CPU consumption is maximum and idle is 0. Also, there are more than 1000 threads even if I have configured the maximum threads to be 70 in the configuration. There is no problem in the application code. Where can be the problem in the Tomcat? Thanks, Anand -- View this message in context: http://www.nabble.com/Problem-with-maximum-threads-tp23154175p23154175.html Sent from the Tomcat - User mailing list archive at Nabble.com.
RE: Problem with maximum threads
From: connossieur [mailto:anand.b...@aricent.com] There is no problem in the application code. How have you proved this? Take a thread dump (you're on Java 1.6, so you can use jstack). What are the threads doing? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem with maximum threads
From: connossieur [mailto:anand.b...@aricent.com] The application doesn't have problems as I tested it with Visual VM (profiler for java 6) on Windows. OK. You've done more research than most, then - we get a lot of people blaming Tomcat as the first thing they do, so we tend to have some well-developed check your code! reflexes. Anyways, can there be problem with Tomcat? It's pretty stable. But no code is ever 100% guaranteed bug-free, despite what we might like, so there always *can* be a problem :-). 6.0.9 is quite old now; the current version is 6.0.18, and there have been a number of bugfixes. How tied are you to the old version - can you update and see whether that resolves the issue? I mean, I have limited the number of threads, still tomcat spawns more than 1000 threads? This is where that thread dump comes in. *Something* is spawning threads - rather than guess what's doing it, let's get some evidence of what they're doing? Then we stand a better chance of working out what's spawning them. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem with maximum threads
did you try specifying executor attribute in your Connector e.g. Connector... executor=ThreadPool .. / Martin __ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Tue, 21 Apr 2009 04:34:58 -0700 From: anand.b...@aricent.com To: users@tomcat.apache.org Subject: Problem with maximum threads Hi, I am using Tomcat 6.0.9 with the following server.xml config file: Executor name=ThreadPool namePrefix=catalina-exec- maxThreads=70 minSpareThreads=20/ Connector executor=ThreadPool port=80 protocol=HTTP/1.1 connectionTimeout=2000 redirectPort=8443 / The Java version I am using is JDK1.6.0_06. The problem is with the tomcat web app being used for a load test at 200 messages/sec. The application runs well enough for half an hour but after that time, the CPU consumption is maximum and idle is 0. Also, there are more than 1000 threads even if I have configured the maximum threads to be 70 in the configuration. There is no problem in the application code. Where can be the problem in the Tomcat? Thanks, Anand -- View this message in context: http://www.nabble.com/Problem-with-maximum-threads-tp23154175p23154175.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 _ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009
RE: Problem with maximum threads
Yes, I have already mentioned in the mail. I have that executor attributes. :) mgainty wrote: did you try specifying executor attribute in your Connector e.g. Connector... executor=ThreadPool .. / Martin __ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Tue, 21 Apr 2009 04:34:58 -0700 From: anand.b...@aricent.com To: users@tomcat.apache.org Subject: Problem with maximum threads Hi, I am using Tomcat 6.0.9 with the following server.xml config file: Executor name=ThreadPool namePrefix=catalina-exec- maxThreads=70 minSpareThreads=20/ Connector executor=ThreadPool port=80 protocol=HTTP/1.1 connectionTimeout=2000 redirectPort=8443 / The Java version I am using is JDK1.6.0_06. The problem is with the tomcat web app being used for a load test at 200 messages/sec. The application runs well enough for half an hour but after that time, the CPU consumption is maximum and idle is 0. Also, there are more than 1000 threads even if I have configured the maximum threads to be 70 in the configuration. There is no problem in the application code. Where can be the problem in the Tomcat? Thanks, Anand -- View this message in context: http://www.nabble.com/Problem-with-maximum-threads-tp23154175p23154175.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 _ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009 -- View this message in context: http://www.nabble.com/Problem-with-maximum-threads-tp23154175p23154518.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
STOout file output
Hi, I like to have different stdout files for different project on my server log. is it possible to have different files for different project. eg: if I have 3 project(A,B,C) on server than I should have tomcat logs files like stdout_20090409_A.log stdout_20090409_B.log stdout_20090409_C.log could anybody help me? -- View this message in context: http://www.nabble.com/STOout-file-output-tp23152166p23152166.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: datetime missing in stdout log file
ali navadeh wrote: users-unsubscr...@tomcat.apache.org On 4/21/09, gaganjoshi007 gagan.joshi...@gmail.com wrote: Hi I am having multiple project on tomcat server. I get output and error logged in stdout file. but when error logs in stdout file it done not get the output date an d time. I like stdout log the error with date and time and the application name before logging the error. like [application name] [datetime] [output] http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html states you can supplt those parameters thru %TOMCAT_HOME%/lib/log4j.properties log4j.appender.R.layout.ConversionPattern e.g. log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG, R log4j.logger.org.apache.catalina.core=DEBUG, R log4j.logger.org.apache.catalina.session=DEBUG, R log4j.rootLogger=debug, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=example.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%m%d log4j.logger.org.apache.catalina=DEBUG, R p=Used to output the priority of the logging event. t=Used to output the name of the thread that generated the logging event. c=Used to output the category of the logging event. The category conversion specifier can be optionally followed by precision specifier, that is a decimal constant in brackets. m=Used to output the application supplied message associated with the logging event. n=Outputs the platform dependent line separator character or characters. d=Used to output the date of the logging event. The date conversion specifier may be followed by a date format specifier enclosed between braces. For example, %d{HH:mm:ss,SSS} or %d{dd MMM HH:mm:ss,SSS}. If no date format specifier is given then ISO8601 format is assumed. this will help me to find out which application is throwing error can anybody help me. Thanks Gagan -- View this message in context: http://www.nabble.com/datetime-missing-in-stdout-log-file-tp23152287p23152287.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 - 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 _ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009
RE: Problem with maximum threads
The application doesn't have problems as I tested it with Visual VM (profiler for java 6) on Windows. But I need the application on Linux. I'll try to take the thread dump and see. Anyways, can there be problem with Tomcat? I mean, I have limited the number of threads, still tomcat spawns more than 1000 threads? Anand Peter Crowther wrote: From: connossieur [mailto:anand.b...@aricent.com] There is no problem in the application code. How have you proved this? Take a thread dump (you're on Java 1.6, so you can use jstack). What are the threads doing? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Problem-with-maximum-threads-tp23154175p23154371.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: Problem with maximum threads
So, I'll take the dump and analyze and revert back. One more confirmation. Is the executor configured by me for Tomcat appropriate? Or should I make any more changes? -Anand Peter Crowther wrote: From: connossieur [mailto:anand.b...@aricent.com] The application doesn't have problems as I tested it with Visual VM (profiler for java 6) on Windows. OK. You've done more research than most, then - we get a lot of people blaming Tomcat as the first thing they do, so we tend to have some well-developed check your code! reflexes. Anyways, can there be problem with Tomcat? It's pretty stable. But no code is ever 100% guaranteed bug-free, despite what we might like, so there always *can* be a problem :-). 6.0.9 is quite old now; the current version is 6.0.18, and there have been a number of bugfixes. How tied are you to the old version - can you update and see whether that resolves the issue? I mean, I have limited the number of threads, still tomcat spawns more than 1000 threads? This is where that thread dump comes in. *Something* is spawning threads - rather than guess what's doing it, let's get some evidence of what they're doing? Then we stand a better chance of working out what's spawning them. - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://www.nabble.com/Problem-with-maximum-threads-tp23154175p23155063.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
Undeploy does not delete all .jar files
I'm trying to undeploy my application in Tomcat without having to stop and start the Tomcat service. In the manager I undeploy the application. When I look under webapps I see that my exploded application directory is still there and if I look inside of the directory everything has been deleted except for 6 .jar files under WEB-INF/lib (adf_faces_impl, afc, custComps, jsf-impl, log4j-1.2.8, and portlet-client-adf). All other .jar files under lib are gone. Since this does not get deleted I cannot redeploy the same application. Any suggestions? I'm using Tomcat 5.5 and I'm creating my .war file from JDeveloper. Thanks for your help!
RE: R: Apache / Tomcat Load Balanced mode
Hi Thx for the same Web application would be installed on 3 nodes of Tomcat below the single load balancer of Apache http 2.x server www.acme.com being exposed to INTERNET www.acme.com/adminbeing exposed to INTRANET We would like to block the /admin from the INTERNET access If some body uses /admin the response should be blocked If the same /admin is to be used within the INTRANET local access We should be able to display the credentials How To achieve the same ? With regards karthik -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Tuesday, April 21, 2009 12:51 PM To: Tomcat Users List Subject: Re: R: Apache / Tomcat Load Balanced mode On 21.04.2009 09:06, Leandro Dardini wrote: -Messaggio originale- Da: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] Inviato: martedì 21 aprile 2009 7.34 A: Tomcat Users List Oggetto: Apache / Tomcat Load Balanced mode Hi Would the same work with Apache / Tomcat Load Balanced mode Configuration for single installation of the web application acme www.acme.com being exposed to INTERNET www.acme.com/adminbeing exposed to INTRANET Reason : The application uses a single DB to request of orders (from Subscribers) and same URL with *admin* would process the orders ( Internal Employees) and should not be exposed to outside world. Is there any Configuration with in Apache or Tomcat to achieve the same? With regards Karthik Maybe I don't understand your question, but to me there is no difference in configuring access in Load Balanced or not Load Balanced mode. As regarding the admin section, you can filter it using apache access control. I agree, load balancing seems to be not related to the question. One first decision would be, whether you are able to deploy your application twice, once as the ROOT context and once as admin. Then everything will become obvious. If you only want to deploy it once, e.g. as admin, then you will need to do URL rewriting in the Apache-Layer. When using mod_proxy, you can find info about that at http://httpd.apache.org/docs/2.2/mod/mod_proxy.html When using mod_jk, look at http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with maximum threads
Anand, As others will surely tell you, there is something amiss in your application that spawns threads. However, the maximum number of threads Tomcat will handle is somewhere about 2400. So, if you are getting an error at 1000 threads, look somewhere else. Stephen Caine Soft Breeze Systems, LLC On Apr 21, 2009, at 7:34 AM, connossieur wrote: Hi, I am using Tomcat 6.0.9 with the following server.xml config file: The Java version I am using is JDK1.6.0_06. The problem is with the tomcat web app being used for a load test at 200 messages/sec. The application runs well enough for half an hour but after that time, the CPU consumption is maximum and idle is 0. Also, there are more than 1000 threads even if I have configured the maximum threads to be 70 in the configuration. There is no problem in the application code. Where can be the problem in the Tomcat? Thanks, Anand -- View this message in context: http://www.nabble.com/Problem-with-maximum-threads-tp23154175p23154175.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: Problem with maximum threads
Ya. I think I will have to re-analyze the code. I have one doubt. Should the code I write be thread safe? Following is the excerpt from the thread dump of different threads at different states: RUNNABLE http-80-37 daemon prio=6 tid=0x0b094400 nid=0x540 runnable [0x0c5be000..0x0c5bfb94] java.lang.Thread.State: RUNNABLE at java.util.HashMap.getEntry(HashMap.java:347) at java.util.HashMap.containsKey(HashMap.java:335) /**This contains proprietery code **/ at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None WAITING http-80-33 daemon prio=6 tid=0x0b0e5800 nid=0xfe4 in Object.wait() [0x0c47f000..0x0c47fd94] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x03a8d630 (a org.apache.tomcat.util.net.JIoEndpoint$Worker) at java.lang.Object.wait(Object.java:485) at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:414) - locked 0x03a8d630 (a org.apache.tomcat.util.net.JIoEndpoint$Worker) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:440) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None What do you think? -Anand Stephen Caine wrote: Anand, As others will surely tell you, there is something amiss in your application that spawns threads. However, the maximum number of threads Tomcat will handle is somewhere about 2400. So, if you are getting an error at 1000 threads, look somewhere else. Stephen Caine Soft Breeze Systems, LLC On Apr 21, 2009, at 7:34 AM, connossieur wrote: Hi, I am using Tomcat 6.0.9 with the following server.xml config file: The Java version I am using is JDK1.6.0_06. The problem is with the tomcat web app being used for a load test at 200 messages/sec. The application runs well enough for half an hour but after that time, the CPU consumption is maximum and idle is 0. Also, there are more than 1000 threads even if I have configured the maximum threads to be 70 in the configuration. There is no problem in the application code. Where can be the problem in the Tomcat? Thanks, Anand -- View this message in context: http://www.nabble.com/Problem-with-maximum-threads-tp23154175p23154175.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 -- View this message in context: http://www.nabble.com/Problem-with-maximum-threads-tp23154175p23156131.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
Log messages appearing twice
Here is my log4j config file: log4j.appender.A1=org.apache.log4j.FileAppender log4j.appender.A1.File=${catalina.home}/logs/test.log log4j.appender.A1.MaxFileSize=100MB log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.rootLogger=INFO, A1 All of my messages are printing twice in the logfile. Does anyone have any idea why? I've used log4j before, in standalone apps, and not had this problem. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem with maximum threads
From: Stephen Caine [mailto:step...@commongrnd.com] Subject: Re: Problem with maximum threads However, the maximum number of threads Tomcat will handle is somewhere about 2400. I'm curious: where did you conjure up that number? The actual limit will vary greatly depending on platform, JVM level, heap size, heap usage, and especially 32- or 64-bit environments. - 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: Problem with maximum threads
From: connossieur [mailto:anand.b...@aricent.com] Subject: Re: Problem with maximum threads Should the code I write be thread safe? Usually. If it's within a servlet, then it *must* be thread safe, since a servlet instance may handle multiple requests simultaneously. But don't just blindly throw synchronizes clauses in everywhere; you only need to protect concurrent access to shared instances. RUNNABLE http-80-37 daemon prio=6 tid=0x0b094400 nid=0x540 runnable [0x0c5be000..0x0c5bfb94] Do you really have 1,000 threads in a runnable or waiting state, all with the names http-80-xx? For that matter, what makes you think you really have 1,000 threads active? - 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: Problem with maximum threads
1000 threads come up by themselves. I have configured Tomcat to spawn only 70 threads. Also, I'll look for synchronization issues in the code. :) Caldarale, Charles R wrote: From: connossieur [mailto:anand.b...@aricent.com] Subject: Re: Problem with maximum threads Should the code I write be thread safe? Usually. If it's within a servlet, then it *must* be thread safe, since a servlet instance may handle multiple requests simultaneously. But don't just blindly throw synchronizes clauses in everywhere; you only need to protect concurrent access to shared instances. RUNNABLE http-80-37 daemon prio=6 tid=0x0b094400 nid=0x540 runnable [0x0c5be000..0x0c5bfb94] Do you really have 1,000 threads in a runnable or waiting state, all with the names http-80-xx? For that matter, what makes you think you really have 1,000 threads active? - 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 -- View this message in context: http://www.nabble.com/Problem-with-maximum-threads-tp23154175p23156682.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: Undeploy does not delete all .jar files
I'm trying to undeploy my application in Tomcat without having to stop and start the Tomcat service. In the manager I undeploy the application. When I look under webapps I see that my exploded application directory is still there and if I look inside of the directory everything has been deleted except for 6 .jar files under WEB-INF/lib (adf_faces_impl, afc, custComps, jsf-impl, log4j-1.2.8, and portlet-client-adf). All other .jar files under lib are gone. Since this does not get deleted I cannot redeploy the same application. Any suggestions? I'm using Tomcat 5.5 and I'm creating my .war file from JDeveloper. Thanks for your help!
Re: Cookies and values with ':' in them
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andre-John, On 4/16/2009 5:48 PM, Andre-John Mas wrote: Will this only be for writing? I depend a cookie set by a third-party web application in the same domain, which sends me the cookies this way. If it is only for writing, then I will have to find a way of convincing the developers of the other application to make the change. You can always try to parse the header yourself, instead of using the Cookie part of the servlet API. Then you can allow the embedded colon regardless of the cookie specification. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt1OgACgkQ9CaO5/Lv0PDZ8wCguf4Py6pCzGHLiNj3dP0ljYsf vEAAoIscMyKFD6sGKW+m0gByV+Ujnm/+ =vieM -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: what can Tomcat be doing that a profiler can't see?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nikita, On 4/20/2009 6:14 PM, dukehoops wrote: The network's nominal bandwith is 1GB (gigabit with a G). Sorry about that. I knew you said gigabit (that's Gb, btw, GB means gigabyte) but I neglected a factor of 1024 in my calculations. You're right, you're way under the bandwidth limit for a Gb Ethernet network. FWIW, we've discovered that replacing NIO with the old blocking connector improved latency by a factor of 4-5 times. Digging deeper... Definitely something to look into. NIO uses some OS black magic that might not be visible to your Java profiler. Perhaps use a native profiler to see what's going on? You might want to re-post with a more descriptive subject line... something like Observing significant latency using NIO Connector or something like that. You'll get the TC devs' attention with that one. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt1l4ACgkQ9CaO5/Lv0PCx1ACgwp14nRzzP9eOXhxL5BEyC3GX WysAoI5CyXdLnc7XjToDYuGRRHldhBHR =Y9kV -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Undeploy does not delete all .jar files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 JT, On 4/21/2009 8:46 AM, JT wrote: I'm trying to undeploy my application in Tomcat without having to stop and start the Tomcat service. In the manager I undeploy the application. When I look under webapps I see that my exploded application directory is still there and if I look inside of the directory everything has been deleted except for 6 .jar files under WEB-INF/lib (adf_faces_impl, afc, custComps, jsf-impl, log4j-1.2.8, and portlet-client-adf). All other .jar files under lib are gone. Since this does not get deleted I cannot redeploy the same application. Any suggestions? What are the permissions for those files and your lib directory? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt2AkACgkQ9CaO5/Lv0PAgDQCfbsZsWx5dkV5zxfcSaJ2qJcPc FxgAn2YmY5RlaflF4BLlLLQjoGmP5TGe =R6VH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Undeploy does not delete all .jar files
When I look under the properties for all the .jar files that are left it says that Everyone has Full Control, is that what you mean? On Tue, Apr 21, 2009 at 10:28 AM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 JT, On 4/21/2009 8:46 AM, JT wrote: I'm trying to undeploy my application in Tomcat without having to stop and start the Tomcat service. In the manager I undeploy the application. When I look under webapps I see that my exploded application directory is still there and if I look inside of the directory everything has been deleted except for 6 .jar files under WEB-INF/lib (adf_faces_impl, afc, custComps, jsf-impl, log4j-1.2.8, and portlet-client-adf). All other .jar files under lib are gone. Since this does not get deleted I cannot redeploy the same application. Any suggestions? What are the permissions for those files and your lib directory? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt2AkACgkQ9CaO5/Lv0PAgDQCfbsZsWx5dkV5zxfcSaJ2qJcPc FxgAn2YmY5RlaflF4BLlLLQjoGmP5TGe =R6VH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: R: Apache / Tomcat Load Balanced mode
you can restrict based on roles so in /conf/tomcat-users.xml you can define username fubar to role 'newrole' user username=fubar password=fubar roles=newrole/ then in WebAppName/WEB/INF/web.xml !-- Define a Security Constraint on this Application -- security-constraint web-resource-collection web-resource-nameHTMLManger and Manager command/web-resource-name url-pattern/admin/*/url-pattern /web-resource-collection auth-constraint !-- NOTE: This role is not present in the default users file -- role-namenewrole/role-name /auth-constraint security-role role-namenewrole/role-name /security-role /security-constraint any access to YourWebAppName/admin are enabled only to role='newrole' Martin __ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: karthik.nanjang...@xius-bcgi.com To: users@tomcat.apache.org Date: Tue, 21 Apr 2009 18:19:42 +0530 Subject: RE: R: Apache / Tomcat Load Balanced mode Hi Thx for the same Web application would be installed on 3 nodes of Tomcat below the single load balancer of Apache http 2.x server www.acme.com being exposed to INTERNET www.acme.com/adminbeing exposed to INTRANET We would like to block the /admin from the INTERNET access If some body uses /admin the response should be blocked If the same /admin is to be used within the INTRANET local access We should be able to display the credentials How To achieve the same ? With regards karthik -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Tuesday, April 21, 2009 12:51 PM To: Tomcat Users List Subject: Re: R: Apache / Tomcat Load Balanced mode On 21.04.2009 09:06, Leandro Dardini wrote: -Messaggio originale- Da: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] Inviato: martedì 21 aprile 2009 7.34 A: Tomcat Users List Oggetto: Apache / Tomcat Load Balanced mode Hi Would the same work with Apache / Tomcat Load Balanced mode Configuration for single installation of the web application acme www.acme.com being exposed to INTERNET www.acme.com/adminbeing exposed to INTRANET Reason : The application uses a single DB to request of orders (from Subscribers) and same URL with *admin* would process the orders ( Internal Employees) and should not be exposed to outside world. Is there any Configuration with in Apache or Tomcat to achieve the same? With regards Karthik Maybe I don't understand your question, but to me there is no difference in configuring access in Load Balanced or not Load Balanced mode. As regarding the admin section, you can filter it using apache access control. I agree, load balancing seems to be not related to the question. One first decision would be, whether you are able to deploy your application twice, once as the ROOT context and once as admin. Then everything will become obvious. If you only want to deploy it once, e.g. as admin, then you will need to do URL rewriting in the Apache-Layer. When using mod_proxy, you can find info about that at http://httpd.apache.org/docs/2.2/mod/mod_proxy.html When using mod_jk, look at http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with maximum threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anand, On 4/21/2009 9:57 AM, connossieur wrote: 1000 threads come up by themselves. I have configured Tomcat to spawn only 70 threads. Something must be wrong. Your executor configuration: Executor name=ThreadPool namePrefix=catalina-exec- maxThreads=70 minSpareThreads=20/ Does not match your thread dump: RUNNABLE http-80-37 daemon prio=6 tid=0x0b094400 nid=0x540 runnable [0x0c5be000..0x0c5bfb94] Your thread names should start with catalina-exec-, not http-80-37. So, one of several things is immediately evident: 1. Your executor is not being used. 2. Your thread dump is showing a thread from another Connector (not likely, since port 80 is the one being used by this connector) 3. Your server.xml isn't being used. Can you post your entire server.xml? Also, please post a full thread dump. I want to see 1000 complete stack traces, baby. Also, I'll look for synchronization issues in the code. Synchronization issues will not create additional threads... they will just cause race conditions and unpredictable behavior. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt3pYACgkQ9CaO5/Lv0PCsrACeKlKIl+AlpvL9oMF0aq8m1ks1 Xi8An3czoHsotx0KH1y920SXwEfkrq8r =ig+M -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem with maximum threads
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Also, please post a full thread dump. I want to see 1000 complete stack traces, baby. Mmm, that's a good few kilos of carbon to shift the bits around the mailing list subscribers ;-). Any chance of putting the thread dump on a convenient web site and posting a link? - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Log messages appearing twice
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 SM, On 4/21/2009 9:32 AM, Security Management wrote: Here is my log4j config file: log4j.appender.A1=org.apache.log4j.FileAppender log4j.appender.A1.File=${catalina.home}/logs/test.log log4j.appender.A1.MaxFileSize=100MB log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.rootLogger=INFO, A1 All of my messages are printing twice in the logfile. Application log messages or Tomcat log messages? Are you using log4j only in your application or are you also using log4j for server logging? Can you give us an example of a repeated log message? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt4AsACgkQ9CaO5/Lv0PA6AwCgs+bkRspiCv0D2C8uAkRCz55E irMAoLD8oWXoKTvW2dcgjFexEh1FaJDV =r9Z1 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: datetime missing in stdout log file
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gagan, On 4/21/2009 5:30 AM, gaganjoshi007 wrote: I am having multiple project on tomcat server. I get output and error logged in stdout file. but when error logs in stdout file it done not get the output date an d time. Tomcat version? Type of logging in use? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt4FkACgkQ9CaO5/Lv0PBkzwCgwyi059ZhP28G9RlWJB+Kyhdh ya8AoJ9v3JZabEvB3vqT8lGR1AD+8g6l =GN63 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Problem with maximum threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, On 4/21/2009 10:59 AM, Peter Crowther wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Also, please post a full thread dump. I want to see 1000 complete stack traces, baby. Mmm, that's a good few kilos of carbon to shift the bits around the mailing list subscribers ;-). Any chance of putting the thread dump on a convenient web site and posting a link? Meh, the routers are going to be running whether he sends them via the mailing list of not :) Good point, though. Downloading a logfile is much better than having it bomb your inbox. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt4KIACgkQ9CaO5/Lv0PBCswCePbKnLLWQ9LiHH1y731LskFXf mcgAoLT/uybY1xdfgcZ+eiDB9aekfjbC =bZqG -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem with maximum threads
From: connossieur [mailto:anand.b...@aricent.com] Subject: RE: Problem with maximum threads 1000 threads come up by themselves. You're not answering the questions. To repeat: 1) Do you really have 1,000 threads in a runnable or waiting state, all with the names http-80-xx? 2) What makes you think you really have 1,000 threads active? - 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: Iterate LinkedHashMap gives HTTP 500 in a JSP (NPE)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tommy, On 4/19/2009 10:00 PM, Tommy Pham wrote: Hi, I have a problem iterating a LinkedHashMapInteger, Object lhmObject. The lhmObject.size() gives correct size and lhmObject.keySet().toString gives the correct values. However, if I try iterate the object with lhmObject.keySet() with an empty loop: for (Integer key : lhmObject.keySet() ) { } or for (Iterator it = lhmObject.keySet().iterator(); it.hasNext(); ) { } I get a HTTP 500 - NullPointerException in the JSP page, which has java.util.* and appropriate package.Object for import. Has anyone seen this before? Strange. Can you post the stack trace? Also, can you create a minimal test case that fits into a single JSP so we can play with it? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt4PoACgkQ9CaO5/Lv0PDpQACdEacJsacch1L41Jv1kCNq6ZMT pAQAn1Alu2FrXSZcQFOkucVeGWym5jtf =Fl7B -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Undeploy does not delete all .jar files
From: JT [mailto:jltoo...@gmail.com] Subject: Re: Undeploy does not delete all .jar files When I look under webapps I see that my exploded application directory is still there and if I look inside of the directory everything has been deleted except for 6 .jar files You appear to be running under Windows, although you haven't explicitly said so. You likely need to enable antiJarLocking for the Context of interest: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html - 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: datetime missing in stdout log file
From: gaganjoshi007 [mailto:gagan.joshi...@gmail.com] Subject: datetime missing in stdout log file I am having multiple project on tomcat server. I get output and error logged in stdout file. Output and error from what? Tomcat or your webapps? but when error logs in stdout file it done not get the output date and time. Which likely means you have sloppy code in the webapp simply writing to System.out rather than using a logger. I like stdout log the error with date and time and the application name before logging the error. Try enabling swallowOutput in the webapp's Context element: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html this will help me to find out which application is throwing error Better to fix your webapps to use a real logging system rather than just dumping to System.out. - 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: Undeploy does not delete all .jar files
You are correct, I am using Windows. I have added antiJARLocking=true and also added antiResourceLocking=true and it's still not working. Is there anything special I need to do to get this to work. I added this inside of my conf/context.xml file. Context path=/test docBase=test debug=1 reloadable=true antiJARLocking=true antiResourceLocking=true/ When I undeploy test.war goes away, but the test directory does not? Everything in the test directory is gone except for the 6 .jar files under lib. So nothing changed when I added those two fields. JT On Tue, Apr 21, 2009 at 11:14 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: JT [mailto:jltoo...@gmail.com] Subject: Re: Undeploy does not delete all .jar files When I look under webapps I see that my exploded application directory is still there and if I look inside of the directory everything has been deleted except for 6 .jar files You appear to be running under Windows, although you haven't explicitly said so. You likely need to enable antiJarLocking for the Context of interest: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html - 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: Log messages appearing twice
In the application log, separate file (the test.log). I only have 1 copy of log4j.jar in the apache directory, too (my webapps copy). Here's an example: 2009-04-21 11:50:59,903 [main] DEBUG com.secmgmt.beans.picture.four.PPDoorProvider - Loading Door Provider 2009-04-21 11:50:59,903 [main] DEBUG com.secmgmt.beans.picture.four.PPDoorProvider - Loading Door Provider 2009-04-21 11:50:59,934 [main] INFO com.secmgmt.beans.picture.four.UserFieldManagerProvider - Loading managers from user's user field #1 2009-04-21 11:50:59,934 [main] INFO com.secmgmt.beans.picture.four.UserFieldManagerProvider - Loading managers from user's user field #1 2009-04-21 11:50:59,946 [main] DEBUG com.secmgmt.struts2.interceptors.OperatorHistoryInterceptor - Operator History logging started 2009-04-21 11:50:59,946 [main] DEBUG com.secmgmt.struts2.interceptors.OperatorHistoryInterceptor - Operator History logging started 2009-04-21 11:51:01,443 [main] DEBUG com.secmgmt.struts2.interceptors.OperatorHistoryInterceptor - Operator History logging started 2009-04-21 11:51:01,443 [main] DEBUG com.secmgmt.struts2.interceptors.OperatorHistoryInterceptor - Operator History logging started 2009-04-21 11:56:28,272 [TP-Processor3] DEBUG com.secmgmt.struts2.text_provider.DatabaseResourceBundle - Loading resources 2009-04-21 11:56:28,272 [TP-Processor3] DEBUG com.secmgmt.struts2.text_provider.DatabaseResourceBundle - Loading resources -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, April 21, 2009 11:03 AM To: Tomcat Users List Subject: Re: Log messages appearing twice -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 SM, On 4/21/2009 9:32 AM, Security Management wrote: Here is my log4j config file: log4j.appender.A1=org.apache.log4j.FileAppender log4j.appender.A1.File=${catalina.home}/logs/test.log log4j.appender.A1.MaxFileSize=100MB log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.rootLogger=INFO, A1 All of my messages are printing twice in the logfile. Application log messages or Tomcat log messages? Are you using log4j only in your application or are you also using log4j for server logging? Can you give us an example of a repeated log message? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt4AsACgkQ9CaO5/Lv0PA6AwCgs+bkRspiCv0D2C8uAkRCz55E irMAoLD8oWXoKTvW2dcgjFexEh1FaJDV =r9Z1 -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: What Tomcat presentations / demos / discussions do you want to see at ApacheCon US 2009?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 4/16/2009 6:51 AM, Mark Thomas wrote: Mark Thomas wrote: Title:Resolving OOM-PermGen errors on webapp reload +1 Like Ken, I won't be able to attend, but slides would certainly be a great resource that we can read and send people to read when they come whiling to the list. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt/eoACgkQ9CaO5/Lv0PCCwwCgknlsSA/XIzb/GeiofdATRoaK hPMAoISEzUAgtymBJiFD4UnmJrzhUF7U =F4EI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: What Tomcat presentations / demos / discussions do you want to see at ApacheCon US 2009?
when/where? avialable link(s)? thanks, Martin __ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Tue, 21 Apr 2009 13:10:02 -0400 From: ch...@christopherschultz.net To: users@tomcat.apache.org Subject: Re: What Tomcat presentations / demos / discussions do you want to see at ApacheCon US 2009? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 4/16/2009 6:51 AM, Mark Thomas wrote: Mark Thomas wrote: Title:Resolving OOM-PermGen errors on webapp reload +1 Like Ken, I won't be able to attend, but slides would certainly be a great resource that we can read and send people to read when they come whiling to the list. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknt/eoACgkQ9CaO5/Lv0PCCwwCgknlsSA/XIzb/GeiofdATRoaK hPMAoISEzUAgtymBJiFD4UnmJrzhUF7U =F4EI -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Rediscover Hotmail®: Get e-mail storage that grows with you. http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009
Re: What Tomcat presentations / demos / discussions do you want to see at ApacheCon US 2009?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin, On 4/21/2009 1:17 PM, Martin Gainty wrote: when/where? We are talking about a presentation in the future. It might/will be at the next ApacheCON (in Oakland, CA, USA - Nov 2 to 6 2009). You can read all about the original request in ... the OP. avialable link(s)? Um http://www.us.apachecon.com/c/acus2009/ ? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuApQACgkQ9CaO5/Lv0PD0xgCdHdiQ32dfEykhR8dk1CTyztzt D1gAn1P248b39I5mBKGeo97d7NhlvXJO =plDH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: What Tomcat presentations / demos / discussions do you want to see at ApacheCon US 2009?
will oracle be there? thanks, Martin __ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Tue, 21 Apr 2009 13:29:56 -0400 From: ch...@christopherschultz.net To: users@tomcat.apache.org Subject: Re: What Tomcat presentations / demos / discussions do you want to see at ApacheCon US 2009? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin, On 4/21/2009 1:17 PM, Martin Gainty wrote: when/where? We are talking about a presentation in the future. It might/will be at the next ApacheCON (in Oakland, CA, USA - Nov 2 to 6 2009). You can read all about the original request in ... the OP. avialable link(s)? Um http://www.us.apachecon.com/c/acus2009/ ? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuApQACgkQ9CaO5/Lv0PD0xgCdHdiQ32dfEykhR8dk1CTyztzt D1gAn1P248b39I5mBKGeo97d7NhlvXJO =plDH -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Rediscover Hotmail®: Get e-mail storage that grows with you. http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009
Re: What Tomcat presentations / demos / discussions do you want to see at ApacheCon US 2009?
HmmI think this list is getting to be more more fun: tr.v. whiled, whil·ing, whiles To spend (time) idly or pleasantly: while the hours away. On Apr 21, 2009, at 1:10 PM, Christopher Schultz wrote: whiling to the list.
RE: What Tomcat presentations / demos / discussions do you want to see at ApacheCon US 2009?
Will these talks be archived for future reference for those of us who can't make it :) :) -Original Message- From: Ken Bowen [mailto:kbo...@als.com] Sent: Tuesday, April 21, 2009 2:09 PM To: Tomcat Users List Subject: Re: What Tomcat presentations / demos / discussions do you want to see at ApacheCon US 2009? HmmI think this list is getting to be more more fun: tr.v. whiled, whil*ing, whiles To spend (time) idly or pleasantly: while the hours away. On Apr 21, 2009, at 1:10 PM, Christopher Schultz wrote: whiling to the list. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploying to Tomcat Server
Is anyone going to respond to my question? Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Richard Coutinho richardcouti...@shaw.ca Date: Mon, 20 Apr 2009 22:43:50 To: users@tomcat.apache.org Cc: users-i...@tomcat.apache.org Subject: Deploying to Tomcat Server Hello: I am using Netbeans 6.5 IDE to deploy to Tomcat 4.1 server. This Tomcat server cannot be registered with the Netbeans tool as it is an older version of Tomcat. I follow the instructions and try to start the Tomcat server from the IDE [see syntax below]. If I run it from the IDE or simply run the startup.bat file I get the following error:- -Dsun.io.useCanonCaches=false How can I fix this problem, so that I can start the Tomcat 4.1 server? Thanks Richard target name=startcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\startup.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target target name=run depends=compile exec executable=C:\Program Files\Mozilla Firefox\firefox.exe arg value=http://localhost:8080/WebApplication4/${client.urlPart}/ /exec /target target name=stopcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\shutdown.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target
Re: Deploying to Tomcat Server
Sounds like a netbeans / ant problem. Rather than Tomcat, sorry. p Richard Coutinho wrote: Is anyone going to respond to my question? Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Richard Coutinho richardcouti...@shaw.ca Date: Mon, 20 Apr 2009 22:43:50 To: users@tomcat.apache.org Cc: users-i...@tomcat.apache.org Subject: Deploying to Tomcat Server Hello: I am using Netbeans 6.5 IDE to deploy to Tomcat 4.1 server. This Tomcat server cannot be registered with the Netbeans tool as it is an older version of Tomcat. I follow the instructions and try to start the Tomcat server from the IDE [see syntax below]. If I run it from the IDE or simply run the startup.bat file I get the following error:- -Dsun.io.useCanonCaches=false How can I fix this problem, so that I can start the Tomcat 4.1 server? Thanks Richard target name=startcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\startup.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target target name=run depends=compile exec executable=C:\Program Files\Mozilla Firefox\firefox.exe arg value=http://localhost:8080/WebApplication4/${client.urlPart}/ /exec /target target name=stopcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\shutdown.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploying to Tomcat Server
Since you put it that way, how much you payin'? Besides, -Dsun.io. is not an error. It's at best a command line option to the JVM. --David Richard Coutinho wrote: Is anyone going to respond to my question? Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Richard Coutinho richardcouti...@shaw.ca Date: Mon, 20 Apr 2009 22:43:50 To: users@tomcat.apache.org Cc: users-i...@tomcat.apache.org Subject: Deploying to Tomcat Server Hello: I am using Netbeans 6.5 IDE to deploy to Tomcat 4.1 server. This Tomcat server cannot be registered with the Netbeans tool as it is an older version of Tomcat. I follow the instructions and try to start the Tomcat server from the IDE [see syntax below]. If I run it from the IDE or simply run the startup.bat file I get the following error:- -Dsun.io.useCanonCaches=false How can I fix this problem, so that I can start the Tomcat 4.1 server? Thanks Richard target name=startcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\startup.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target target name=run depends=compile exec executable=C:\Program Files\Mozilla Firefox\firefox.exe arg value=http://localhost:8080/WebApplication4/${client.urlPart}/ /exec /target target name=stopcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\shutdown.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Deploying to Tomcat Server
Yes this is most certainly a tomcat/ant issue - probably a tomcat issue - something in startup.bat since you say that you cannot even run the ide using startup.bat Looks like a misplaced quote someplace in the bat file. Good luck, Shaun -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Tuesday, April 21, 2009 2:39 PM To: Tomcat Users List Subject: Re: Deploying to Tomcat Server Sounds like a netbeans / ant problem. Rather than Tomcat, sorry. p Richard Coutinho wrote: Is anyone going to respond to my question? Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Richard Coutinho richardcouti...@shaw.ca Date: Mon, 20 Apr 2009 22:43:50 To: users@tomcat.apache.org Cc: users-i...@tomcat.apache.org Subject: Deploying to Tomcat Server Hello: I am using Netbeans 6.5 IDE to deploy to Tomcat 4.1 server. This Tomcat server cannot be registered with the Netbeans tool as it is an older version of Tomcat. I follow the instructions and try to start the Tomcat server from the IDE [see syntax below]. If I run it from the IDE or simply run the startup.bat file I get the following error:- -Dsun.io.useCanonCaches=false How can I fix this problem, so that I can start the Tomcat 4.1 server? Thanks Richard target name=startcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\startup.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target target name=run depends=compile exec executable=C:\Program Files\Mozilla Firefox\firefox.exe arg value=http://localhost:8080/WebApplication4/${client.urlPart}/ /exec /target target name=stopcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\shutdown.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target - 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: Deploying to Tomcat Server
Thanks Shaun Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Shaun Farrugia sfarru...@fry.com Date: Tue, 21 Apr 2009 14:44:43 To: Tomcat Users Listusers@tomcat.apache.org; p...@pidster.comp...@pidster.com Subject: RE: Deploying to Tomcat Server Yes this is most certainly a tomcat/ant issue - probably a tomcat issue - something in startup.bat since you say that you cannot even run the ide using startup.bat Looks like a misplaced quote someplace in the bat file. Good luck, Shaun -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Tuesday, April 21, 2009 2:39 PM To: Tomcat Users List Subject: Re: Deploying to Tomcat Server Sounds like a netbeans / ant problem. Rather than Tomcat, sorry. p Richard Coutinho wrote: Is anyone going to respond to my question? Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Richard Coutinho richardcouti...@shaw.ca Date: Mon, 20 Apr 2009 22:43:50 To: users@tomcat.apache.org Cc: users-i...@tomcat.apache.org Subject: Deploying to Tomcat Server Hello: I am using Netbeans 6.5 IDE to deploy to Tomcat 4.1 server. This Tomcat server cannot be registered with the Netbeans tool as it is an older version of Tomcat. I follow the instructions and try to start the Tomcat server from the IDE [see syntax below]. If I run it from the IDE or simply run the startup.bat file I get the following error:- -Dsun.io.useCanonCaches=false How can I fix this problem, so that I can start the Tomcat 4.1 server? Thanks Richard target name=startcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\startup.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target target name=run depends=compile exec executable=C:\Program Files\Mozilla Firefox\firefox.exe arg value=http://localhost:8080/WebApplication4/${client.urlPart}/ /exec /target target name=stopcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\shutdown.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target - 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
Apache Tomcat 503 errors
Hello, I posted this on the Apache list a while back and didn't get any response. I'm running Fedora Core 5, httpd-2.2.2-1.2 (worker MPM), Tomcat 5.5.17, Java jdk1.5.0_07. I have about 40 connections/apps from Apache to Tomcat like so: ProxyPass /foo ajp://localhost:8009/foo/ I am getting a fair amount of 503 errors. Logs look like this: Tomcat catalina.out Mar 29, 2009 1:35:23 PM org.apache.jk.core.MsgContext action WARNING: Error sending end packet java.net.SocketException: Broken pipe Apache ssl_access xxx.xxx.xxx.102 - - [29/Mar/2009:13:35:18 -0400] POST /foo/bar HTTP/1.1 503 40920 Apache ssl_error [Sun Mar 29 13:35:22 2009] [error] [client xxx.xxx.xxx.102] proxy: error processing body, referer: https://foo.bar.com/foo/bar [Sun Mar 29 13:35:22 2009] [error] proxy: got bad response (5) from 127.0.0.1:8009 (localhost) The times are not exact matches but the pattern is consistent. I don't know if this is a Tomcat problem or Apache/mod_proxy. Many requests are GET - not all POST. The client hasn't complained about specifically seeing the 503 error, it could be hidden or messing things up in some other way (like my AJAX backend). Can anyone give me some guidance here? Googling the log entries does't amount to much. The feedback on java.net.SocketException: Broken pipe seems to be that it's harmless, but it does coincide with Apache errors and ultimately 503, so I don't think it's a simple case of the user hitting the stop button. Is there a preferred alternative to connecting Apache and Tomcat? Or is mod_proxy the best? Thanks for the help. P.S. I know the system is old, and you might be inclined to tell me to upgrade but I don't have that option at the moment. Any ideas on what to explore would be helpful. -- Daryl Stultz _ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com mailto:da...@6degrees.com
Re: Deploying to Tomcat Server
Shaun Who would I contact to verify the startup.bat file? Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Richard Coutinho richardcouti...@shaw.ca Date: Tue, 21 Apr 2009 18:54:10 To: Tomcat Users Listusers@tomcat.apache.org Subject: Re: Deploying to Tomcat Server Thanks Shaun Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Shaun Farrugia sfarru...@fry.com Date: Tue, 21 Apr 2009 14:44:43 To: Tomcat Users Listusers@tomcat.apache.org; p...@pidster.comp...@pidster.com Subject: RE: Deploying to Tomcat Server Yes this is most certainly a tomcat/ant issue - probably a tomcat issue - something in startup.bat since you say that you cannot even run the ide using startup.bat Looks like a misplaced quote someplace in the bat file. Good luck, Shaun -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Tuesday, April 21, 2009 2:39 PM To: Tomcat Users List Subject: Re: Deploying to Tomcat Server Sounds like a netbeans / ant problem. Rather than Tomcat, sorry. p Richard Coutinho wrote: Is anyone going to respond to my question? Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Richard Coutinho richardcouti...@shaw.ca Date: Mon, 20 Apr 2009 22:43:50 To: users@tomcat.apache.org Cc: users-i...@tomcat.apache.org Subject: Deploying to Tomcat Server Hello: I am using Netbeans 6.5 IDE to deploy to Tomcat 4.1 server. This Tomcat server cannot be registered with the Netbeans tool as it is an older version of Tomcat. I follow the instructions and try to start the Tomcat server from the IDE [see syntax below]. If I run it from the IDE or simply run the startup.bat file I get the following error:- -Dsun.io.useCanonCaches=false How can I fix this problem, so that I can start the Tomcat 4.1 server? Thanks Richard target name=startcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\startup.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target target name=run depends=compile exec executable=C:\Program Files\Mozilla Firefox\firefox.exe arg value=http://localhost:8080/WebApplication4/${client.urlPart}/ /exec /target target name=stopcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\shutdown.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target - 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 Tomcat presentations / demos / discussions do you want to see at ApacheCon US 2009?
Shaun Farrugia wrote: Will these talks be archived for future reference for those of us who can't make it :) :) Yes. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Deploying to Tomcat Server
bat(ch) files are run thru a command processor such as bash or cmd.exe /C as in example exec executable=cmd.exe arg value=/c/ arg line=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\startup.bat / env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec http://ant.apache.org/manual/CoreTasks/exec.html Martin Gainty __ Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: sfarru...@fry.com To: users@tomcat.apache.org; p...@pidster.com Date: Tue, 21 Apr 2009 14:44:43 -0400 Subject: RE: Deploying to Tomcat Server Yes this is most certainly a tomcat/ant issue - probably a tomcat issue - something in startup.bat since you say that you cannot even run the ide using startup.bat Looks like a misplaced quote someplace in the bat file. Good luck, Shaun -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Tuesday, April 21, 2009 2:39 PM To: Tomcat Users List Subject: Re: Deploying to Tomcat Server Sounds like a netbeans / ant problem. Rather than Tomcat, sorry. p Richard Coutinho wrote: Is anyone going to respond to my question? Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Richard Coutinho richardcouti...@shaw.ca Date: Mon, 20 Apr 2009 22:43:50 To: users@tomcat.apache.org Cc: users-i...@tomcat.apache.org Subject: Deploying to Tomcat Server Hello: I am using Netbeans 6.5 IDE to deploy to Tomcat 4.1 server. This Tomcat server cannot be registered with the Netbeans tool as it is an older version of Tomcat. I follow the instructions and try to start the Tomcat server from the IDE [see syntax below]. If I run it from the IDE or simply run the startup.bat file I get the following error:- -Dsun.io.useCanonCaches=false How can I fix this problem, so that I can start the Tomcat 4.1 server? Thanks Richard target name=startcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\startup.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target target name=run depends=compile exec executable=C:\Program Files\Mozilla Firefox\firefox.exe arg value=http://localhost:8080/WebApplication4/${client.urlPart}/ /exec /target target name=stopcat4 depends=init exec executable=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39\bin\shutdown.bat env key=CATALINA_HOME value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ env key=CATALINA_BASE value=C:\apache-tomcat-4.1.39\apache-tomcat-4.1.39/ /exec /target - 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 _ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009
Re: Deploying to Tomcat Server
Richard Coutinho wrote: Shaun Who would I contact to verify the startup.bat file? Richard, following your desperate call, we had a meeting here at work with all our Tomcat and Java experts to study the problem. After two hours we were not really making any headway, but the blonde cleaning lady overheard us and suggested : Could he not for instance, like download Tomcat 4.1 again, from the Tomcat site (the zip version, not the Windows installer), unzip it somewhere and compare the startup.bat with his ? I think you may want to try that, who knows ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Deploying to Tomcat Server
From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Subject: Re: Deploying to Tomcat Server Who would I contact to verify the startup.bat file? Yourself? You might try downloading a vanilla copy of Tomcat 4.1 from the tomcat.apache.org web site and look for differences. Also note that Tomcat allow specification of command-line properties via environment variables, and you may have one with an invalid value. The variables are CATALINA_OPTS and JAVA_OPTS in more modern versions of Tomcat; I don't know if there's anything corresponding in the ancient one you're using. - 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: Deploying to Tomcat Server
Thanks I will try downloading again Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: André Warnier a...@ice-sa.com Date: Tue, 21 Apr 2009 21:17:18 To: Tomcat Users Listusers@tomcat.apache.org Subject: Re: Deploying to Tomcat Server Richard Coutinho wrote: Shaun Who would I contact to verify the startup.bat file? Richard, following your desperate call, we had a meeting here at work with all our Tomcat and Java experts to study the problem. After two hours we were not really making any headway, but the blonde cleaning lady overheard us and suggested : Could he not for instance, like download Tomcat 4.1 again, from the Tomcat site (the zip version, not the Windows installer), unzip it somewhere and compare the startup.bat with his ? I think you may want to try that, who knows ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploying to Tomcat Server
Thanks again. Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Caldarale, Charles R chuck.caldar...@unisys.com Date: Tue, 21 Apr 2009 14:22:34 To: Tomcat Users Listusers@tomcat.apache.org Subject: RE: Deploying to Tomcat Server From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Subject: Re: Deploying to Tomcat Server Who would I contact to verify the startup.bat file? Yourself? You might try downloading a vanilla copy of Tomcat 4.1 from the tomcat.apache.org web site and look for differences. Also note that Tomcat allow specification of command-line properties via environment variables, and you may have one with an invalid value. The variables are CATALINA_OPTS and JAVA_OPTS in more modern versions of Tomcat; I don't know if there's anything corresponding in the ancient one you're using. - 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: Undeploy does not delete all .jar files
From: JT [mailto:jltoo...@gmail.com] Subject: Re: Undeploy does not delete all .jar files I added this inside of my conf/context.xml file. That was pointless - that pretty much corrupts everything. The conf/context.xml file is used *only* for specifying attributes that you want common to *all* webapps. Including a path or docBase attribute is non-sensical, and its effect is undefined when used there. Put that file back to the way it was. Create a context.xml file in your webapp's META-INF directory to contain *just* the antiJARLocking and antiResourceLocking attributes; do *not* set path or docBase, since they are illegal in this instance. Stop Tomcat, make sure there's no conf/Catalina/[host]/[appName].xml file present, replace your .war file with the updated one, delete the expanded directory, and delete everything under Tomcat's work directory, then restart Tomcat 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: Installing mod_jk 1.2.27 on NetWare 6.5 SP8
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Vladimir, On 4/17/2009 1:07 PM, Vladimir Mikhelson wrote: I downloaded the binary mod_jk-1.2.27-httpd-2.0.63-nw.zip Unfortunately I was getting the following in the httpd message screen: Syntax error on line 638 of SYS:/apache2/conf/httpd.conf: JkWorkersFile only allowed once Could you post more of your httpd.conf file? The error message is pretty self-explanatory line 638 is probably the /second/ place JkWorkersFile is mentioned in httpd.conf, so you should look for other places. Here is the part of the httpd.conf where the loader failed: Line 636 # TABLE: (4) Line 637 IfModule mod_jk.c Line 638 JkWorkersFile sys:/adminsrv/conf/mod_jk/workers.properties Line 639 JkLogFile logs/mod_jk.log Line 640 JkLogLevel error Line 641 /IfModule NetWare loads httpd in the Admin and then in the OS memory spaces. The problem is observed on the second load. Hmm I'm not familiar enough with netware to know what you mean when you say that you load it in the Admin and OS memory spaces. Why are you running httpd more than once? Do you think that it is something that Tomcat people can take care of or is something where Novell should make their special binary? While mod_jk is pretty much a product to support Tomcat (or other Java web application servers), the code itself is separate from Tomcat and maintained by different people. Two of the mod_jk developers lurk on this list and may be able to help, but I suspect your problem is configuration-related and not a problem with mod_jk itself. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuJlMACgkQ9CaO5/Lv0PBqqgCgnuXZblKZMs0fKuSr55k77Lht P/4An1p9z5Hy3txuVeNwqul/Q98wKANh =Vgxp -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: GlobalNamingResources outside of server.xml
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tony, On 4/17/2009 1:01 PM, Anthony J. Biacco wrote: I'd like to know if it's possible to now put the Resource directives in a file separate from server.xml and still keep them global? I don't believe Tomcat itself has any support for this type of thing. The server.xml files in my production/dev/staging environments are different, and I'd like to be able to just deploy a separate consistent file for all environments. What kind of resources are we talking about, here? Maybe something like using DOCTYPE/ENTITY? !DOCTYPE Server [ !ENTITY inc_resources SYSTEM /opt/apps/tomcat/conf/resources.xml ] And then putting inc_resources; inside the GlobalNamingResources directive in server.xml If the XML parser being used by Tomcat is willing to resolve the reference, then it would probably work. Did you try it? What happened? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuJ5AACgkQ9CaO5/Lv0PDFjQCfW2nocpR9b1xnX5puIqq9KcE5 YcgAnR9ZRNAiXeSQl67WojpmfQ2vZa35 =qzRB -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: windows 2k3 / Tomcat 6 / IIS configuration - randomly losing sessions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael, On 4/19/2009 3:09 PM, Menachem Husarsky wrote: We have multiple sites on our old host that ran under IIS and Resin fine for years, we recently switched to a dedicated server using windows 2k3 [still using IIS with Tomcat 6.0.x connected with mod_jk's isapi redirector version 1.2.27]. [snip] The problem started from day one. each day across all our sites, some shoppers will randomly have their carts purged out right in the middle of their checkout process. Are all your customers using Cookies? If some people are using URL rewriting because cookies aren't supported, you might be losing the session id due to an accidentally non-encoded URL. But that would have had the same problem under Resin, so it's unlikely to be the problem. Do you ever switch hostnames during any of the website interactions? That would break your Cookie trail and you would observe the user's session disappearing. The same thing can happen if the session cookie was created using HTTPS and then you switch to HTTP. My only conclusion is somehow these customers are losing their sessions and being issued new ones. It seems to do this randomly and I can't seem to replicate the error myself, but I am recording how often it occurs to other people. Can you give us more information about the circumstances? Does it always happen during a particular page transition? What else do these failures have in common? I'm uncertain who is the culprit here (IIS or Tomcat or TomcatRedirector). It's unlikely to be IIS or the redirector... they just pass-through the session identification information to Tomcat. I have read other entries with people who have similar problems, but there doesn't seem to be much in the way of solutions. I think that's because these issues are often complex and the solutions are not very generalizable. The problem typically turns out to be the application itself or network configuration or something like that. There is no setting in Tomcat to make it stop losing your sessions (and if there were, I'm sure it would be on by default). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuKX4ACgkQ9CaO5/Lv0PCKnwCfdwp3UXUckpV49KjOS5wUg27s ESkAoKWLl3Dl8owc8CvyrdHGsrIz3vNB =E4s5 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Installing mod_jk 1.2.27 on NetWare 6.5 SP8
Christopher, I have received an off-line reply from Rainer Jung who suggested to discuss the issue with Gunter Knauf, the person responsible for NetWare binaries compilation. According to Rainer, The check for multiple JkWorkersFile directives in the config has been added in revision 580793, so between 1.2.25 and 1.2.26. It seems to me the mod_jk developers overlooked the NetWare specifics where the same process can run independently in different memory spaces. JkWorkersFile is instantiated once per httpd instance. There are potentially multiple instances of the same process allowed in NetWare. Apparently that causes some problem with new version of mod_jk. FYI, version 1.2.23 runs fine on the same .conf files. Thank you, Vladimir Christopher Schultz wrote: Vladimir, On 4/17/2009 1:07 PM, Vladimir Mikhelson wrote: I downloaded the binary mod_jk-1.2.27-httpd-2.0.63-nw.zip Unfortunately I was getting the following in the httpd message screen: Syntax error on line 638 of SYS:/apache2/conf/httpd.conf: JkWorkersFile only allowed once Could you post more of your httpd.conf file? The error message is pretty self-explanatory line 638 is probably the /second/ place JkWorkersFile is mentioned in httpd.conf, so you should look for other places. Here is the part of the httpd.conf where the loader failed: Line 636 # TABLE: (4) Line 637 IfModule mod_jk.c Line 638 JkWorkersFile sys:/adminsrv/conf/mod_jk/workers.properties Line 639 JkLogFile logs/mod_jk.log Line 640 JkLogLevel error Line 641 /IfModule NetWare loads httpd in the Admin and then in the OS memory spaces. The problem is observed on the second load. Hmm I'm not familiar enough with netware to know what you mean when you say that you load it in the Admin and OS memory spaces. Why are you running httpd more than once? Do you think that it is something that Tomcat people can take care of or is something where Novell should make their special binary? While mod_jk is pretty much a product to support Tomcat (or other Java web application servers), the code itself is separate from Tomcat and maintained by different people. Two of the mod_jk developers lurk on this list and may be able to help, but I suspect your problem is configuration-related and not a problem with mod_jk itself. -chris - 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
Headstart on Resolving OOM-PermGen errors on webapp reload
Mark, Any chance we could make a headstart on Resolving OOM-PermGen errors on webapp reload ?? Perhaps some general pointers, guidance etc. [to help you refine the talk in advance :-) ] The manager app is giving me more more of: FAIL - Application at context path /ctx could not be started FAIL - Encountered exception java.lang.OutOfMemoryError: PermGen space This is on a Tomcat 6.0.18 (java 1.5) running on a remote Linux CentOS 5, in a Parallels VM, with httpd + mod_jk, running two versions of the app. Total memory available is 432 MB, with a number of non-system, non-TC processes, including ActiveMQ and 9 Postres processes. But there appears to be about 200MB of unused memory according to the Parallels control panel. I develop locally on a Mac OS/X 10.5.6 box with 4GBmem using (My)Eclipse and Tomcat 6.0.18 directly. With lots lots of reloads, I'm not surprised that I eventually hit OOM PermGen space in this setting, but it happens much less often than on the CentOS box (of course 4GB != 432MB). Thanks...Ken Mark Thomas wrote: I was at a conference recently and rather rashly made the statement OOM PermGen errors on reload are an application issue, not a Tomcat one. Several people came up to me afterwards with variations on a theme of Our app has OOM on reload - put your money where your mouth is and show us where we have gone wrong Having helped several people track down the causes of these errors (and yes they were all application issues) it occurred to me that there may be interest in this at ApacheCon. So my suggestion is: Title:Resolving OOM-PermGen errors on webapp reload Type: Session Abstract: What causes the error. Typical root causes. How to find and fix the root causes. With live demo. Audience: Developer/SysAdmin Thoughts? Mark
Re: Undeploy does not delete all .jar files
That didn't work either. This is what I did. I put back what I had in the conf/context.xml file. I still had the path and docBase so all I took out was the antiJARLocking=true antiResourceLocking=true. Then I created a context.xml in my application's META-INF that looks like this... Context antiJARLocking=true antiResourceLocking=true/ That's all that i have in that file. I deleted everything under work and there was not a file in conf/Catalina/localhost/test.xml. There was only host-manager.xml and manger.xml. Then I restarted Tomcat and added the new .war file to webapps and that created a new directory, but still it would not undeploy correctly. Thanks! On Tue, Apr 21, 2009 at 3:56 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: JT [mailto:jltoo...@gmail.com] Subject: Re: Undeploy does not delete all .jar files I added this inside of my conf/context.xml file. That was pointless - that pretty much corrupts everything. The conf/context.xml file is used *only* for specifying attributes that you want common to *all* webapps. Including a path or docBase attribute is non-sensical, and its effect is undefined when used there. Put that file back to the way it was. Create a context.xml file in your webapp's META-INF directory to contain *just* the antiJARLocking and antiResourceLocking attributes; do *not* set path or docBase, since they are illegal in this instance. Stop Tomcat, make sure there's no conf/Catalina/[host]/[appName].xml file present, replace your .war file with the updated one, delete the expanded directory, and delete everything under Tomcat's work directory, then restart Tomcat 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: Deploying to Tomcat Server
Did this work for you? -Original Message- From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Sent: Tuesday, April 21, 2009 3:32 PM To: Tomcat Users List Subject: Re: Deploying to Tomcat Server Thanks again. Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Caldarale, Charles R chuck.caldar...@unisys.com Date: Tue, 21 Apr 2009 14:22:34 To: Tomcat Users Listusers@tomcat.apache.org Subject: RE: Deploying to Tomcat Server From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Subject: Re: Deploying to Tomcat Server Who would I contact to verify the startup.bat file? Yourself? You might try downloading a vanilla copy of Tomcat 4.1 from the tomcat.apache.org web site and look for differences. Also note that Tomcat allow specification of command-line properties via environment variables, and you may have one with an invalid value. The variables are CATALINA_OPTS and JAVA_OPTS in more modern versions of Tomcat; I don't know if there's anything corresponding in the ancient one you're using. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploying to Tomcat Server
I will confirm later tonight. I looked at the bat file and I think I need to define an environment variable called $CATALINA_HOME pointing to the local Tomcat directory I am developing this website for a non-profit group to which I belong on my own time for free. This is my way of giving back to the community. Thx Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Shaun Farrugia sfarru...@fry.com Date: Tue, 21 Apr 2009 16:37:49 To: Tomcat Users Listusers@tomcat.apache.org; richardcouti...@shaw.carichardcouti...@shaw.ca Subject: RE: Deploying to Tomcat Server Did this work for you? -Original Message- From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Sent: Tuesday, April 21, 2009 3:32 PM To: Tomcat Users List Subject: Re: Deploying to Tomcat Server Thanks again. Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Caldarale, Charles R chuck.caldar...@unisys.com Date: Tue, 21 Apr 2009 14:22:34 To: Tomcat Users Listusers@tomcat.apache.org Subject: RE: Deploying to Tomcat Server From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Subject: Re: Deploying to Tomcat Server Who would I contact to verify the startup.bat file? Yourself? You might try downloading a vanilla copy of Tomcat 4.1 from the tomcat.apache.org web site and look for differences. Also note that Tomcat allow specification of command-line properties via environment variables, and you may have one with an invalid value. The variables are CATALINA_OPTS and JAVA_OPTS in more modern versions of Tomcat; I don't know if there's anything corresponding in the ancient one you're using. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: GlobalNamingResources outside of server.xml
I did end up trying it and it did work, I just didn't know if it was something that's frowned upon, or would for whatever reason was planned to be phased out/deprecated. The resources are JDBC definitions. -Tony --- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 abia...@formatdynamics.com http://www.formatdynamics.com -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, April 21, 2009 2:08 PM To: Tomcat Users List Subject: Re: GlobalNamingResources outside of server.xml -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tony, On 4/17/2009 1:01 PM, Anthony J. Biacco wrote: I'd like to know if it's possible to now put the Resource directives in a file separate from server.xml and still keep them global? I don't believe Tomcat itself has any support for this type of thing. The server.xml files in my production/dev/staging environments are different, and I'd like to be able to just deploy a separate consistent file for all environments. What kind of resources are we talking about, here? Maybe something like using DOCTYPE/ENTITY? !DOCTYPE Server [ !ENTITY inc_resources SYSTEM /opt/apps/tomcat/conf/resources.xml ] And then putting inc_resources; inside the GlobalNamingResources directive in server.xml If the XML parser being used by Tomcat is willing to resolve the reference, then it would probably work. Did you try it? What happened? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuJ5AACgkQ9CaO5/Lv0PDFjQCfW2nocpR9b1xnX5puIqq9KcE5 YcgAnR9ZRNAiXeSQl67WojpmfQ2vZa35 =qzRB -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploying to Tomcat Server
Looks like the -Dsun message is coming from the catalina.bat file I will look more closely at this file. I will let you know how this gets resolved. Thanks again Go Canucks Go! Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Richard Coutinho richardcouti...@shaw.ca Date: Tue, 21 Apr 2009 21:14:51 To: Tomcat Users Listusers@tomcat.apache.org Subject: Re: Deploying to Tomcat Server I will confirm later tonight. I looked at the bat file and I think I need to define an environment variable called $CATALINA_HOME pointing to the local Tomcat directory I am developing this website for a non-profit group to which I belong on my own time for free. This is my way of giving back to the community. Thx Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Shaun Farrugia sfarru...@fry.com Date: Tue, 21 Apr 2009 16:37:49 To: Tomcat Users Listusers@tomcat.apache.org; richardcouti...@shaw.carichardcouti...@shaw.ca Subject: RE: Deploying to Tomcat Server Did this work for you? -Original Message- From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Sent: Tuesday, April 21, 2009 3:32 PM To: Tomcat Users List Subject: Re: Deploying to Tomcat Server Thanks again. Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Caldarale, Charles R chuck.caldar...@unisys.com Date: Tue, 21 Apr 2009 14:22:34 To: Tomcat Users Listusers@tomcat.apache.org Subject: RE: Deploying to Tomcat Server From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Subject: Re: Deploying to Tomcat Server Who would I contact to verify the startup.bat file? Yourself? You might try downloading a vanilla copy of Tomcat 4.1 from the tomcat.apache.org web site and look for differences. Also note that Tomcat allow specification of command-line properties via environment variables, and you may have one with an invalid value. The variables are CATALINA_OPTS and JAVA_OPTS in more modern versions of Tomcat; I don't know if there's anything corresponding in the ancient one you're using. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Log messages appearing twice
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 SM, Marking as OT because this is not Tomcat-related. On 4/21/2009 12:15 PM, Security Management wrote: In the application log, separate file (the test.log). I only have 1 copy of log4j.jar in the apache directory, too (my webapps copy). Here's an example: 2009-04-21 11:50:59,903 [main] DEBUG com.secmgmt.beans.picture.four.PPDoorProvider - Loading Door Provider 2009-04-21 11:50:59,903 [main] DEBUG com.secmgmt.beans.picture.four.PPDoorProvider - Loading Door Provider [...] log4j.appender.A1=org.apache.log4j.FileAppender log4j.appender.A1.File=${catalina.home}/logs/test.log log4j.appender.A1.MaxFileSize=100MB log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.rootLogger=INFO, A1 This is either not your log4j configuration file, not your entire log4j configuration file, or not the one actually being used: you have DEBUG messages in your log file when your root logger specifically says that INFO is the lowest level to log. Care to post corroborating configuration and results? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuOekACgkQ9CaO5/Lv0PAyqwCgmlQNNHmAUZUeFxwbdkE6xXMQ 19UAoJWM8Cq+xRl0KWLZ9yTCcFv8cz0i =U9JE -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Undeploy does not delete all .jar files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 JT, On 4/21/2009 4:35 PM, JT wrote: That didn't work either. This is what I did. I put back what I had in the conf/context.xml file. I still had the path and docBase Yeah, that's still a problem. Here's what your conf/context.xml should look like (minus standard comments). Context WatchedResourceWEB-INF/web.xml/WatchedResource /Context Adding the path and docBase attributes will break pretty much everything, either now or later. Please take them out whether you understand or not. Context antiJARLocking=true antiResourceLocking=true/ That's good. That's all that i have in that file. I deleted everything under work and there was not a file in conf/Catalina/localhost/test.xml. There was only host-manager.xml and manger.xml. Then I restarted Tomcat and added the new .war file to webapps and that created a new directory, but still it would not undeploy correctly. Make the above changes and try again. It still might not fix your issue, but putting docBase and path into your Context like this will lead to lots of troubles. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuOtIACgkQ9CaO5/Lv0PBMiQCfbZwsVXgPtK3LPx6zRoRjGZBd YbUAn1KerwAaNg9zBH7AhFSH8dRdJPZJ =tivY -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with maximum threads
Chuck, This is the number of threads Tomcat will handle before it errors with 'max threads reached. This is on OS X, 64 bit memory. The heap size is 2 gigs. If you know how to increase this number, then please provide the information. Others have also noted this limit on OS X in previous posts to this list. Stephen On Apr 21, 2009, at 9:38 AM, Caldarale, Charles R wrote: From: Stephen Caine [mailto:step...@commongrnd.com] Subject: Re: Problem with maximum threads However, the maximum number of threads Tomcat will handle is somewhere about 2400. I'm curious: where did you conjure up that number? The actual limit will vary greatly depending on platform, JVM level, heap size, heap usage, and especially 32- or 64-bit environments. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Deploying to Tomcat Server
From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Subject: Re: Deploying to Tomcat Server I looked at the bat file and I think I need to define an environment variable called $CATALINA_HOME pointing to the local Tomcat directory You shouldn't have to do that. The startup.bat script sets the value of CATALINA_HOME before calling catalina.bat; if an appropriate value can't be determined, catalina.bat never gets called. (Again, this behavior is for Tomcat 5.5 and later; you'll have to examine the script yourself for the 4.1 level.) - 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: Headstart on Resolving OOM-PermGen errors on webapp reload
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ken, On 4/21/2009 4:32 PM, Ken Bowen wrote: I develop locally on a Mac OS/X 10.5.6 box with 4GBmem using (My)Eclipse and Tomcat 6.0.18 directly. With lots lots of reloads, I'm not surprised that I eventually hit OOM PermGen space in this setting, but it happens much less often than on the CentOS box (of course 4GB != 432MB). Can you observe your heap and which ClassLoaders are still hanging around? You might want to check to see how many org/apache/catalina/loader/WebappClassLoader objects are still live. In my web application, just after a Tomcat startup, I have 2 instances of this class, both of which are live. After an application reload, I can see that I still have 2 live WebappClassLoaders: one of them is the same one that was live before the app reload (probably the Shared webapp ClassLoader - I'm using TC 5.5) and the other one is a new one that appears to have replaced the old one (which should be expected, since the old one should be discarded after the undeploy). If you find multiple WebappClassLoader objects still hanging around, you can probably start looking for the objects they actually own. Those will give you a clue as to what services or objects aren't being cleaned-up correctly when your application shuts down. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuPiUACgkQ9CaO5/Lv0PBZ9gCgwnO0rP3j40m32+vI1jmy0qaI 9w0AoMCt+AteT1uv+vvrgCbpteNV9rGb =X9YG -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: GlobalNamingResources outside of server.xml
Anthony J. Biacco wrote: I did end up trying it and it did work, I just didn't know if it was something that's frowned upon, or would for whatever reason was planned to be phased out/deprecated. Nope. That is absolutely fine. I know of a number of large corporations that use that feature extensively. We get it essentially for free with the xml parser so it is going to stay. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: GlobalNamingResources outside of server.xml
Thanx very much -Tony --- Manager, IT Operations Format Dynamics, Inc. 303-573-1800x27 abia...@formatdynamics.com http://www.formatdynamics.com -Original Message- From: Mark Thomas [mailto:ma...@apache.org] Sent: Tuesday, April 21, 2009 3:48 PM To: Tomcat Users List Subject: Re: GlobalNamingResources outside of server.xml Anthony J. Biacco wrote: I did end up trying it and it did work, I just didn't know if it was something that's frowned upon, or would for whatever reason was planned to be phased out/deprecated. Nope. That is absolutely fine. I know of a number of large corporations that use that feature extensively. We get it essentially for free with the xml parser so it is going to stay. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Problem with maximum threads
From: Stephen Caine [mailto:step...@commongrnd.com] Subject: Re: Problem with maximum threads This is the number of threads Tomcat will handle before it errors with 'max threads reached. This is on OS X, 64 bit memory. The heap size is 2 gigs. Looks like the 2400 has nothing to do with Tomcat, but rather with OS X (or possibly the JVM port to OS X). Your previous statement made no mention of OS X (or any other contributing factors), making it sound like you believed this was a Tomcat limit - which as far as I can tell it is not. - 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: Headstart on Resolving OOM-PermGen errors on webapp reload
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Headstart on Resolving OOM-PermGen errors on webapp reload Can you observe your heap and which ClassLoaders are still hanging around? You might want to check to see how many org/apache/catalina/loader/WebappClassLoader objects are still live. In my web application, just after a Tomcat startup, I have 2 instances of this class, both of which are live. Live is a critical attribute here - unless a full GC (or two) is done, unused classes and classloaders will still be present. Use JConsole to trigger GCs, if needed. - 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: Headstart on Resolving OOM-PermGen errors on webapp reload
Ken Bowen wrote: Mark, Any chance we could make a headstart on Resolving OOM-PermGen errors on webapp reload ?? Perhaps some general pointers, guidance etc. [to help you refine the talk in advance :-) ] The very short version. 1. Find an app that you can't reload without OOME 2. Get a profiler - I like Yourkit Full disclosure: they give ASF committers a free copy 3. Reload you app once 4. Use the profiler to look for instances of WebappClassLoader 5. Look for the one with the started attribute == false 6. Trace the GC roots for this instance 7. Fix whatever is hanging on to references to the instance - there should not be any The session (assuming it goes ahead) will do a demo of the above and expand on 7 in terms of typical culprits and possible workarounds. It will also explain what is going on and why this happens. HTH, Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Headstart on Resolving OOM-PermGen errors on webapp reload
Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Headstart on Resolving OOM-PermGen errors on webapp reload Can you observe your heap and which ClassLoaders are still hanging around? You might want to check to see how many org/apache/catalina/loader/WebappClassLoader objects are still live. In my web application, just after a Tomcat startup, I have 2 instances of this class, both of which are live. Live is a critical attribute here - unless a full GC (or two) is done, unused classes and classloaders will still be present. Use JConsole to trigger GCs, if needed. A decent profiler - cue another YourKit advert :) will skip any instances eligible for GC. Mark PS To be fair, all the profilers I have seen do this. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploying to Tomcat Server
It looks like the JAVA_HOME environment is not defined. This must be in reference to the Java SDK location. Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Caldarale, Charles R chuck.caldar...@unisys.com Date: Tue, 21 Apr 2009 16:34:08 To: Tomcat Users Listusers@tomcat.apache.org; richardcouti...@shaw.carichardcouti...@shaw.ca Subject: RE: Deploying to Tomcat Server From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Subject: Re: Deploying to Tomcat Server I looked at the bat file and I think I need to define an environment variable called $CATALINA_HOME pointing to the local Tomcat directory You shouldn't have to do that. The startup.bat script sets the value of CATALINA_HOME before calling catalina.bat; if an appropriate value can't be determined, catalina.bat never gets called. (Again, this behavior is for Tomcat 5.5 and later; you'll have to examine the script yourself for the 4.1 level.) - 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: Deploying to Tomcat Server
From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Subject: Re: Deploying to Tomcat Server It looks like the JAVA_HOME environment is not defined. This must be in reference to the Java SDK location. That you will need to set. - 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: Problem with maximum threads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stephen, On 4/21/2009 5:35 PM, Stephen Caine wrote: This is the number of threads Tomcat will handle before it errors with 'max threads reached. This is on OS X, 64 bit memory. The heap size is 2 gigs. If you know how to increase this number, then please provide the information. Others have also noted this limit on OS X in previous posts to this list. ulimit? On my Mac OS X 10.4.11, ulimit -a reports max user processes (-u switch) are set to 256. You could probably increase that by doing: ulimit -u 1024 or whatever. If you've reached an upper limit of 2400, it's probably because you're reaching a hard limit set up somewhere else. There's also: sysctl -w kern.maxprocperuid=1024 (or more?) or sysctl -w kern.maxproc=1 (or more?) (My kern.maxproc is currently set to 532 -- what a strange number -- while kern.maxprocperuid is currently 266). You can also set your defaults in /etc/sysctl.conf: kern.maxproc=1 kern.maxprocperuid=5000 I didn't know any of this before 5 minutes ago. Google is your friend. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuQ5wACgkQ9CaO5/Lv0PAAWgCcDkE+pxWHWYg7LgpYt+deUPqo ZfcAoJTtQ8RHCnWjXf127ZePRoagordH =CJ17 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Headstart on Resolving OOM-PermGen errors on webapp reload
Hi Ken (and Mark), Different Mark here... I'm new to this mailing list and am not a Tomcat developer. Forgive me if I'm interrupting your thread, but I am very interested in this topic, since I've spent a fair amount of time debugging OOM-PermGen errors within Tomcat (5.5.x). I would be interested in hearing any tips or tricks regarding OM-PermGen, too, and am happy to share my experiences regarding this. None of the issues I've looked into have never been attributed to Tomcat. They have all been application issues related to an inability to garbage collect a webapp's classloader. This root causes were split between one of the following: * A webapp registering an object with another object that outlives the webapp and forgetting to unregister it webapp shutdown. As a result, that object cannot be garbage collected, which also prevents that webapp's classloader from being garbage collected. Examples of things that outlive a webapp or objects from libraries within Tomcat's shared library folder, Tomcat itself, and the JRE itself. For example, if a webapp registers a JDBC driver or a JCA/JCE provider, it should take care to unregister it on shutdown. * Instantiating a new Thread somehow (e.g. directly via its constructor, or indirectly via a thread pool, a Timer, or a ScheduledExecutorService) in response to a request to a webapp. This is because, by default, the new Thread inherits the parent thread's context classloader, which in Tomcat (5.5.x) is set to that webapp's classloader. If that Thread keeps the context classloader reference and outlives the webapp, the webapp's classloader cannot be garbage collected. As an aside, those causes highlight a reason why people should be weary of putting a new JAR files into one of Tomcat's shared library folders. Doing so requires that a webapp be vigilant about cleaning up any interactions with that library on shutdown. Said library also needs to provide a means to do the cleanup, as well as be sensitive to context classloader issues. When trying to debug these issues, I typically load things up in a profiler, stop the webapp and see of its classloader still resides in memory. When it exists, I use the profiler's find the garbage collection root to help determine why the classloader still resides in memory and figure out how to fix the issue. If using JProfiler (and probably other profilers), I think you have to tell it to go not stop when it reaches the Class object along the reference path. To help pro-actively detect webapp classloader garbage collection issues, I've leveraged the Insane library (a library I found from Netbeans while researching the topic) to write a utility that searches for webapp classloaders that should have been garbage collected. Using the utility in combination with automated tests has been definitely helped catch and diagnose issues. Apologies if this wasn't helpful. Please let me know if I'm wrong, outdated, or if there is a better way! Best regards, Mark DeSpain -Original Message- From: Ken Bowen [mailto:kbo...@als.com] Sent: Tuesday, April 21, 2009 1:33 PM To: Tomcat Users List Subject: Headstart on Resolving OOM-PermGen errors on webapp reload Mark, Any chance we could make a headstart on Resolving OOM-PermGen errors on webapp reload ?? Perhaps some general pointers, guidance etc. [to help you refine the talk in advance :-) ] The manager app is giving me more more of: FAIL - Application at context path /ctx could not be started FAIL - Encountered exception java.lang.OutOfMemoryError: PermGen space This is on a Tomcat 6.0.18 (java 1.5) running on a remote Linux CentOS 5, in a Parallels VM, with httpd + mod_jk, running two versions of the app. Total memory available is 432 MB, with a number of non-system, non-TC processes, including ActiveMQ and 9 Postres processes. But there appears to be about 200MB of unused memory according to the Parallels control panel. I develop locally on a Mac OS/X 10.5.6 box with 4GBmem using (My)Eclipse and Tomcat 6.0.18 directly. With lots lots of reloads, I'm not surprised that I eventually hit OOM PermGen space in this setting, but it happens much less often than on the CentOS box (of course 4GB != 432MB). Thanks...Ken Mark Thomas wrote: I was at a conference recently and rather rashly made the statement OOM PermGen errors on reload are an application issue, not a Tomcat one. Several people came up to me afterwards with variations on a theme of Our app has OOM on reload - put your money where your mouth is and show us where we have gone wrong Having helped several people track down the causes of these errors (and yes they were all application issues) it occurred to me that there may be interest in this at ApacheCon. So my suggestion is: Title:Resolving OOM-PermGen errors on webapp reload Type: Session Abstract: What causes the error. Typical root causes. How to find
Re: Headstart on Resolving OOM-PermGen errors on webapp reload
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 4/21/2009 5:50 PM, Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Headstart on Resolving OOM-PermGen errors on webapp reload Can you observe your heap and which ClassLoaders are still hanging around? You might want to check to see how many org/apache/catalina/loader/WebappClassLoader objects are still live. In my web application, just after a Tomcat startup, I have 2 instances of this class, both of which are live. Live is a critical attribute here - unless a full GC (or two) is done, unused classes and classloaders will still be present. Use JConsole to trigger GCs, if needed. I haven't forced any full GCs (jconsole can't connect since I didn't enable JMX when I started my server) but I only see 2 live WebappClassLoaders (and 2 dead ones) after running this command: for x in 1 2 3 4 5 ; \ do echo running ; \ touch lib/log4j-1.2.15.jar ; \ ant quick-install ; \ sleep 20s ; \ done (Each touch/quick-install triggers an application reload) Before my stress test, this was the output of 'jmap -heap': (Hmm... didn't realize I was using -client in development... I should fix that!) Attaching to process ID 11255, please wait... Debugger attached successfully. Client compiler detected. JVM version is 1.5.0_13-b05 using thread-local object allocation. Mark Sweep Compact GC Heap Configuration: MinHeapFreeRatio = 40 MaxHeapFreeRatio = 70 MaxHeapSize = 67108864 (64.0MB) NewSize = 655360 (0.625MB) MaxNewSize = 4294901760 (4095.9375MB) OldSize = 1441792 (1.375MB) NewRatio = 12 SurvivorRatio= 8 PermSize = 8388608 (8.0MB) MaxPermSize = 67108864 (64.0MB) Heap Usage: New Generation (Eden + 1 Survivor Space): capacity = 4128768 (3.9375MB) used = 1943672 (1.8536300659179688MB) free = 2185096 (2.0838699340820312MB) 47.0763191344246% used Eden Space: capacity = 3670016 (3.5MB) used = 1606928 (1.5324859619140625MB) free = 2063088 (1.9675140380859375MB) 43.785313197544646% used - From Space: capacity = 458752 (0.4375MB) used = 336744 (0.32114410400390625MB) free = 122008 (0.11635589599609375MB) 73.40436662946429% used To Space: capacity = 458752 (0.4375MB) used = 0 (0.0MB) free = 458752 (0.4375MB) 0.0% used tenured generation: capacity = 54755328 (52.21875MB) used = 20156272 (19.222518920898438MB) free = 34599056 (32.99623107910156MB) 36.81152635959007% used Perm Generation: capacity = 32505856 (31.0MB) used = 23190896 (22.116561889648438MB) free = 9314960 (8.883438110351562MB) 71.343748031124% used After the test, I get this: Attaching to process ID 11255, please wait... Debugger attached successfully. Client compiler detected. JVM version is 1.5.0_13-b05 using thread-local object allocation. Mark Sweep Compact GC Heap Configuration: MinHeapFreeRatio = 40 MaxHeapFreeRatio = 70 MaxHeapSize = 67108864 (64.0MB) NewSize = 655360 (0.625MB) MaxNewSize = 4294901760 (4095.9375MB) OldSize = 1441792 (1.375MB) NewRatio = 12 SurvivorRatio= 8 PermSize = 8388608 (8.0MB) MaxPermSize = 67108864 (64.0MB) Heap Usage: New Generation (Eden + 1 Survivor Space): capacity = 3604480 (3.4375MB) used = 1326112 (1.264678955078125MB) free = 2278368 (2.172821044921875MB) 36.79066051136363% used Eden Space: capacity = 3211264 (3.0625MB) used = 1004312 (0.9577865600585938MB) free = 2206952 (2.1047134399414062MB) 31.274663185586736% used - From Space: capacity = 393216 (0.375MB) used = 321800 (0.30689239501953125MB) free = 71416 (0.06810760498046875MB) 81.83797200520833% used To Space: capacity = 393216 (0.375MB) used = 0 (0.0MB) free = 393216 (0.375MB) 0.0% used tenured generation: capacity = 47677440 (45.46875MB) used = 40365360 (38.49540710449219MB) free = 7312080 (6.9733428955078125MB) 84.66343830541237% used Perm Generation: capacity = 34078720 (32.5MB) used = 33963000 (32.38964080810547MB) free = 115720 (0.11035919189453125MB) 99.66043325570914% used I'm a little confused... the configuration seems to indicate that I've got an 8MB PermGen space, but then the Permanent Generation says it's 32.5MB. Let's try to force a full GC by using System.gc() from a little JSP file. Here's the heap description afterward: Attaching to process ID 11255, please wait... Debugger attached successfully. Client compiler detected. JVM version is 1.5.0_13-b05 using thread-local object allocation. Mark Sweep Compact GC Heap Configuration: MinHeapFreeRatio = 40 MaxHeapFreeRatio = 70 MaxHeapSize = 67108864 (64.0MB) NewSize = 655360 (0.625MB) MaxNewSize = 4294901760 (4095.9375MB)
Re: Headstart on Resolving OOM-PermGen errors on webapp reload
Hey Mark, This is really good. Presumably this is an outline for success -- and it is definitely an outline for improvement of my rather improvished skills in this area. Many thanks! Ken On Apr 21, 2009, at 5:54 PM, Mark Thomas wrote: Ken Bowen wrote: Mark, Any chance we could make a headstart on Resolving OOM-PermGen errors on webapp reload ?? Perhaps some general pointers, guidance etc. [to help you refine the talk in advance :-) ] The very short version. 1. Find an app that you can't reload without OOME 2. Get a profiler - I like Yourkit Full disclosure: they give ASF committers a free copy 3. Reload you app once 4. Use the profiler to look for instances of WebappClassLoader 5. Look for the one with the started attribute == false 6. Trace the GC roots for this instance 7. Fix whatever is hanging on to references to the instance - there should not be any The session (assuming it goes ahead) will do a demo of the above and expand on 7 in terms of typical culprits and possible workarounds. It will also explain what is going on and why this happens. HTH, 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: Headstart on Resolving OOM-PermGen errors on webapp reload
Ken Bowen wrote: Hey Mark, This is really good. Presumably this is an outline for success It has a 100% success rate so far on a admittedly small sample size of around 5 (I can't remember the exact number). Mark -- and it is definitely an outline for improvement of my rather improvished skills in this area. Many thanks! Ken On Apr 21, 2009, at 5:54 PM, Mark Thomas wrote: Ken Bowen wrote: Mark, Any chance we could make a headstart on Resolving OOM-PermGen errors on webapp reload ?? Perhaps some general pointers, guidance etc. [to help you refine the talk in advance :-) ] The very short version. 1. Find an app that you can't reload without OOME 2. Get a profiler - I like Yourkit Full disclosure: they give ASF committers a free copy 3. Reload you app once 4. Use the profiler to look for instances of WebappClassLoader 5. Look for the one with the started attribute == false 6. Trace the GC roots for this instance 7. Fix whatever is hanging on to references to the instance - there should not be any The session (assuming it goes ahead) will do a demo of the above and expand on 7 in terms of typical culprits and possible workarounds. It will also explain what is going on and why this happens. HTH, 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploying to Tomcat Server
Richard, Considering your later comment about you doing this for free, I apologise for my earlier jibe. My guess : you simply have a CR or a quote misplaced in your startup.bat file. This can be the result of a variable value being inserted, maybe by another script which calls startup.bat. Add some echo statements around the place where you see a command using, for example, JAVA_OPTS. Richard Coutinho wrote: Looks like the -Dsun message is coming from the catalina.bat file I will look more closely at this file. I will let you know how this gets resolved. Thanks again Go Canucks Go! Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Richard Coutinho richardcouti...@shaw.ca Date: Tue, 21 Apr 2009 21:14:51 To: Tomcat Users Listusers@tomcat.apache.org Subject: Re: Deploying to Tomcat Server I will confirm later tonight. I looked at the bat file and I think I need to define an environment variable called $CATALINA_HOME pointing to the local Tomcat directory I am developing this website for a non-profit group to which I belong on my own time for free. This is my way of giving back to the community. Thx Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Shaun Farrugia sfarru...@fry.com Date: Tue, 21 Apr 2009 16:37:49 To: Tomcat Users Listusers@tomcat.apache.org; richardcouti...@shaw.carichardcouti...@shaw.ca Subject: RE: Deploying to Tomcat Server Did this work for you? -Original Message- From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Sent: Tuesday, April 21, 2009 3:32 PM To: Tomcat Users List Subject: Re: Deploying to Tomcat Server Thanks again. Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Caldarale, Charles R chuck.caldar...@unisys.com Date: Tue, 21 Apr 2009 14:22:34 To: Tomcat Users Listusers@tomcat.apache.org Subject: RE: Deploying to Tomcat Server From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Subject: Re: Deploying to Tomcat Server Who would I contact to verify the startup.bat file? Yourself? You might try downloading a vanilla copy of Tomcat 4.1 from the tomcat.apache.org web site and look for differences. Also note that Tomcat allow specification of command-line properties via environment variables, and you may have one with an invalid value. The variables are CATALINA_OPTS and JAVA_OPTS in more modern versions of Tomcat; I don't know if there's anything corresponding in the ancient one you're using. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Headstart on Resolving OOM-PermGen errors on webapp reload
Thanks Chris, As in my previous thanks to Mark, I'll be slowly mastering how to get into this. Cheers, Ken On Apr 21, 2009, at 5:44 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ken, On 4/21/2009 4:32 PM, Ken Bowen wrote: I develop locally on a Mac OS/X 10.5.6 box with 4GBmem using (My)Eclipse and Tomcat 6.0.18 directly. With lots lots of reloads, I'm not surprised that I eventually hit OOM PermGen space in this setting, but it happens much less often than on the CentOS box (of course 4GB != 432MB). Can you observe your heap and which ClassLoaders are still hanging around? You might want to check to see how many org/apache/catalina/loader/WebappClassLoader objects are still live. In my web application, just after a Tomcat startup, I have 2 instances of this class, both of which are live. After an application reload, I can see that I still have 2 live WebappClassLoaders: one of them is the same one that was live before the app reload (probably the Shared webapp ClassLoader - I'm using TC 5.5) and the other one is a new one that appears to have replaced the old one (which should be expected, since the old one should be discarded after the undeploy). If you find multiple WebappClassLoader objects still hanging around, you can probably start looking for the objects they actually own. Those will give you a clue as to what services or objects aren't being cleaned-up correctly when your application shuts down. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuPiUACgkQ9CaO5/Lv0PBZ9gCgwnO0rP3j40m32+vI1jmy0qaI 9w0AoMCt+AteT1uv+vvrgCbpteNV9rGb =X9YG -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: GlobalNamingResources outside of server.xml
Mark Thomas wrote: Anthony J. Biacco wrote: I did end up trying it and it did work, I just didn't know if it was something that's frowned upon, or would for whatever reason was planned to be phased out/deprecated. Nope. That is absolutely fine. I know of a number of large corporations that use that feature extensively. We get it essentially for free with the xml parser so it is going to stay. My ears just kind of popped up on this thread. Would not the same kind of subterfuge be applicable for the case where you send an updated app as a war-file to a customer (thus including its web.xml), but this customer has his own different parameters to set in the web.xml ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploying to Tomcat Server
Andre thanks. I think the problem maybe with the JAVA_HOME env var that I need to define. I will try this out and let you know if it fixes the problem. Yes, I do volunteer in addition to being very busy with my career as an IT architect. I miss the good old coding days but its fun to work in this space Thx Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: André Warnier a...@ice-sa.com Date: Wed, 22 Apr 2009 00:33:06 To: Tomcat Users Listusers@tomcat.apache.org Subject: Re: Deploying to Tomcat Server Richard, Considering your later comment about you doing this for free, I apologise for my earlier jibe. My guess : you simply have a CR or a quote misplaced in your startup.bat file. This can be the result of a variable value being inserted, maybe by another script which calls startup.bat. Add some echo statements around the place where you see a command using, for example, JAVA_OPTS. Richard Coutinho wrote: Looks like the -Dsun message is coming from the catalina.bat file I will look more closely at this file. I will let you know how this gets resolved. Thanks again Go Canucks Go! Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Richard Coutinho richardcouti...@shaw.ca Date: Tue, 21 Apr 2009 21:14:51 To: Tomcat Users Listusers@tomcat.apache.org Subject: Re: Deploying to Tomcat Server I will confirm later tonight. I looked at the bat file and I think I need to define an environment variable called $CATALINA_HOME pointing to the local Tomcat directory I am developing this website for a non-profit group to which I belong on my own time for free. This is my way of giving back to the community. Thx Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Shaun Farrugia sfarru...@fry.com Date: Tue, 21 Apr 2009 16:37:49 To: Tomcat Users Listusers@tomcat.apache.org; richardcouti...@shaw.carichardcouti...@shaw.ca Subject: RE: Deploying to Tomcat Server Did this work for you? -Original Message- From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Sent: Tuesday, April 21, 2009 3:32 PM To: Tomcat Users List Subject: Re: Deploying to Tomcat Server Thanks again. Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Caldarale, Charles R chuck.caldar...@unisys.com Date: Tue, 21 Apr 2009 14:22:34 To: Tomcat Users Listusers@tomcat.apache.org Subject: RE: Deploying to Tomcat Server From: Richard Coutinho [mailto:richardcouti...@shaw.ca] Subject: Re: Deploying to Tomcat Server Who would I contact to verify the startup.bat file? Yourself? You might try downloading a vanilla copy of Tomcat 4.1 from the tomcat.apache.org web site and look for differences. Also note that Tomcat allow specification of command-line properties via environment variables, and you may have one with an invalid value. The variables are CATALINA_OPTS and JAVA_OPTS in more modern versions of Tomcat; I don't know if there's anything corresponding in the ancient one you're using. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Headstart on Resolving OOM-PermGen errors on webapp reload
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 4/21/2009 6:17 PM, mark_desp...@mcafee.com wrote: None of the issues I've looked into have never been attributed to Tomcat. You mean ever attributed to Tomcat, right? Good. ;) * A webapp registering an object with another object that outlives the webapp and forgetting to unregister it webapp shutdown. As a result, that object cannot be garbage collected, which also prevents that webapp's classloader from being garbage collected. It's worse than that: even if most of the objects created from classes loaded by that ClassLoader have gone out of scope and can be GC'd, the java.lang.Class, java.lang.Package, and java.lang.reflect.* objects that are created from those loaded classes won't be released until the ClassLoader is released. So if you have a single object that is being held by an object loaded by another ClassLoader, you can have potentially hundreds or thousands of objects left around in memory just wasting space. * Instantiating a new Thread somehow (e.g. directly via its constructor, or indirectly via a thread pool, a Timer, or a ScheduledExecutorService) in response to a request to a webapp. This is because, by default, the new Thread inherits the parent thread's context classloader, which in Tomcat (5.5.x) is set to that webapp's classloader. This is a very good point to consider, because many folks aren't aware of the thread-classloader relationship. If you don't kill your threads, you will keep your whole app's ClassLoader around forever. The 'daemonness' of the thread is not relevant. I'm looking at you, Quartz! To help pro-actively detect webapp classloader garbage collection issues, I've leveraged the Insane library (a library I found from Netbeans while researching the topic) to write a utility that searches for webapp classloaders that should have been garbage collected. Using the utility in combination with automated tests has been definitely helped catch and diagnose issues. Could you post some more info on this? I'm sure a lot of folks would be interested in this kind of thing. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuTNYACgkQ9CaO5/Lv0PCN6wCgkDKwhzpRB7re4StuClVe1Rt/ 3K0Anj5eXjLiTql97dxbhrNFavPXGIvC =Iuos -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: GlobalNamingResources outside of server.xml
André Warnier wrote: Mark Thomas wrote: Anthony J. Biacco wrote: I did end up trying it and it did work, I just didn't know if it was something that's frowned upon, or would for whatever reason was planned to be phased out/deprecated. Nope. That is absolutely fine. I know of a number of large corporations that use that feature extensively. We get it essentially for free with the xml parser so it is going to stay. My ears just kind of popped up on this thread. Would not the same kind of subterfuge be applicable for the case where you send an updated app as a war-file to a customer (thus including its web.xml), but this customer has his own different parameters to set in the web.xml ? Hmm. Never tried it. I'd try it and let us know how you get on. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Apache Tomcat 503 errors
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daryl, On 4/21/2009 3:00 PM, Daryl Stultz wrote: I'm running Fedora Core 5, httpd-2.2.2-1.2 (worker MPM), Tomcat 5.5.17, Java jdk1.5.0_07. I have about 40 connections/apps from Apache to Tomcat like so: ProxyPass /foo ajp://localhost:8009/foo/ I am getting a fair amount of 503 errors. Logs look like this: [snip] Is there a preferred alternative to connecting Apache and Tomcat? Or is mod_proxy the best? mod_proxy_ajp is included in httpd, and there have been /lots/ of improvements since 2.2.2. Since you can't upgrade, would you consider switching to using mod_jk, which is available independently? The configuration is a bit more involved, but you may get better results. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuTYoACgkQ9CaO5/Lv0PBe2QCdHSOAVwlXLHMK0mXWSLgi8x9w rP0AnR7/SL9w4yrGFWdu8Cx4ufhJRY03 =WY/7 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: GlobalNamingResources outside of server.xml
Mark Thomas wrote: André Warnier wrote: Mark Thomas wrote: Anthony J. Biacco wrote: I did end up trying it and it did work, I just didn't know if it was something that's frowned upon, or would for whatever reason was planned to be phased out/deprecated. Nope. That is absolutely fine. I know of a number of large corporations that use that feature extensively. We get it essentially for free with the xml parser so it is going to stay. My ears just kind of popped up on this thread. Would not the same kind of subterfuge be applicable for the case where you send an updated app as a war-file to a customer (thus including its web.xml), but this customer has his own different parameters to set in the web.xml ? Hmm. Never tried it. I'd try it and let us know how you get on. Hmm back. Unfortunately, I'm not really a productive Java/Tomcat programmer, and I don't do this kind of thing often (I mean prepare applications as wars, deploy them etc..). What I mean is that if someone else would a quick easy way to test this and be willing to do it, I am sure it would be much faster, and lots of people would probably be interested in the answer. I've seen this subject come up here a few times. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: GlobalNamingResources outside of server.xml
André Warnier wrote: Mark Thomas wrote: André Warnier wrote: Mark Thomas wrote: Anthony J. Biacco wrote: I did end up trying it and it did work, I just didn't know if it was something that's frowned upon, or would for whatever reason was planned to be phased out/deprecated. Nope. That is absolutely fine. I know of a number of large corporations that use that feature extensively. We get it essentially for free with the xml parser so it is going to stay. My ears just kind of popped up on this thread. Would not the same kind of subterfuge be applicable for the case where you send an updated app as a war-file to a customer (thus including its web.xml), but this customer has his own different parameters to set in the web.xml ? Hmm. Never tried it. I'd try it and let us know how you get on. Hmm back. Unfortunately, I'm not really a productive Java/Tomcat programmer, and I don't do this kind of thing often (I mean prepare applications as wars, deploy them etc..). What I mean is that if someone else would a quick easy way to test this and be willing to do it, I am sure it would be much faster, and lots of people would probably be interested in the answer. I've seen this subject come up here a few times. I'll add that if it works, I think it's worth a Wiki article, and that, I am willing (and competent) to write. To each his own.. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Headstart on Resolving OOM-PermGen errors on webapp reload
Hi Chris, I'll follow up later tonight. Hopefully I'll have less typos then, but don't be surprised if I just go triple-negative instead :) ~Mark -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, April 21, 2009 3:47 PM To: Tomcat Users List Subject: Re: Headstart on Resolving OOM-PermGen errors on webapp reload -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 4/21/2009 6:17 PM, mark_desp...@mcafee.com wrote: None of the issues I've looked into have never been attributed to Tomcat. You mean ever attributed to Tomcat, right? Good. ;) * A webapp registering an object with another object that outlives the webapp and forgetting to unregister it webapp shutdown. As a result, that object cannot be garbage collected, which also prevents that webapp's classloader from being garbage collected. It's worse than that: even if most of the objects created from classes loaded by that ClassLoader have gone out of scope and can be GC'd, the java.lang.Class, java.lang.Package, and java.lang.reflect.* objects that are created from those loaded classes won't be released until the ClassLoader is released. So if you have a single object that is being held by an object loaded by another ClassLoader, you can have potentially hundreds or thousands of objects left around in memory just wasting space. * Instantiating a new Thread somehow (e.g. directly via its constructor, or indirectly via a thread pool, a Timer, or a ScheduledExecutorService) in response to a request to a webapp. This is because, by default, the new Thread inherits the parent thread's context classloader, which in Tomcat (5.5.x) is set to that webapp's classloader. This is a very good point to consider, because many folks aren't aware of the thread-classloader relationship. If you don't kill your threads, you will keep your whole app's ClassLoader around forever. The 'daemonness' of the thread is not relevant. I'm looking at you, Quartz! To help pro-actively detect webapp classloader garbage collection issues, I've leveraged the Insane library (a library I found from Netbeans while researching the topic) to write a utility that searches for webapp classloaders that should have been garbage collected. Using the utility in combination with automated tests has been definitely helped catch and diagnose issues. Could you post some more info on this? I'm sure a lot of folks would be interested in this kind of thing. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknuTNYACgkQ9CaO5/Lv0PCN6wCgkDKwhzpRB7re4StuClVe1Rt/ 3K0Anj5eXjLiTql97dxbhrNFavPXGIvC =Iuos -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: GlobalNamingResources outside of server.xml
On Apr 21, 2009, at 7:02 PM, André Warnier wrote: André Warnier wrote: Mark Thomas wrote: André Warnier wrote: Mark Thomas wrote: Anthony J. Biacco wrote: I did end up trying it and it did work, I just didn't know if it was something that's frowned upon, or would for whatever reason was planned to be phased out/deprecated. Nope. That is absolutely fine. I know of a number of large corporations that use that feature extensively. We get it essentially for free with the xml parser so it is going to stay. My ears just kind of popped up on this thread. Would not the same kind of subterfuge be applicable for the case where you send an updated app as a war-file to a customer (thus including its web.xml), but this customer has his own different parameters to set in the web.xml ? Hmm. Never tried it. I'd try it and let us know how you get on. Hmm back. Unfortunately, I'm not really a productive Java/Tomcat programmer, and I don't do this kind of thing often (I mean prepare applications as wars, deploy them etc..). What I mean is that if someone else would a quick easy way to test this and be willing to do it, I am sure it would be much faster, and lots of people would probably be interested in the answer. I've seen this subject come up here a few times. I'll add that if it works, I think it's worth a Wiki article, and that, I am willing (and competent) to write. To each his own.. It is simply XML (the example in this thread uses entities). You could also use XInclude, which let's you define a fallback. And with either entities or XInclude you can use XML Catalogs for a great deal of flexibility. If you have no preference, tend to prefer XInclude over entities. best, -Rob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: STOout file output
gaganjoshi007 wrote: Hi, I like to have different stdout files for different project on my server log. is it possible to have different files for different project. eg: if I have 3 project(A,B,C) on server than I should have tomcat logs files like stdout_20090409_A.log stdout_20090409_B.log stdout_20090409_C.log could anybody help me? Hi There, A more appropriate solution in this scenario would be to configure your Tomcat logging.properties file to produce a seperate log file for each one of your web contexts and then redirect stdout and stderr appropriately using the swallowOutput attribute of the context element. RGS Steve - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org