Re: Tomcat shutdown process
Thanks for the quick reply Mark, one final question, does tomcat return a 503 error in that case? Regards On Tue, Apr 5, 2016 at 4:05 PM, Mark Thomas <ma...@apache.org> wrote: > On 05/04/2016 20:54, Vinicius Carvalho wrote: > > Hi there, I googled this one around, but I found a big mix on exactly how > > tomcat operates when a shutdown is initiated. What happens when a > shutdown > > is started in regards to: > > > > - Requests that are currently being processed (if a request is waiting on > > an external resource such as a jdbc connection), does the container wait > > for all responses to be committed or it will eventually kill any pending > > request? > > Requests are given a configurable time to complete (default is 10s as > far as I recall) and then Tomcat stops anyway. > > > - New requests that arrive after the shutdown. Does the container stop > > accepting them? > > No new requests are accepted. > > Mark > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Tomcat shutdown process
Hi there, I googled this one around, but I found a big mix on exactly how tomcat operates when a shutdown is initiated. What happens when a shutdown is started in regards to: - Requests that are currently being processed (if a request is waiting on an external resource such as a jdbc connection), does the container wait for all responses to be committed or it will eventually kill any pending request? - New requests that arrive after the shutdown. Does the container stop accepting them? Regards
Multiple instances using catalina.base
Hello there! I've followed the instructions on RUNNING.TXT and a great presentation by Mark Thomas and Filip Hanik I've found on the net. But after creating a directory structure: /tomcat-6.0.20 {catalina_home} - bin - conf - webapps -work - temp - lib - logs - instance-01 {catalina_base} -bin -logs -conf -webapps -temp -work I've just added server.xml and catalina.properties to conf, and setenv.sh to bin of my catalina_base instance. But after exporting the CATALINA_BASE and running startup.sh: Using CATALINA_BASE: /home/vinicius/java/apache-tomcat-6.0.20/instance-01 Using CATALINA_HOME: /home/vinicius/java/apache-tomcat-6.0.20 Using CATALINA_TMPDIR: /home/vinicius/java/apache-tomcat-6.0.20/instance-01/temp Using JRE_HOME: /usr/lib/jvm/java-6-sun I get this at my catalina.out java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390) Can't figure out what am I doing wrong. I don't think I need to copy lib folder. Any ideas? Regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Yet another swallowOutput question
Hello Mark. We have removed from all hosts the swallowOutput and add it to the context section of each host. We have also added it to the conf/context.xml. Yet, the catalina.out keeps growing. We found that some apps, that are using System.out/System.err, have their output redirected to catalina.out. Also, since we put log4j on our classpath, and configured a properties file for tomcat, now some apps are outputing very verbose logs (DEBUG) to the catalina.out. Those came from ibatis, that from some reason (we are checking the sources, but may take a while) believes that the log4j is set to DEBUG. My first guess is to believe that maybe those apps have a logging configuration using DEBUG with a console appender, and that is being redirected to catalina.out, would be this the issue? We are generating several gigabytes of log per day, requesting us to almost remove the log manually each 3-4 days. Any ideas? Regards On Wed, Sep 23, 2009 at 10:20 AM, Mark Thomas ma...@apache.org wrote: Vinicius Carvalho wrote: Thanks Mark, do I have to set it for each context I have? I'm using several Hosts with few contexts on each. Yes, but there is a short-cut. Set it in CATALINA_BASE/conf/context.xml and it should apply to all contexts on that instance. Mark Regards On Fri, Sep 18, 2009 at 4:18 PM, Mark Thomas ma...@apache.org wrote: Vinicius Carvalho wrote: Hello there! I'm trying to redirect some legacy System.out calls in our app to a different logger. Since tomcat's logging implementation does not allow one to configure the maximum size of the catalina.out, we are easily reaching gigabytes of space on that file. I thought that by just adding: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false swallowOutput=true Would solve my problems, but, after re-starting the server and calling a servlet that deliberate calls system.out, the catalina out gets all the output Unsurprising, given that swallowOutput is not a valid attribute for a Host element. You want Context. 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 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Yet another swallowOutput question
Thanks Mark, do I have to set it for each context I have? I'm using several Hosts with few contexts on each. Regards On Fri, Sep 18, 2009 at 4:18 PM, Mark Thomas ma...@apache.org wrote: Vinicius Carvalho wrote: Hello there! I'm trying to redirect some legacy System.out calls in our app to a different logger. Since tomcat's logging implementation does not allow one to configure the maximum size of the catalina.out, we are easily reaching gigabytes of space on that file. I thought that by just adding: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false swallowOutput=true Would solve my problems, but, after re-starting the server and calling a servlet that deliberate calls system.out, the catalina out gets all the output Unsurprising, given that swallowOutput is not a valid attribute for a Host element. You want Context. 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
Yet another swallowOutput question
Hello there! I'm trying to redirect some legacy System.out calls in our app to a different logger. Since tomcat's logging implementation does not allow one to configure the maximum size of the catalina.out, we are easily reaching gigabytes of space on that file. I thought that by just adding: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false swallowOutput=true Would solve my problems, but, after re-starting the server and calling a servlet that deliberate calls system.out, the catalina out gets all the output Well, tried to configure log4j as explained on http://tomcat.apache.org/tomcat-6.0-doc/logging.html, did not work as well, not matter what I do, catalina.out continues to grow. I do know that we *should* not have any system.out on our code, but as I said, it's a legacy code and I can't refactor an entire app in time. Any ideas on how can one avoid the sysout gets logged? Regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Help with Layer 7 LB and Tomcat
Thanks Rainer, I've already set up clusters using apache + mod_jk (mod_proxy) with and without ssl. The problem now is just the Alteon LB, which is not my area, so I was looking for some advices on setting up with a layer 7 swtich. Regards On Thu, Jun 25, 2009 at 8:19 AM, Rainer Jungrainer.j...@kippdata.de wrote: Hi, On 25.06.2009 02:36, Vinicius Carvalho wrote: Hello there! We are adding a new server to our park, and now we are going to use LB for both machines. We are using an Alteon 180e layer 7 switch to perform LB. So far everything was fine. But we decided to let the router do all the SSL part this way we would have something like this: [internet] --SSL:443--- [router] ---http:80--- [tomcat] The first problem we faced was within some applications that were using the transport-guaranteeconfidential /transport-guarantee directive, and so tomcat was redirecting them to the 8443 connector which was disabled. We removed this directive, and configure a rule on the router that would accomplish the same thing, whenever an user tried to access a page using http it would be redirected to https. Now we are facing a problem with the redirect of some struts apps. Instead of redirecting to the https they redirect to the http (I can understand why, since the app is really being accessed by http port not https), I know this might be a struts/app design problem. I just would like to hear from you guys, if we are moving toward the right way by leaving all the SSL part on the router. I could not find one single doc about layer 7 LBs and tomcat around the web. Does any one have a good tutorial/starting point? Best Regards you might find some information on http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html Although most of it is with respect to connecting Apache and Tomcat via the AJP protocol, the page also contains some info about seetings available for connectors in server.xml which fake some communication info, like host name, protocol etc. Those (short) details are at http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html#Tomcat%20AJP%20Connector%20Settings More info about the connector settings is available at http://tomcat.apache.org/tomcat-6.0-doc/config/http.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
Help with Layer 7 LB and Tomcat
Hello there! We are adding a new server to our park, and now we are going to use LB for both machines. We are using an Alteon 180e layer 7 switch to perform LB. So far everything was fine. But we decided to let the router do all the SSL part this way we would have something like this: [internet] --SSL:443--- [router] ---http:80--- [tomcat] The first problem we faced was within some applications that were using the transport-guaranteeconfidential /transport-guarantee directive, and so tomcat was redirecting them to the 8443 connector which was disabled. We removed this directive, and configure a rule on the router that would accomplish the same thing, whenever an user tried to access a page using http it would be redirected to https. Now we are facing a problem with the redirect of some struts apps. Instead of redirecting to the https they redirect to the http (I can understand why, since the app is really being accessed by http port not https), I know this might be a struts/app design problem. I just would like to hear from you guys, if we are moving toward the right way by leaving all the SSL part on the router. I could not find one single doc about layer 7 LBs and tomcat around the web. Does any one have a good tutorial/starting point? Best Regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Help with PersistenceManager
Hello all! We have an application that serves a few users (currently we have around 1300 sessions created, =~ 300 active), but due to our own bad development team, our session is a monster session (We are fixing this, but is gonna take time, since developers thought they could store everything on the session, and since for 1 user the application was running fine ... classical mistake) Well, We are running out of Old space very, very quickly (2gb for old space), and I was wondering if using the PersistenceManager would help us, but at the docs it says its not fully tested. One question I have is how many sessions does it store in memory and how many goes to disk? What's the policy of the LRU implementation? We are running a jboss 4.2.2, which I guess uses tomcat 5.5 right? Any suggestions on using this sessionmanager please? Regards - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
worker.properties
Hello there! Does anyone have an example of worker.properties with values set for a high load server? For parameters like connection_pool_timeout, socket_timeout and etc... Any suggestions are really appreciated Best regards - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Questions about connector
Hello Chuck, thanks for the quick reply. Yeah, we do have an apache2 with mod_jk configured. Even if the remote client points to a client, it means that the apache is maintaining the connection alive? I can understand the Keepalive status but why would it be so long on servicing status? I'm not sure but I believe we have a 60s timeout on the apache for connections. Best regards On 12/28/06, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] Subject: Questions about connector Here's a snippet of our connector properties under server.xml Connector port=8009 address=${jboss.bind.address} maxThreads=1800 minSpareThreads=50 maxSpareThreads=150 enableLookups=false redirectPort=8443 debug=0 connectionTimeout=6 protocol=AJP/1.3/ The above is the declaration for the AJP connector, used only when front-ending Tomcat (or JBoss) with httpd or IIS. Are you sure that's the one you're using? If so, then it's the front end that's keeping the connection alive, not the real client. - 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 start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- IBM Certified SOA Solution Designer IBM Database Associate - DB2 UDB V8.1 Family Sun Certified Enterprise Architect (Part I) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Questions about connector
Hello there! We have a Jboss 4.0.1sp1 (tomcat 5.0). Checking the connector status at the web-console some strange behavior is noticed. We have some requests that are either in Servicing or Keep-Alive, that lasts for over 4 hours (165.000.000 ms). We decided to kill the remote user, and still their IP is listed as it is still running. Is there any reason for this? How can we avoid it? Here's a snippet of our connector properties under server.xml Connector port=8009 address=${jboss.bind.address} maxThreads=1800 minSpareThreads=50 maxSpareThreads=150 enableLookups=false redirectPort=8443 debug=0 connectionTimeout=6 protocol=AJP/1.3/ Best regards and happy holidays -- IBM Certified SOA Solution Designer IBM Database Associate - DB2 UDB V8.1 Family Sun Certified Enterprise Architect (Part I) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question about http connections
Hello there! We have a Jboss 4.0.1 server, and we're experiencing a strange connector behavior (might be our app as well). We check the connections on the connector 8009 (we use a mod_jk behind jboss). And we have some requests on Service status that have over 14.000 seconds. We even killed the remote user browser (its an internal user from our corporation) but the connection is still used, it takes a few minutes to it to die. We have this behavior in many other requests in different parts of the system, and many with over 100s of time. What could be causing this? Any thoughts? Best regards and great holidays -- IBM Certified SOA Solution Designer IBM Database Associate - DB2 UDB V8.1 Family Sun Certified Enterprise Architect (Part I) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Setting proper values for connections inside Connector
Hello there! We have a tomcat server behind a apache server. We need to increase the maximum number of simultaneous connections. I know that this is done through server.xml, inside the connector configuration, but my question is, which one should I change 8080 or 8009 in order to accept more connections through apache? Best Regards -- IBM Certified SOA Solution Designer IBM Database Associate - DB2 UDB V8.1 Family Sun Certified Enterprise Architect (Part I) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting proper values for connections inside Connector
Thanks Chuck. We are indeed using AJP, and in our worker.properties the port is set to 8009. Just a final question, would be a nice thing to do reduce the number of threads in the 8080 since its not being used (let's just to a 10 or so for the manager, admin consoles), or would it make no difference? Best regards On 11/22/06, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] Subject: Setting proper values for connections inside Connector which one should I change 8080 or 8009 in order to accept more connections through apache? Assuming you're using the AJP connector to handle requests from httpd, you'd change 8009. It's also possible, but much less common, that your front-end is just forwarding HTTP requests as is to 8080. Look at your httpd configuration to make sure. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- IBM Certified SOA Solution Designer IBM Database Associate - DB2 UDB V8.1 Family Sun Certified Enterprise Architect (Part I) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]