Re: Tomcat shutdown password complexity
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Roger, On 5/9/20 20:45, Roger Marquis wrote: > calder wrote: >> We've never had occasion to use the password, because we disable >> shutdown (the better option). > > Never did understand this Tomcat oddity. What other application > is configured by default to open a tcp socket just to receive a > shutdown command? Then there the default password, both of which, > IMO, warrant a CVE. > > Would be far better i.e. more standards-based and secure, if the > socket were an option and the default stop method was, like > everything else, to use rc/init/service/systemctl/whatever. > > OTOH, a quick look at the startup, shutdown, catalina, ... scripts, > much less their lack of reliability, makes a little clearer why > some devops might want to avoid the shipped daemon control > scripts. Would you care to be specific? I've been running Tomcat for nearly 20 years and never had any problems with the standard service-management scripts. - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl65ndAACgkQHPApP6U8 pFi9yg/+PgGGkfEPTgkFOSGSQJlMRQITC4A6NN6ioxhm89tJz/r1RK6xLQOinW84 O3ZtKrSq2uvYzd5ZEMzlcCDP7NyRpS3xT1DlS15+n5kSI5xMhOkkHbOaaRkW+kd6 xqS7OmLH7TkgWkVEn/LsZp7haS5e9z9KSYF+Ychwye7DlpmC+td9N45egWHbV9VF iNYsNvElwNx7q1D7phst6Xcn1QC707EVajRRowpeOyMZyOXBfpczy8OzU6f3d+g7 yDbFSGW0GXBkvgorRXzYxzYHYzvB3fBHaLWeo+TzM75oibzu5hQs/wh6QU+sQ5Jd Fcp3pyRHP+h223GAwCzOQRFjCFinDlFHcDWkebvgUkmC/QyqWIWZUbWJOfbjMO/W 0l63NoFCSXuP3//XsUSLeER3dhP7aNxuyfXsSTiM4kTX7KnHlwXxS9/umd3JXJRS KKqcDhaRg9ItsJfY1HKPccEd/2A1wLWuJHZOPLfqBvQYUApBoN5gaK4qJleS3Dn1 xEYNdfpq+MO1J8GBtkb4leSA3ujPc1uW1oo1ziNnZsZ3AAJled4G+L1p+vid0ggc 7StgWbpalJHMp9t7RjP54OV00Pfm0kN/XcnGhvXVgeAJUFQ7wlD8nPLNjxZnpqaF JJLkDfgGbyohaTF48+miIWt/kDW0lw0AMy9ZYp6JMcFausKIvP4= =JAmR -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown password complexity
вс, 10 мая 2020 г. в 22:20, Mark Thomas : > > On May 10, 2020 11:31:02 AM UTC, calder wrote: > > > > >I asked the DevOps person about the error - turns out it was a > >SAXParseException when using the & char in the string. > > That is standard XML. You have to escape reserved characters in the XML. +1. XML is a data format. > > He vaguely > >remembers a shell issue with the bang char. > > I think he is mistaken. There is no issue using ! in XML. > > There are no limitations on the characters for the shutdown password. You > might need to encode some of them to define the password in XML but that is > all. Control characters (e.g. CR, LF: and ) - anything with code less than whitespace(32) and the character with code 127 cannot be used. Anything else can be. For reference, the await loop that waits for the shutdown command: https://github.com/apache/tomcat/blob/master/java/org/apache/catalina/core/StandardServer.java#L596 Note lines 546-548: if (ch < 32 || ch == 127) { break; } command.append((char) ch); The code that sends the command: https://github.com/apache/tomcat/blob/master/java/org/apache/catalina/startup/Catalina.java#L538 Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown password complexity
On May 10, 2020 11:31:02 AM UTC, calder wrote: >I asked the DevOps person about the error - turns out it was a >SAXParseException when using the & char in the string. That is standard XML. You have to escape resevered characters in the XML. > He vaguely >remembers a shell issue with the bang char. I think he is mistaken. There is no issue using ! in XML. There are no limitations on the characters for the shutdown password. You might need to encode some of them to define the password in XML but that is all. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown password complexity
On Sat, May 9, 2020 at 5:09 PM Christopher Schultz wrote: > On 5/9/20 00:36, calder wrote: > > On Fri, May 8, 2020 at 9:07 PM calder [snip] > > Keep in mind - some characters won't work like & or ( or ) - at > > least on Unix-style OSes as the shell may want to interpret them. > > What makes you say that? What does the shell have to do with anything? I asked the DevOps person about the error - turns out it was a SAXParseException when using the & char in the string. He vaguely remembers a shell issue with the bang char. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown password complexity
calder wrote: We've never had occasion to use the password, because we disable shutdown (the better option). Never did understand this Tomcat oddity. What other application is configured by default to open a tcp socket just to receive a shutdown command? Then there the default password, both of which, IMO, warrant a CVE. Would be far better i.e. more standards-based and secure, if the socket were an option and the default stop method was, like everything else, to use rc/init/service/systemctl/whatever. OTOH, a quick look at the startup, shutdown, catalina, ... scripts, much less their lack of reliability, makes a little clearer why some devops might want to avoid the shipped daemon control scripts. Roger Marquis - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown password complexity
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Calder, On 5/9/20 00:36, calder wrote: > On Fri, May 8, 2020 at 9:07 PM calder > wrote: >> >> On Fri, May 8, 2020, 19:20 Robert Hicks >> wrote: >>> >>> I am trying to find what the password complexity can be. I've >>> looked at several hardening guides and they are all >>> "WordsLikeThis". Does the shutdown password take symbols and >>> numbers or at least hyphenated words? >> >> >> We've never had occasion to use the password, because we disable >> shutdown (the better option). >> >> However, my best guess one could use anything. One could check >> the source code, or better yet, set up a Dev instance and give it >> a quick test - a 15 minute exercise at most. > > Gave it a test. > > In server.xml, we have > > > and then fire it up > > user@stimpy:~/bin/apache-tomcat/bin> ./catalina.sh start > log.log > 2>&1 > > user@stimpy:~/bin/apache-tomcat/bin> ps aux | grep java user 7223 > 531 1.2 21006280 812812 pts/2 Sl 23:22 0:13 /home/ [ ... ] > > user@stimpy:~/bin/apache-tomcat/bin> ./shutdown.sh stop > > user@stimpy:~/bin/apache-tomcat/bin> ps aux | grep "bin/java" [ no > response ] > > If we start up TC and change server.xml entry to (removed one char > at end) TC won't shut > down. > > Keep in mind - some characters won't work like & or ( or ) - at > least on Unix-style OSes as the shell may want to interpret them. What makes you say that? What does the shell have to do with anything? - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl63KfYACgkQHPApP6U8 pFh5yRAAmIInP54+INuiba2Hbjb/AxmqqNMrmP6noARMyPCuOL6ptjumqvebT1J8 tw7oIPJPT3qEFzg2TvXZ/QJ/sQ6or9/Q1PYZ8eZnEtv4Cw5LMSmgLV/69MAMhtfA o6X0V7ZdKwpnLhfIvV8we/kogmfD2h5gqHmqtL165pbBO5FzqywNUJoYIaOaiNtk 9ExWHWZ/+pRxwfS7OkrVLYn9UlIKebFJX1fAqjAMGFnAcI45L5ky6oRjpY359UfJ tQDXbmsu034TGnLdrnhiSGASWHGEPsTmaH2m2o24WW0Sf75ymEsWVkV9RGOYsyAG lBtX7Bj4fa0Ldr/S4ejXEBy7p+e+t+5BNw8yUZKSyE9zPwL77Yp23hL2w83hUQbq beNNIia7HaDpO3x9ZaRT53UALNVTnKdJNmTfIHHPm5m8WAeaaJz7vKHcRdWtkZSg 4GZ1TW5VXnwL27jxSnYlDTBM6o/xUAuVc8ZmpYt2U7fFKnQVE57mVn8BG+jFLPI4 19F6jjIL7bzqIhx4h26af5xeYeqXWLeWRzZWA+nS9GpoPkYFTfmGByGS54bKU0rE lMd/3nRKcjt+PMVM7wnu8b/S+hrSTwG1nE3ens9XPwpJCl0HsZzX5HR51SJegOXF O2xOeuy9as1+jAGtquiQpvOZePDbrGUjJaZebZ4fQE0+acJ1bo4= =JGZQ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown password complexity
On Fri, May 8, 2020 at 9:07 PM calder wrote: > > On Fri, May 8, 2020, 19:20 Robert Hicks wrote: >> >> I am trying to find what the password complexity can be. I've looked at >> several hardening guides and they are all "WordsLikeThis". Does the >> shutdown password take symbols and numbers or at least hyphenated words? > > > We've never had occasion to use the password, because we disable shutdown > (the better option). > > However, my best guess one could use anything. One could check the source > code, or better yet, set up a Dev instance and give it a quick test - a 15 > minute exercise at most. Gave it a test. In server.xml, we have and then fire it up user@stimpy:~/bin/apache-tomcat/bin> ./catalina.sh start > log.log 2>&1 user@stimpy:~/bin/apache-tomcat/bin> ps aux | grep java user 7223 531 1.2 21006280 812812 pts/2 Sl 23:22 0:13 /home/ [ ... ] user@stimpy:~/bin/apache-tomcat/bin> ./shutdown.sh stop user@stimpy:~/bin/apache-tomcat/bin> ps aux | grep "bin/java" [ no response ] If we start up TC and change server.xml entry to (removed one char at end) TC won't shut down. Keep in mind - some characters won't work like & or ( or ) - at least on Unix-style OSes as the shell may want to interpret them. Experiment with whatever chars you want. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown password complexity
On Fri, May 8, 2020, 19:20 Robert Hicks wrote: > I am trying to find what the password complexity can be. I've looked at > several hardening guides and they are all "WordsLikeThis". Does the > shutdown password take symbols and numbers or at least hyphenated words? > We've never had occasion to use the password, because we disable shutdown (the better option). However, my best guess one could use anything. One could check the source code, or better yet, set up a Dev instance and give it a quick test - a 15 minute exercise at most. >
Re: Tomcat shutdown, webapp vs database pools
Thanks for the info. I'll investigate further into the listeners. On Sat, Mar 17, 2018 at 4:27 AM, Mark Thomaswrote: > On 16/03/18 22:42, Alex O'Ree wrote: > > I have a war file that defines a context.xml file, some cxf based web > > services and a few other background tasks using quartz that are > initialized > > in a servlet context listener. > > > > When tomcat shuts down, it appears that tomcat stops the database > > connection pool before the cxf services or the quartz tasks. This causes > > huge amounts of log output. I'm a bit unclear as to how to adjust/change > > the shutdown order of the database pool vs the servlet listeners. > > > > The web app's web.xml does declare a resource-ref element that points at > > the jndi lookup name, but perhaps the configuration is wrong. > > > > I have looked at https://tomcat.apache.org/ > tomcat-8.0-doc/jndi-resources- > > howto.html#JDBC_Data_Sources and my configuration appears to be correct, > > however something is still not quite right. > > > > What am I doing wrong? > > Don't know. > > The listeners are stopped before the JNDI resources so I'm not sure what > is going on. Is it possible the listener isn't waiting for the cxf > services or the quartz tasks to complete before it exits the > contextDestroyed() method? > > Mark > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Tomcat shutdown, webapp vs database pools
On 16/03/18 22:42, Alex O'Ree wrote: > I have a war file that defines a context.xml file, some cxf based web > services and a few other background tasks using quartz that are initialized > in a servlet context listener. > > When tomcat shuts down, it appears that tomcat stops the database > connection pool before the cxf services or the quartz tasks. This causes > huge amounts of log output. I'm a bit unclear as to how to adjust/change > the shutdown order of the database pool vs the servlet listeners. > > The web app's web.xml does declare a resource-ref element that points at > the jndi lookup name, but perhaps the configuration is wrong. > > I have looked at https://tomcat.apache.org/tomcat-8.0-doc/jndi-resources- > howto.html#JDBC_Data_Sources and my configuration appears to be correct, > however something is still not quite right. > > What am I doing wrong? Don't know. The listeners are stopped before the JNDI resources so I'm not sure what is going on. Is it possible the listener isn't waiting for the cxf services or the quartz tasks to complete before it exits the contextDestroyed() method? Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown process
On 05/04/2016 21:48, Vinicius Carvalho wrote: > Thanks for the quick reply Mark, one final question, does tomcat return a > 503 error in that case? New connections will fail. Existing connections will be closed. Mark > > Regards > > On Tue, Apr 5, 2016 at 4:05 PM, Mark Thomaswrote: > >> 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 >> >> > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
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 Thomaswrote: > 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 > >
Re: Tomcat shutdown process
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
Re: Tomcat shutdown behaviour
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Vimal, On 8/9/13 1:01 AM, Vimal Jain wrote: I am using tomcat-6 on my Ubuntu 13.10 desktop. My question is :- When i run shutdown script of tomcat , does tomcat wait for currently running threads to complete before shutting down ? Do you mean does Tomcat complete all in-progress requests before shutting down? Honestly, I get horribly confused whenever I try to read the Connector/Processor/Protocol/Lifecycle/etc. code (as I just did, again), but it looks like Tomcat closes the ServerSocket (which will drop any request that hasn't yet been accepted -- those in the TCP accept queue) immediately. I have to imagine that any in-progress non-asynchronous requests that have been assigned threads will complete successfully, since they threads are being managed by a thread pool. I'm not sure what happens to asynchronous requests that are still in mid-flight. Note that running 'bin/catalina.sh stop' does not stop Tomcat before it exists. That command merely sends a SHUTDOWN command to Tomcat via a socket (under the default configuration) or sends a signal to the process (if you have changed the default). In the former case (SHUTDOWN command), your shutdown-request completes almost immediately, while the true server process goes through an orderly shutdown process as (lightly) described above. In the latter case (signal), a KILL signal is sent and your JVM might not shutdown in an orderly way -- and you may destroy in-process requests. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.14 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSBO1YAAoJEBzwKT+lPKRYXMEQALpeFF12SE3Cm9DoVwtjlgKb MFef+u54uzRqyRufoamHnO6rbqLd4OPNQIiSbx/eJ2Xr3QQhhF5THRSfQY6hJpxN phxKRWoPVQiEGffo/qXFOmGM10tUbTe1BTD2ZKfUoqy6N4G1EDeUhuEBke2yaBga G5CUcjSYAPqRUMHcQi+EH+8oVGAB3TFXkQAl9a2zz4CqLi8fP/GVeMl8DAN91kCG 0IV6qSw8s6TdC5f3HXtOrp1fEhS15PPdF6gPfBFpKII2IFddGfDwghDhSaabWBrV Q1rMqngNKLArTcXOv4ahXsBAykNaUq2MLLFs2NW2Giy61q9LZ5W5Ip1sa7TqEAU6 hiZU7VDkbrjz3iMLe2UvfoiIi+6P5CAfTL1tKVdGkAo4bN1EwZDShD9hQjvLnJFU 9ScaHfsor0iTwu1UvKjOWER8jids3ntju8kXsGs+WA4SOn517q7Ni0/3DPYkTZQL idQHx8VC0GaENkPQfWRU+CCH73GuWuSKmgWrDnL3mxFNoCPZLFix7fwYBk+5OOSn PeIs0OYhWlMyWj+wNtp7hqx4Bk7XvNKxwpCID+keB8Ffj8JR5hKyKBbJBzCw3RRa YLSaqjCvsq0Ab7k9IyDntH9lVPLRvpxb/d16PZw11IvMlQsbg5KZRSXnXZNabkSf atnhsLEmjGu3fPs8+Ror =ZQGX -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat shutdown clarification
From: Davis, Chad [mailto:chad.da...@emc.com] Subject: tomcat shutdown clarification When I use the shutdown.sh script to stop tomcat, what happens? I am tempted to say Magic. BUT the JVM won't go down if there are still other threads running Am I missing anything important? Just one point: if the other threads are daemon threads, the JVM will stop. It's only unmanaged non-daemon threads that are a problem. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat shutdown clarification
When I use the shutdown.sh script to stop tomcat, what happens? I am tempted to say Magic. That's good ;) BUT the JVM won't go down if there are still other threads running Am I missing anything important? Just one point: if the other threads are daemon threads, the JVM will stop. It's only unmanaged non-daemon threads that are a problem. And how does the -force option affect this? Will that kill the JVM regardless . . . what factors impact how much time might pass before it's actually dead? I'm on tomcat 7 if it matters. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat shutdown clarification
From: Davis, Chad [mailto:chad.da...@emc.com] Subject: RE: tomcat shutdown clarification And how does the -force option affect this? Will that kill the JVM regardless . . . Usually. The -force option will invoke kill -9 on the Tomcat pid if Tomcat doesn't stop in the specified time, which defaults to five seconds, but may be specified as an argument to the shutdown.sh script. If the pid can't be determined, -force has no effect. what factors impact how much time might pass before it's actually dead? Lots of things, including connections to other processes (e.g., database servers), flushing of unwritten buffers to disk, how busy the system is, etc. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown clarification
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 8/14/12 3:20 PM, Caldarale, Charles R wrote: From: Davis, Chad [mailto:chad.da...@emc.com] Subject: RE: tomcat shutdown clarification And how does the -force option affect this? Will that kill the JVM regardless . . . Usually. The -force option will invoke kill -9 on the Tomcat pid if Tomcat doesn't stop in the specified time, which defaults to five seconds, but may be specified as an argument to the shutdown.sh script. If the pid can't be determined, -force has no effect. what factors impact how much time might pass before it's actually dead? Lots of things, including connections to other processes (e.g., database servers), flushing of unwritten buffers to disk, how busy the system is, etc. I would say that the most likely thing(s) that would delay Tomcat's shutdown are ServletContextListeners that do a lot of work. If you (Chad) want to know what it happening to Tomcat while it's shutting down (and taking forever to do so), you can take a thread dump of the process and see what's going on. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAqrDQACgkQ9CaO5/Lv0PCktgCfYaEetCtTeBZxQRxHrgH2Bigs 1ZkAn1xQKqIg34DjddpGKT2cbBdS4I6q =5zJD -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Shutdown
2012/1/7 Kamal Sheikh kama...@gmail.com: Hi, I'm new to this but please direct me if I'm posting to the wrong list. Our Tomcat has suddenly stopped working this morning and now wouldn't start -- it responds simply by saying: failed. What is in the logs? Maybe there is no free space on the harddrive? Maybe there is stale pid file from previous Tomcat run? Is there anything going on with OpenJDK and Tomcat? Here's our configuration: Java: java version 1.6.0_20 OpenJDK Runtime Environment (IcedTea6 1.9.9) (6b20-1.9.9-0ubuntu1~10.04.2) OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode) Tomcat Server version: Apache Tomcat/6.0.24 Server built: March 24 2011 1829 6.0.24 was officially released on 2010-01-21 which is more than a year earlier than the above build date. There were a lot of important fixes since then, including some fixes to the startup scripts as well. Server number: ...0 OS Name: Linux OS Version: 2.6.32-32-server Architecture: amd64 JVM Version: 1.6.0_20-b20 JVM Vendor: Sun Microsystems Inc. OS Ubuntu 10.04.2 LTS Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Shutdown
Thanks for the reply. I'm pasting some information from the logs: # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (safepoint.cpp:247), pid=306, tid=140562856904448 # guarantee(PageArmed == 0) failed: invariant # # JRE version: 6.0_20-b20 # Java VM: OpenJDK 64-Bit Server VM (19.0-b09 mixed mode linux-amd64 compressed oops) # Derivative: IcedTea6 1.9.9 # Distribution: Ubuntu 10.04.1 LTS, package 6b20-1.9.9-0ubuntu1~10.04.2 # If you would like to submit a bug report, please include # instructions how to reproduce the bug and visit: # https://bugs.launchpad.net/ubuntu/+source/openjdk-6/ # --- T H R E A D --- Current thread (0x01635800): VMThread [stack: 0x7fd757178000,0x7fd757279000] [id=309] Stack: [0x7fd757178000,0x7fd757279000], sp=0x7fd757277990, free space=1022k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x72341c] V [libjvm.so+0x72363b] V [libjvm.so+0x32fc96] V [libjvm.so+0x657eff] V [libjvm.so+0x72984a] V [libjvm.so+0x729b52] V [libjvm.so+0x5e4242] VM_Operation (0x7fd75425a390): GenCollectForAllocation, mode: safepoint, requested by thread 0x02c5e800 /proc/meminfo: MemTotal:4060052 kB MemFree: 174276 kB Buffers: 203376 kB Cached: 2114228 kB SwapCached: 84 kB Active: 1892484 kB Inactive: 849440 kB Active(anon): 342896 kB Inactive(anon):83840 kB Active(file):1549588 kB Inactive(file): 765600 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 2611192 kB SwapFree:2610212 kB Dirty:36 kB Writeback: 0 kB AnonPages:424216 kB Mapped:29344 kB Shmem: 2404 kB Slab:1029520 kB SReclaimable: 122988 kB SUnreclaim: 906532 kB KernelStack:1392 kB PageTables:12252 kB NFS_Unstable: 0 kB Bounce:0 kB WritebackTmp: 0 kB CommitLimit: 4641216 kB Committed_AS: 943912 kB VmallocTotal: 34359738367 kB VmallocUsed: 288308 kB VmallocChunk: 34359420524 kB HardwareCorrupted: 0 kB HugePages_Total: 0 HugePages_Free:0 HugePages_Rsvd:0 HugePages_Surp:0 Hugepagesize: 2048 kB DirectMap4k: 10240 kB DirectMap2M: 4184064 kB CPU:total 1 (1 cores per cpu, 1 threads per core) family 6 model 44 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt Memory: 4k page, physical 4060052k(174276k free), swap 2611192k(2610212k free) vm_info: OpenJDK 64-Bit Server VM (19.0-b09) for linux-amd64 JRE (1.6.0_20-b20), built on Jul 22 2011 01:26:54 by buildd with gcc 4.4.3 time: Fri Jan 6 08:48:10 2012 elapsed time: 81155 seconds Thanks much ! On Fri, Jan 6, 2012 at 4:09 PM, Konstantin Kolinko knst.koli...@gmail.comwrote: 2012/1/7 Kamal Sheikh kama...@gmail.com: Hi, I'm new to this but please direct me if I'm posting to the wrong list. Our Tomcat has suddenly stopped working this morning and now wouldn't start -- it responds simply by saying: failed. What is in the logs? Maybe there is no free space on the harddrive? Maybe there is stale pid file from previous Tomcat run? Is there anything going on with OpenJDK and Tomcat? Here's our configuration: Java: java version 1.6.0_20 OpenJDK Runtime Environment (IcedTea6 1.9.9) (6b20-1.9.9-0ubuntu1~10.04.2) OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode) Tomcat Server version: Apache Tomcat/6.0.24 Server built: March 24 2011 1829 6.0.24 was officially released on 2010-01-21 which is more than a year earlier than the above build date. There were a lot of important fixes since then, including some fixes to the startup scripts as well. Server number: ...0 OS Name:Linux OS Version: 2.6.32-32-server Architecture: amd64 JVM Version:1.6.0_20-b20 JVM Vendor: Sun Microsystems Inc. OS Ubuntu 10.04.2 LTS Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Shutdown
From: Kamal Sheikh [mailto:kama...@gmail.com] Subject: Re: Tomcat Shutdown I'm pasting some information from the logs: # A fatal error has been detected by the Java Runtime Environment: # Internal Error (safepoint.cpp:247), pid=306, tid=140562856904448 # guarantee(PageArmed == 0) failed: invariant Uh oh ... that's really ugly; you have a broken JVM. This can be caused by malfunctioning native code inside the JVM process, or it may be a bug in that particular JVM version. # JRE version: 6.0_20-b20 # Java VM: OpenJDK 64-Bit Server VM (19.0-b09 mixed mode linux-amd64 compressed oops) You might try turning off compressed OOPs, and see if that helps. # Distribution: Ubuntu 10.04.1 LTS, package 6b20-1.9.9-0ubuntu1~10.04.2 # If you would like to submit a bug report, please include # instructions how to reproduce the bug and visit: # https://bugs.launchpad.net/ubuntu/+source/openjdk-6/ You should probably do the above. If there's a later JVM available (Oracle is up to 6u30), try that. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Shutdown
Thanks Chuck. Will try that. Appreciate your help. On Fri, Jan 6, 2012 at 4:51 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Kamal Sheikh [mailto:kama...@gmail.com] Subject: Re: Tomcat Shutdown I'm pasting some information from the logs: # A fatal error has been detected by the Java Runtime Environment: # Internal Error (safepoint.cpp:247), pid=306, tid=140562856904448 # guarantee(PageArmed == 0) failed: invariant Uh oh ... that's really ugly; you have a broken JVM. This can be caused by malfunctioning native code inside the JVM process, or it may be a bug in that particular JVM version. # JRE version: 6.0_20-b20 # Java VM: OpenJDK 64-Bit Server VM (19.0-b09 mixed mode linux-amd64 compressed oops) You might try turning off compressed OOPs, and see if that helps. # Distribution: Ubuntu 10.04.1 LTS, package 6b20-1.9.9-0ubuntu1~10.04.2 # If you would like to submit a bug report, please include # instructions how to reproduce the bug and visit: # https://bugs.launchpad.net/ubuntu/+source/openjdk-6/ You should probably do the above. If there's a later JVM available (Oracle is up to 6u30), try that. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown issues
On 10.06.2011 16:55, Caldarale, Charles R wrote: From: April Easton [mailto:aeas...@shawneecourt.org] Subject: Tomcat shutdown issues I don't see any of my threads in there Look harder: Worker-JM prio=3D10 tid=3D0x5d7a1800 nid=3D0x521f in Object.wait() at org.eclipse.core.internal.jobs.InternalWorker.run(InternalWorker.java:58) Bundle File Closer daemon prio=3D10 tid=3D0x5e223800 nid=3D0x521d in Object.wait() at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:397) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:333) Start Level Event Dispatcher daemon prio=3D10 tid=3D0x5d5fc000 nid=3D0x521b in Object.wait() at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:397) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:333) Framework Event Dispatcher daemon prio=3D10 tid=3D0x5d956800 nid=3D0x521a in Object.wait() at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:397) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:333) Those aren't Tomcat's threads; ergo, they are yours. You're running Eclipse, you're responsible for the chaos it creates. ... but AFAIK only the non-daemon threads are problematic. The JVM shouldn't care about existing daemon threads when trying to shut down. So the only one in the list to care about is Worker-JM. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown issues
On 10/06/2011 15:36, April Easton wrote: Good day, I've been working on closing all my threads in my applications that run on Tomcat. I recently upgraded to 7.0.14 to get better messages concerning why Tomcat wasn't shutting down properly. I have stopped all my servlets and threads, but I'm still having trouble. Below is the thread dump of the most recent shutdown and my catalina log. I don't see any of my threads in there, so what is keeping Tomcat alive? Are you running Tomcat inside Eclipse? p signature.asc Description: OpenPGP digital signature
RE: Tomcat shutdown issues
From: April Easton [mailto:aeas...@shawneecourt.org] Subject: Tomcat shutdown issues I don't see any of my threads in there Look harder: Worker-JM prio=3D10 tid=3D0x5d7a1800 nid=3D0x521f in Object.wait() at org.eclipse.core.internal.jobs.InternalWorker.run(InternalWorker.java:58) Bundle File Closer daemon prio=3D10 tid=3D0x5e223800 nid=3D0x521d in Object.wait() at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:397) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:333) Start Level Event Dispatcher daemon prio=3D10 tid=3D0x5d5fc000 nid=3D0x521b in Object.wait() at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:397) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:333) Framework Event Dispatcher daemon prio=3D10 tid=3D0x5d956800 nid=3D0x521a in Object.wait() at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:397) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:333) Those aren't Tomcat's threads; ergo, they are yours. You're running Eclipse, you're responsible for the chaos it creates. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat shutdown issues
I just installed a plug-in to try and get YourKit going to find the leaks. I didn't realize that I had started Tomcat from inside Eclipse. I'll take out what I did. Thanks, April - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat shutdown issues
Taking out what I did for the YourKit plug-in didn't help. Next, I shutdown my Eclipse and then started and stopped Tomcat on the server. The org.eclipse threads were still listed in the thread dump. I recently upgraded B.I.R.T. to version 2.2 on Tomcat and it uses osgi jar files. I'll look to see if there is an issue there or if I need to do something else so Tomcat will shutdown properly. Thanks, April, Systems - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown
2011/2/1 János Löbb janos.l...@yale.edu: It is Tomcat 6.0.29 on OSX 10.6.5. If I ssh to the machine and shutdown Tomcat and later boot it back again, all those components which are using AWT are not usable. However if I Apple Remote Desktop to the machine, open up Terminal there, shut down Tomcat and start it up, all AWT components will work just fine. Any good explanation ? Create $CATALINA_BASE/bin/setenv.sh with the following text CATALINA_OPTS=-Djava.awt.headless=true Google for java.awt.headless for more info, e.g. look here: http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/ Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown
Hi Konstantin, I see... :-) Thanks a lot, János On Feb 1, 2011, at 11:39 AM, Konstantin Kolinko wrote: 2011/2/1 János Löbb janos.l...@yale.edu: It is Tomcat 6.0.29 on OSX 10.6.5. If I ssh to the machine and shutdown Tomcat and later boot it back again, all those components which are using AWT are not usable. However if I Apple Remote Desktop to the machine, open up Terminal there, shut down Tomcat and start it up, all AWT components will work just fine. Any good explanation ? Create $CATALINA_BASE/bin/setenv.sh with the following text CATALINA_OPTS=-Djava.awt.headless=true Google for java.awt.headless for more info, e.g. look here: http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/ Best regards, Konstantin Kolinko - 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
[OT] Re: Tomcat Shutdown suddenly / random
Carl wrote: ... Hi. Nothing to do with the subject, but I guess that either your workstation or your email forwarding system must be off by one hour, making your questions appear after the answer has already been given. This looks strange, and reminds me of a character in one of Terry Pratchett's novels. Either that, or else Mark has acquired Pid's gifts. Or else, we should investigate further, as I am sure there must be other uses for this phenomenon. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Shutdown suddenly / random
Dear All, I don't believe Tomcat has any System.exit calls in it, so you could grep your code looking for such calls. Note that findbugs can be used for that. It will issue a warning for code that calls System.exit(). -- Kees Jan http://java-monitor.com/ kjkos...@kjkoster.org 06-51838192 Change is good. Granted, it is good in retrospect, but change is good. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Shutdown suddenly / random
On 16/04/2010 17:21, Peter Borkowski wrote: Hi folks, we are facing a serious problem with our tomcat which shuts itself down after some time of running. this problem first arises after we switched to our new server. we are using tomcat 6.0.26 (also tried different other 5.5.x, 6.0.x versions). the old server was a 32 bit red hat enterprise linux system. the new server is a 64 bit debian 5 (also tried debian 6). the log always gives us the following message, so as if the tomcat has been cleanly shutdown, which is really strange. 16.04.2010 11:52:42 org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 16.04.2010 11:52:43 org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina 16.04.2010 11:52:43 org.apache.coyote.http11.Http11Protocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 That looks like a fairly orderly shutdown to me. What is immediately before it in this log and in the access logs at the time? we also tried to switch the shutdown-message and the shutdown-port, without effect. If something is calling an init.d/tomcat script then it won't matter. Tomcat only listens on the localhost address for that message anyway. the tomcat process is started with a non-root-user. the server runs for 15 minutes to 8 hours before it happens. To confirm: are you starting stopping using a JSVC wrapper script? Are there any cron jobs (or similar) which might interfere with the server? Were there any users logged into the system at the time of shutdown? Is there anything in the .bash_history (or whatever shell you're using) of said user(s)? p any suggestions or help would be nice. cya, peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
Re: Tomcat Shutdown suddenly / random
Peter, could it be that something is sending your tomcat process a TERM signal, logfiles in /var/log might tell something ? or one of your applications issues a System.exit() under certain circumstances ? regards, Harry 2010/4/16 Peter Borkowski apocalyps...@gmx.de Hi folks, we are facing a serious problem with our tomcat which shuts itself down after some time of running. this problem first arises after we switched to our new server. we are using tomcat 6.0.26 (also tried different other 5.5.x, 6.0.x versions). the old server was a 32 bit red hat enterprise linux system. the new server is a 64 bit debian 5 (also tried debian 6). the log always gives us the following message, so as if the tomcat has been cleanly shutdown, which is really strange. 16.04.2010 11:52:42 org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-8080 16.04.2010 11:52:43 org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina 16.04.2010 11:52:43 org.apache.coyote.http11.Http11Protocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 we also tried to switch the shutdown-message and the shutdown-port, without effect. the tomcat process is started with a non-root-user. the server runs for 15 minutes to 8 hours before it happens. any suggestions or help would be nice. cya, peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Shutdown suddenly / random
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Harry, On 4/16/2010 2:35 PM, Harry Metske wrote: could it be that something is sending your tomcat process a TERM signal, logfiles in /var/log might tell something ? or one of your applications issues a System.exit() under certain circumstances ? +1 I'm not sure what the best way is to catch TERM signals. I guess you could write some JNI code to install a signal handler that logs the signal and details (if available) about the process that sent the signal. I don't believe Tomcat has any System.exit calls in it, so you could grep your code looking for such calls. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvIz4IACgkQ9CaO5/Lv0PAT4QCgtsZhK/DtHhS8KVjYUhCA2mdG dVwAn1DOyYGJLIfV5hBl1GWaTF8CZUO3 =ASpm -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Shutdown suddenly / random
I thought thta a System.exit call would kill the JVM and would therefore not show the clean shutdown in the logs that the OP is seeing... am I wrong about System.exit? Thanks, Carl - Original Message - From: Christopher Schultz ch...@christopherschultz.net To: Tomcat Users List users@tomcat.apache.org Sent: Friday, April 16, 2010 3:58 PM Subject: Re: Tomcat Shutdown suddenly / random -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Harry, On 4/16/2010 2:35 PM, Harry Metske wrote: could it be that something is sending your tomcat process a TERM signal, logfiles in /var/log might tell something ? or one of your applications issues a System.exit() under certain circumstances ? +1 I'm not sure what the best way is to catch TERM signals. I guess you could write some JNI code to install a signal handler that logs the signal and details (if available) about the process that sent the signal. I don't believe Tomcat has any System.exit calls in it, so you could grep your code looking for such calls. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkvIz4IACgkQ9CaO5/Lv0PAT4QCgtsZhK/DtHhS8KVjYUhCA2mdG dVwAn1DOyYGJLIfV5hBl1GWaTF8CZUO3 =ASpm -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: Tomcat Shutdown suddenly / random
On 16/04/2010 23:43, Carl wrote: I thought thta a System.exit call would kill the JVM and would therefore not show the clean shutdown in the logs that the OP is seeing... am I wrong about System.exit? Yes. It invokes the shutdown hook and that performs a clean shutdown. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown: catalina.sh STOP vs SIGTERM
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ajay, On 3/8/2010 12:53 PM, Aggarwal, Ajay wrote: Sometimes on a busy system I have seen that catalina.sh stop does take a long time to shutdown tomcat. You might want to investigate why this is happening: my Tomcat instances (we have 4 in production) take only a few seconds to shut down completely. We are running another monitoring service on the system that monitors tomcat and few other system services. After issuing catalina.sh and waiting for some time (up to 25 seconds) it loses patience and gives a SIGTERM to tomcat process. SIGTERM seems to bring tomcat down much faster. :) What is the downside of using SIGTERM, if any? I tried issuing a SIGTERM to my JVM/Tomcat process running in development, and I got some messages in the app log file that indicated that the webapp was coming down. But, I didn't get any shutting down messages in catalina.out which leads me to believe that the shutdown wasn't entirely clean. It does seem to bring tomcat down in an orderly manner and much faster than catalina.sh stop. Well, definitely faster, but I'm not sure about orderly: you should check to see what things aren't stopping and determine if they are potentially disastrous it TERMinated. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuVQt8ACgkQ9CaO5/Lv0PD8LgCdFbaGLq1nfsqJJb4dbAsKY8hT lFEAoLUQHVzXZ9KnrQ79ExupS4cyKDfD =vn8E -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown: catalina.sh STOP vs SIGTERM
On Mon, Mar 8, 2010 at 9:53 AM, Aggarwal, Ajay ajay.aggar...@stratus.com wrote: What is the downside of using SIGTERM, if any? It does seem to bring tomcat down in an orderly manner and much faster than catalina.sh stop. Yeah, seem to would be the operative phrase, I think. A leap off a tall structure might seem to be much like flying. Initially. :-) As Chris already said: check your app to see what's slow to exit, and what the consequences of an ungraceful stop might be. -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat shutdown: catalina.sh STOP vs SIGTERM
When I send SIGTERM to tomcat, I actually do get 1) these messages in my catalina.out Mar 8, 2010 2:46:05 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina and, 2) my servlets destroy() methods do get called. That’s why I suspect that even SIGTERM seems to bring tomcat down in an orderly manner. I should mention that I am on a linux platform, running tomcat 6.0.20. As to why on a busy system, catalina.sh stop takes longer I really don't have the details. All I can say is that sometimes I don't even see the above messages for first 20-25 seconds. Could it be because catalina.sh stop has to start another JVM and then send a stop message to tomcat process over a local loop interface and on a busy system, both of these require resources which may not be available. -Ajay -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Monday, March 08, 2010 1:33 PM To: Tomcat Users List Subject: Re: tomcat shutdown: catalina.sh STOP vs SIGTERM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ajay, On 3/8/2010 12:53 PM, Aggarwal, Ajay wrote: Sometimes on a busy system I have seen that catalina.sh stop does take a long time to shutdown tomcat. You might want to investigate why this is happening: my Tomcat instances (we have 4 in production) take only a few seconds to shut down completely. We are running another monitoring service on the system that monitors tomcat and few other system services. After issuing catalina.sh and waiting for some time (up to 25 seconds) it loses patience and gives a SIGTERM to tomcat process. SIGTERM seems to bring tomcat down much faster. :) What is the downside of using SIGTERM, if any? I tried issuing a SIGTERM to my JVM/Tomcat process running in development, and I got some messages in the app log file that indicated that the webapp was coming down. But, I didn't get any shutting down messages in catalina.out which leads me to believe that the shutdown wasn't entirely clean. It does seem to bring tomcat down in an orderly manner and much faster than catalina.sh stop. Well, definitely faster, but I'm not sure about orderly: you should check to see what things aren't stopping and determine if they are potentially disastrous it TERMinated. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuVQt8ACgkQ9CaO5/Lv0PD8LgCdFbaGLq1nfsqJJb4dbAsKY8hT lFEAoLUQHVzXZ9KnrQ79ExupS4cyKDfD =vn8E -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown: catalina.sh STOP vs SIGTERM
2010/3/8 Aggarwal, Ajay ajay.aggar...@stratus.com: When I send SIGTERM to tomcat, I actually do get Tomcat installs a shutdown hook into JVM so that it will shutdown gracefully. There is a problem though that if there are several shutdown hooks then they run in parallel. That is particularly visible in 6.0.24, because logging system shutdown was made more robust. This shutdown hooks race is already fixed in the current 6.0.x sources -- that will be 6.0.26. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown: catalina.sh STOP vs SIGTERM
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ajay, On 3/8/2010 2:56 PM, Aggarwal, Ajay wrote: When I send SIGTERM to tomcat, I actually do get 1) these messages in my catalina.out Mar 8, 2010 2:46:05 PM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina That's good, but apparently not guaranteed to occur, since I didn't see them in my environment. It's possible that the JVM sends a notification and subsequently terminates all the threads, but may not wait for them to finish their work. I highly recommend an orderly shutdown (using catalina.sh stop). As to why on a busy system, catalina.sh stop takes longer I really don't have the details. This should be easy to determine: run catalina.sh stop which should return immediately. Run jstack on the still-running JVM several times a few seconds apart to see which threads are still alive. Perhaps some are request processing threads still doing work, in which case the response will not complete if you forceably kill the thread. There could be other threads running that should be daemon threads but aren't: that's usually a simple fix. All I can say is that sometimes I don't even see the above messages for first 20-25 seconds. Could it be because catalina.sh stop has to start another JVM and then send a stop message to tomcat process over a local loop interface and on a busy system, both of these require resources which may not be available. Yes and no: catalina.sh stop does in fact start a second JVM and send a stop message to the other Tomcat, but its likely that Tomcat receives the message immediately. I'm not sure why it would take 20-30 seconds for you to see the above message: it should be immediate. Tomcat then does a whole bunch of things, including waiting for request processing threads to complete, notifying servlet context listeners that the webapp is coming down, then taking the servlets and filters out of service, shutting down various resource pools, etc. Only then does it take the connectors out of service. So, if something takes a long time to complete (maybe a filter or servlet taking a long time to shutdown) then you'll just have to wait for it to complete. I just checked, and my TC 6.0.20 install doesn't print anything after Stopping Service Catalina when I shut it down, so it's possible that message is printed when the service really is ready to go down. Thread dumps will certainly help you figure out what's taking so long. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuVhyIACgkQ9CaO5/Lv0PBZBACfY+kevbW9Y51JNMrghofh4aCj atwAn02La9O0OEY5bn3/9l+3NlHazxRG =LQwd -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: tomcat shutdown: catalina.sh STOP vs SIGTERM
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: tomcat shutdown: catalina.sh STOP vs SIGTERM I'm not sure why it would take 20-30 seconds for you to see the above message: it should be immediate. One possible cause is specifying a large heap size in JAVA_OPTS, which will be used by both the running Tomcat and the JVM launched by the shutdown script. Better to put such settings in CATALINA_OPTS, which is not used by the shutdown script. - 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. __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __
Re: Tomcat shutdown issue
Can you please suggest how to scan the port and check the port is used by other application. I am using socket programming to check the port this is right? awarnier wrote: As I believe someone already told you, there is no need to repeat every message twice. dBenjamin wrote: Tomcat not getting shutdown.. it shows the WARNING: StandardServer.await: Invalid command '' received can you pls find server.xml when I click shutdwon.bat server not listning it shows WARNING: StandardServer.await: Invalid command '' received can you please help me to solve this issues.. Also, you were already given the answer before : Probably (but we cannot tell that for sure just by your server.xml file), it looks like /something/ is sending a normal HTTP request (*) /to the shutdown port of the server/, instead of the normal HTTP port. Find which client is sending a HTTP request to his port : Server port=3006 shutdown=SHUTDOWN instead of this port : Connector connectionTimeout=3 port=6876 protocol=HTTP/1.1 redirectPort=8757/ and you will find the reason. (*) as a matter of fact, as per the logfile, it looks like this client is making a connection to port 3006 and then just sending an empty request. If you have software doing some kind of port scanning, that may be the culprit. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/RE%3A-WARNING%3A-StandardServer.await%3A-Invalid-command-%27%27-received-tp27652985p27691253.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown issue
dBenjamin wrote: Can you please suggest how to scan the port and check the port is used by other application. On what kind of system are you ? Anyway, shut down Tomcat, then use the netstat command. Depending on the system on which you are, there are options to this command. Choose one that will show you either the process-id, or the name of the program which owns the sockets. Look for ports (on the local side) which have LISTEN around the end of the line. That should tell you the programs, apart from Tomcat, which are listening on various ports. Then turn on Tomcat, and enter the same command again. The differences between the first and second result should tell you which port Tomcat is listening on. I am using socket programming to check the port this is right? I do not understand this question. Explain what you are trying to do. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown issue
As I believe someone already told you, there is no need to repeat every message twice. dBenjamin wrote: Tomcat not getting shutdown.. it shows the WARNING: StandardServer.await: Invalid command '' received can you pls find server.xml when I click shutdwon.bat server not listning it shows WARNING: StandardServer.await: Invalid command '' received can you please help me to solve this issues.. Also, you were already given the answer before : Probably (but we cannot tell that for sure just by your server.xml file), it looks like /something/ is sending a normal HTTP request (*) /to the shutdown port of the server/, instead of the normal HTTP port. Find which client is sending a HTTP request to his port : Server port=3006 shutdown=SHUTDOWN instead of this port : Connector connectionTimeout=3 port=6876 protocol=HTTP/1.1 redirectPort=8757/ and you will find the reason. (*) as a matter of fact, as per the logfile, it looks like this client is making a connection to port 3006 and then just sending an empty request. If you have software doing some kind of port scanning, that may be the culprit. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat shutdown issue
Tomcat not getting shutdown.. it shows the WARNING: StandardServer.await: Invalid command '' received can you pls find server.xml when I click shutdwon.bat server not listning it shows WARNING: StandardServer.await: Invalid command '' received can you please help me to solve this issues.. ?xml version=1.0 encoding=UTF-8? Server port=3006 shutdown=SHUTDOWN !--APR library loader. Documentation at /docs/apr.html -- Listener SSLEngine=on className=org.apache.catalina.core.AprLifecycleListener/ !--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -- Listener className=org.apache.catalina.core.JasperListener/ !-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ !-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html -- GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource auth=Container description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory name=UserDatabase pathname=conf/tomcat-users.xml type=org.apache.catalina.UserDatabase/ /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container Note: A Service is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/service.html -- Service name=Catalina Connector connectionTimeout=3 port=6876 protocol=HTTP/1.1 redirectPort=8757/ !-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). Documentation at /docs/config/engine.html -- !-- You should set jvmRoute to support load-balancing via AJP ie : Engine name=Standalone defaultHost=localhost jvmRoute=jvm1 -- Engine defaultHost=localhost name=Catalina !-- This Realm uses the UserDatabase configured in the global JNDI resources under the key UserDatabase. Any edits that are performed against this UserDatabase are immediately available for use by the Realm. -- Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ !-- Define the default virtual host Note: XML Schema validation will not work with Xerces 2.2. -- Host appBase=webapps autoDeploy=true name=localhost unpackWARs=true xmlNamespaceAware=false xmlValidation=false /Host /Engine /Service /Server -- View this message in context: http://old.nabble.com/RE%3A-WARNING%3A-StandardServer.await%3A-Invalid-command-%27%27-received-tp27652985p27659380.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown automaticly after randomaly period of time
Tomcat1 wrote: hi, i have Tomcat 6.0.20. i config server.xml to work with SSL. the problem is that Tomcat shutdown after randomaly period of time and doesnt restart again. Hi. It is not very clear what your problem is. You have to be a bit more specific in your explanation. Also tell us on which platform this is running, and the JVM version The log which you included, shows a problem when Tomcat *starts*. The problem, when Tomcat starts, is that when it tries to create the Connector on port 8443, it finds that this port is already in use by another process. That is why it says : SEVERE: Error initializing endpoint java.net.BindException: Address already in usenull:8443 To see why that is, you need to : - stop Tomcat - find out if something else is using that port 8443. Under both Unix/Linux and Windows, you can use the netstat command for that. Look for a line that has :8443 and LISTEN in it. - if nothing else is using it, it may be that when you believed that Tomcat was stopped, it was not. You have to resolve that first. Once that issue is sorted out, then maybe we can start looking why Tomcat shutdown after a random period. That is not normal. Tomcat does not usually shutdown by itself. But that problem is not shown in the logfile that you copied here. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown automaticly after randomaly period of time
I think it happens when another process else uses port 8443 : java.net.BindException: Address already in usenull:8443 Regards, Zacheusz On Tue, Dec 22, 2009 at 7:18 AM, Tomcat1 z...@amdocs.com wrote: hi, i have Tomcat 6.0.20. i config server.xml to work with SSL. the problem is that Tomcat shutdown after randomaly period of time and doesnt restart again. in server.xml i config: !--Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 /-- !-- A Connector using the shared thread pool-- !-- Connector executor=tomcatThreadPool port=8080 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=443 / -- !-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation -- Connector port=8443 protocol=HTTP/1.1 maxThreads=150 scheme=https secure=true SSLEnabled=true keystoreFile=/certificate/.key keystorePass=changeit clientAuth=false sslProtocol=TLS URIEncoding=UTF-8 compression=on compressableMimeType=text/html,text/xml,text/css,text/plain,text/javascript,application/javascript,application/x-javascript / !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 protocol=AJP/1.3 redirectPort=443 / the log i get is: Catalina.2009-12-21.log: Dec 21, 2009 3:13:45 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/cie /java/jdk1.5.0_21/jre/lib/i386/server:/opt/cie/java/jdk1.5.0_21/jre/lib/i386:/opt/cie/java/jdk1.5.0_21/jre/../lib/i386 Dec 21, 2009 3:13:46 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8443 Dec 21, 2009 3:13:46 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2784 ms Dec 21, 2009 3:13:46 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Dec 21, 2009 3:13:46 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.20 Dec 21, 2009 3:13:49 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive AdminManager.war Dec 21, 2009 3:14:55 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive Publisher.war Dec 21, 2009 3:15:36 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive Advertiser.war Dec 21, 2009 3:16:11 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8443 Dec 21, 2009 3:16:11 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Dec 21, 2009 3:16:12 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/171 config=null Dec 21, 2009 3:16:12 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 145986 ms Dec 21, 2009 3:50:04 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/cie /java/jdk1.5.0_21/jre/lib/i386/server:/opt/cie/java/jdk1.5.0_21/jre/lib/i386:/opt/cie/java/jdk1.5.0_21/jre/../lib/i386 Dec 21, 2009 3:50:06 AM org.apache.coyote.http11.Http11Protocol init SEVERE: Error initializing endpoint java.net.BindException: Address already in usenull:8443 at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:509) at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176) at org.apache.catalina.connector.Connector.initialize(Connector.java:1058) at org.apache.catalina.core.StandardService.initialize(StandardService.java:677) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795) at org.apache.catalina.startup.Catalina.load(Catalina.java:535) at org.apache.catalina.startup.Catalina.load(Catalina.java:555) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412) Dec 21, 2009 3:50:06 AM org.apache.catalina.startup.Catalina load SEVERE: Catalina.start LifecycleException: Protocol handler initialization failed:
Re: Tomcat shutdown issues
Looks like your server started pretty quick. Are there any applications deployed? What url are you hitting when you get the reset exception. Do you see the tomcat start page? Pejus On Fri, Dec 18, 2009 at 8:10 PM, SRama su...@techie.com wrote: Hi I have some issues with tomcat, after starting the tomcat when I give request to my application tomcat console showing the following error message.. Dec 18, 2009 2:59:23 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 3955 ms Dec 18, 2009 2:59:27 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'GET /gdf2009 HTTP/1.1' received Dec 18, 2009 2:59:27 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'GET /gdf2009 HTTP/1.1' received Dec 18, 2009 2:59:29 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: read: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at org.apache.catalina.core.StandardServer.await(StandardServer.java:412 ) at org.apache.catalina.startup.Catalina.await(Catalina.java:630) at org.apache.catalina.startup.Catalina.start(Catalina.java:590) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Dec 18, 2009 2:59:29 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command '' received I am not able to shutdown the server please let me know if you have any idea about this issue.. -- View this message in context: http://old.nabble.com/Tomcat-shutdown-issues-tp26849025p26849025.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown issues
2009/12/18 SRama su...@techie.com: Hi I have some issues with tomcat, after starting the tomcat when I give request to my application tomcat console showing the following error message.. Dec 18, 2009 2:59:23 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 3955 ms Dec 18, 2009 2:59:27 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'GET /gdf2009 HTTP/1.1' received Someone is trying to send HTTP request to the Tomcat Shutdown port. It is not what is expected there. See http://tomcat.apache.org/tomcat-6.0-doc/config/server.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown issues
before starting the server I am checking both port address if any other applicaion using the same port I am dynamicaly chaning the shutdown port and http port. 2. I am not using AJP Connector and redirect port so I have removed. Can you think because of the issues comming? ?xml version=1.0 encoding=UTF-8? Server port=8875 shutdown=SHUTDOWN !--APR library loader. Documentation at /docs/apr.html -- Listener SSLEngine=on className=org.apache.catalina.core.AprLifecycleListener/ !--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -- Listener className=org.apache.catalina.core.JasperListener/ !-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ !-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html -- GlobalNamingResources !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource auth=Container description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory name=UserDatabase pathname=conf/tomcat-users.xml type=org.apache.catalina.UserDatabase/ /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container Note: A Service is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/service.html -- Service name=Catalina Connector connectionTimeout=3 port=5050 protocol=HTTP/1.1 redirectPort=8444/ !-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual host). Documentation at /docs/config/engine.html -- !-- You should set jvmRoute to support load-balancing via AJP ie : Engine name=Standalone defaultHost=localhost jvmRoute=jvm1 -- Engine defaultHost=localhost name=Catalina !-- This Realm uses the UserDatabase configured in the global JNDI resources under the key UserDatabase. Any edits that are performed against this UserDatabase are immediately available for use by the Realm. -- Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ !-- Define the default virtual host Note: XML Schema validation will not work with Xerces 2.2. -- Host appBase=webapps autoDeploy=true name=localhost unpackWARs=true xmlNamespaceAware=false xmlValidation=false /Host /Engine /Service /Server -- View this message in context: http://old.nabble.com/Tomcat-shutdown-issues-tp26849025p26850483.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown issues
Tomcat console Error message : Using CATALINA_BASE: C:\Users\x1\WDD\dpcdrom\tomcat Using CATALINA_HOME: C:\Users\x1\WDD\dpcdrom\tomcat Using CATALINA_TMPDIR: C:\Users\x1\WDD\dpcdrom\tomcat\temp Using JRE_HOME:C:\Users\x1\WDD\dpcdrom\java\JavaWin Dec 18, 2009 5:03:55 PM org.apache.catalina.core.AprLifecycleListener init INFO: The Apache Tomcat Native library which allows optimal performance in produ ction environments was not found on the java.library.path: C:\Users\w1\WDD \dpcdrom\java\JavaWin\bin;.;C:\Windows\system32;C:\Windows;C:\Windows\system32;C :\Windows;C:\Windows\System32\Wbem;C:\Program Files\IXOS\bin;C:\Program Files\Co mmon Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9. 0\DLLShared\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\j dk1.5.0_22\bin;C:\Program Files\Apache Software Foundation\Tomcat 6.0;C:\Program Files\Windows Imaging\ Dec 18, 2009 5:03:55 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-5050 Dec 18, 2009 5:03:55 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 388 ms Dec 18, 2009 5:03:55 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Dec 18, 2009 5:03:55 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.14 log4j:WARN No appenders could be found for logger (com.opensymphony.xwork2.confi g.providers.XmlConfigurationProvider). log4j:WARN Please initialize the log4j system properly. Dec 18, 2009 5:03:57 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-5050 Dec 18, 2009 5:03:57 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 2558 ms Dec 18, 2009 5:04:38 PM org.apache.tomcat.util.http.Parameters processParameters WARNING: Parameters: Invalid chunk ignored. Dec 18, 2009 5:04:38 PM org.apache.tomcat.util.http.Parameters processParameters WARNING: Parameters: Invalid chunk ignored. Dec 18, 2009 5:04:53 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'GET /gdf2009 HTTP/1.1' received Dec 18, 2009 5:04:53 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'GET /gdf2009 HTTP/1.1' received Dec 18, 2009 5:04:54 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: read: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at org.apache.catalina.core.StandardServer.await(StandardServer.java:412 ) at org.apache.catalina.startup.Catalina.await(Catalina.java:630) at org.apache.catalina.startup.Catalina.start(Catalina.java:590) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Dec 18, 2009 5:04:54 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command '' received Dec 18, 2009 5:04:54 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: read: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at org.apache.catalina.core.StandardServer.await(StandardServer.java:412 ) at org.apache.catalina.startup.Catalina.await(Catalina.java:630) at org.apache.catalina.startup.Catalina.start(Catalina.java:590) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Dec 18, 2009 5:04:54 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command '' received please help me to sovle this issue.. -- View this message in context: http://old.nabble.com/Tomcat-shutdown-issues-tp26849025p26850526.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown issues
I have depolyed my application it's working fine. but I am not able to shutdown... Pejus M. Das wrote: Looks like your server started pretty quick. Are there any applications deployed? What url are you hitting when you get the reset exception. Do you see the tomcat start page? Pejus On Fri, Dec 18, 2009 at 8:10 PM, SRama su...@techie.com wrote: Hi I have some issues with tomcat, after starting the tomcat when I give request to my application tomcat console showing the following error message.. Dec 18, 2009 2:59:23 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 3955 ms Dec 18, 2009 2:59:27 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'GET /gdf2009 HTTP/1.1' received Dec 18, 2009 2:59:27 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'GET /gdf2009 HTTP/1.1' received Dec 18, 2009 2:59:29 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: read: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at org.apache.catalina.core.StandardServer.await(StandardServer.java:412 ) at org.apache.catalina.startup.Catalina.await(Catalina.java:630) at org.apache.catalina.startup.Catalina.start(Catalina.java:590) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Dec 18, 2009 2:59:29 PM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command '' received I am not able to shutdown the server please let me know if you have any idea about this issue.. -- View this message in context: http://old.nabble.com/Tomcat-shutdown-issues-tp26849025p26849025.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://old.nabble.com/Tomcat-shutdown-issues-tp26849025p26850592.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown issues
2009/12/19 SRama su...@techie.com: before starting the server I am checking both port address if any other applicaion using the same port I am dynamicaly chaning the shutdown port and http port. You won't be able to shutdown Tomcat using the shutdown script, if the script does not know what Shutdown port Tomcat listens to, and what secret it expects being written to that port. Those values are read from server.xml. If server.xml is wrong (is not the same one as was used to Start this Tomcat instance), you won't be able to use the shutdown script. Once again, http://tomcat.apache.org/tomcat-6.0-doc/config/server.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown problem due to running threads.
CBy wrote: O'Reilly's Tomcat The Definitive Guide advises me to invoke the setDaemon(true) method on any Thread object a web application creates to keep them from hanging the JVM when Tomcat shuts down. My web service, however, uses a thread pool that is created via java.util.concurrent.Executors.newFixedThreadPool(NTHREADS) and I don't know how to make them daemon threads in this case. My new plan was to register a shutdown hook with the JVM in my web service and to invoke shutdown() or shutdownNow() on the ExecutorService in it (the method above returns an ExecutorService). Unfortunately, this does not seem to work. Is there another way to be notified when Tomcat shuts down, so I can shutdown the thread pool accordingly? From a non-expert (but the expterts are mostly asleep right now) : maybe this ? http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown problem due to running threads.
Thanks for pointing me in the right direction André. A ServletContextListener fixed my problem. André Warnier wrote: CBy wrote: O'Reilly's Tomcat The Definitive Guide advises me to invoke the setDaemon(true) method on any Thread object a web application creates to keep them from hanging the JVM when Tomcat shuts down. My web service, however, uses a thread pool that is created via java.util.concurrent.Executors.newFixedThreadPool(NTHREADS) and I don't know how to make them daemon threads in this case. My new plan was to register a shutdown hook with the JVM in my web service and to invoke shutdown() or shutdownNow() on the ExecutorService in it (the method above returns an ExecutorService). Unfortunately, this does not seem to work. Is there another way to be notified when Tomcat shuts down, so I can shutdown the thread pool accordingly? From a non-expert (but the expterts are mostly asleep right now) : maybe this ? http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown problem due to running threads.
CBy wrote: Thanks for pointing me in the right direction André. A ServletContextListener fixed my problem. My own contribution was minimal, and due mainly to the fact that I am eavesdropping on the real Tomcat experts conversations here and remembering some things, even if I never used them myself and would not recognise one if it appeared in some code. Fortunately, a Listener is a Tomcat thing that has a pretty expressive name, and it seemed to fit your request. Don't ask me how it works though.. ;-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown problem due to running threads.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Carsten, On 6/17/2009 4:33 AM, CBy wrote: O'Reilly's Tomcat The Definitive Guide advises me to invoke the setDaemon(true) method on any Thread object a web application creates to keep them from hanging the JVM when Tomcat shuts down. My web service, however, uses a thread pool that is created via java.util.concurrent.Executors.newFixedThreadPool(NTHREADS) and I don't know how to make them daemon threads in this case. Can you adjust that code? If so, use the form of that method that takes a ThreadFactory object. Something like this ought to do it: public class DaemonThreadFactory implements ThreadFactory { public Thread newThread(Runnable r) { Thread t = new Thread(r); t.setDaemon(true); return t; } } My new plan was to register a shutdown hook with the JVM in my web service and to invoke shutdown() or shutdownNow() on the ExecutorService in it (the method above returns an ExecutorService). Unfortunately, this does not seem to work. You should do as André suggests and use a ServletContextListener. You should probably use the same listener to both create and teardown the thread pool. I recently had my first experience with Executors in Java. I have to say that I love 'em. So simple, yet so powerful. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAko5KyoACgkQ9CaO5/Lv0PDgcQCfVTfVdv3xUXsEFhh+PYWy9uII hpoAn37qoHfLeSVot+FjaYI3XS+8deeH =j4WL -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown problem due to running threads.
Thank you, Christopher. It appears that I now have to ways to solve my problem. Calling shutdown() stops the threads orderly, so I think I'll opt for the ContextListener, although I am not 100% sure. Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Carsten, On 6/17/2009 4:33 AM, CBy wrote: O'Reilly's Tomcat The Definitive Guide advises me to invoke the setDaemon(true) method on any Thread object a web application creates to keep them from hanging the JVM when Tomcat shuts down. My web service, however, uses a thread pool that is created via java.util.concurrent.Executors.newFixedThreadPool(NTHREADS) and I don't know how to make them daemon threads in this case. Can you adjust that code? If so, use the form of that method that takes a ThreadFactory object. Something like this ought to do it: public class DaemonThreadFactory implements ThreadFactory { public Thread newThread(Runnable r) { Thread t = new Thread(r); t.setDaemon(true); return t; } } My new plan was to register a shutdown hook with the JVM in my web service and to invoke shutdown() or shutdownNow() on the ExecutorService in it (the method above returns an ExecutorService). Unfortunately, this does not seem to work. You should do as André suggests and use a ServletContextListener. You should probably use the same listener to both create and teardown the thread pool. I recently had my first experience with Executors in Java. I have to say that I love 'em. So simple, yet so powerful. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAko5KyoACgkQ9CaO5/Lv0PDgcQCfVTfVdv3xUXsEFhh+PYWy9uII hpoAn37qoHfLeSVot+FjaYI3XS+8deeH =j4WL -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: Tomcat shutdown problem due to running threads.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Carsten, On 6/17/2009 2:04 PM, CBy wrote: Thank you, Christopher. It appears that I now have to ways to solve my problem. Calling shutdown() stops the threads orderly, so I think I'll opt for the ContextListener, although I am not 100% sure. I'd do both if I were you :) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAko5ODwACgkQ9CaO5/Lv0PCYUgCgpSkcuXg2rFBlfNv+8It9GH34 eB0AoJwUVU7PdQ8dcejZX+FmtupmnwNP =H87P -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown problem
Pid thanks very much. We found the thread from the thread dump. Problem we did is we didnt shutdown the quartz scheduler. Now as per ur guidelines in the context listener we did that. It currently in testing phase. Thanks.. Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison On Mon, Apr 27, 2009 at 7:50 PM, Pid p...@pidster.com wrote: S Arvind wrote: Pid very thanks for guiding me .. one more help alone... can u please tell me how to check which thread it is runnin by quartz other then checking code ... i am centos, jvm 5, tomcat 5 and tomcat 6.. i think i am disturbin u lot, but ... As Dan said, kill -QUIT pid, and as I said previously, familiarise yourself with jstack, jmap and possibly jconsole, all of which are command line tools available with the Sun JREs. p -Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* On Mon, Apr 27, 2009 at 7:18 PM, Pid p...@pidster.com wrote: S Arvind wrote: Is the application completely unchanged for deployment on Tomcat 6? yes it is completely *unchanged*... is anything must be changed for quartz? okay, then your best bet is to explore what the JVM is doing after shutdown and check which threads are still running. p --Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 5:06 PM, Pid p...@pidster.com wrote: Please do not keep using reply to all. It is annoying and unnecessary. I will obviously receive a copy of the mail if you just send a reply to the list. Did you write your application? there are team of 200 Engineers wrote that application so i dont know where the problem is Are you using Quartz in your application? yeah we have quartz scheduler in our application. But when we run in Tomcat 5 we dont have this kind of problem Is the application completely unchanged for deployment on Tomcat 6? When you shutdown, Quartz will log a message describing the number of running threads, this may help diagnose the problem. The count may be above 20, but that isn't necessarily a bad thing. Are you starting new Threads in your app? Might be, i have to ask each team. Check that they are being properly terminated. Even if the devs promise they are, double check. When you have started and stopped the application a few times are there still multiple java processes running? YES, this is the only thing assigned to me to correct it. You should ensure that the old processes are terminated before starting new ones, as an old one may hang onto one of the ports that Tomcat uses, thus preventing new instances from starting up. The Linux kill command can do this. However... After shutdown has been requested and while the process is still running, take a thread dump, or use the java tools to examine the state of the JVM. See if you can spot which Threads are still running. Try jmap, jstack and jconsole (if you're on a local machine). p *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:21 PM, Pid p...@pidster.com wrote: S Arvind wrote: Thanks pid... Can u able to give me more idea to solve it if possible.. Did you write your application? Are you using Quartz in your application? Are you starting new Threads in your app? When you have started and stopped the application a few times are there still multiple java processes running? p Thanks, Arvind S *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:00 PM, Pid p...@pidster.com wrote: S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18 -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18
Re: tomcat shutdown problem
S Arvind wrote: Pid thanks very much. We found the thread from the thread dump. Problem we did is we didnt shutdown the quartz scheduler. Now as per ur guidelines in the context listener we did that. It currently in testing phase. Thanks.. Good news. And now you know 2 things: how to diagnose via Thread dumps, and it only takes one of 200 devs to forget to stop a Thread... It's possible that the old way you were stopping TC5.x was just killing the process - so you weren't seeing the error, perhaps if you were using JSVC via an init script in /etc/init.d/tomcat5 or something. p Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison On Mon, Apr 27, 2009 at 7:50 PM, Pid p...@pidster.com wrote: S Arvind wrote: Pid very thanks for guiding me .. one more help alone... can u please tell me how to check which thread it is runnin by quartz other then checking code ... i am centos, jvm 5, tomcat 5 and tomcat 6.. i think i am disturbin u lot, but ... As Dan said, kill -QUIT pid, and as I said previously, familiarise yourself with jstack, jmap and possibly jconsole, all of which are command line tools available with the Sun JREs. p -Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* On Mon, Apr 27, 2009 at 7:18 PM, Pid p...@pidster.com wrote: S Arvind wrote: Is the application completely unchanged for deployment on Tomcat 6? yes it is completely *unchanged*... is anything must be changed for quartz? okay, then your best bet is to explore what the JVM is doing after shutdown and check which threads are still running. p --Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 5:06 PM, Pid p...@pidster.com wrote: Please do not keep using reply to all. It is annoying and unnecessary. I will obviously receive a copy of the mail if you just send a reply to the list. Did you write your application? there are team of 200 Engineers wrote that application so i dont know where the problem is Are you using Quartz in your application? yeah we have quartz scheduler in our application. But when we run in Tomcat 5 we dont have this kind of problem Is the application completely unchanged for deployment on Tomcat 6? When you shutdown, Quartz will log a message describing the number of running threads, this may help diagnose the problem. The count may be above 20, but that isn't necessarily a bad thing. Are you starting new Threads in your app? Might be, i have to ask each team. Check that they are being properly terminated. Even if the devs promise they are, double check. When you have started and stopped the application a few times are there still multiple java processes running? YES, this is the only thing assigned to me to correct it. You should ensure that the old processes are terminated before starting new ones, as an old one may hang onto one of the ports that Tomcat uses, thus preventing new instances from starting up. The Linux kill command can do this. However... After shutdown has been requested and while the process is still running, take a thread dump, or use the java tools to examine the state of the JVM. See if you can spot which Threads are still running. Try jmap, jstack and jconsole (if you're on a local machine). p *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:21 PM, Pid p...@pidster.com wrote: S Arvind wrote: Thanks pid... Can u able to give me more idea to solve it if possible.. Did you write your application? Are you using Quartz in your application? Are you starting new Threads in your app? When you have started and stopped the application a few times are there still multiple java processes running? p Thanks, Arvind S *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:00 PM, Pid p...@pidster.com wrote: S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true
Re: tomcat shutdown problem
Is the application completely unchanged for deployment on Tomcat 6? yes it is completely *unchanged*... is anything must be changed for quartz? --Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 5:06 PM, Pid p...@pidster.com wrote: Please do not keep using reply to all. It is annoying and unnecessary. I will obviously receive a copy of the mail if you just send a reply to the list. Did you write your application? there are team of 200 Engineers wrote that application so i dont know where the problem is Are you using Quartz in your application? yeah we have quartz scheduler in our application. But when we run in Tomcat 5 we dont have this kind of problem Is the application completely unchanged for deployment on Tomcat 6? When you shutdown, Quartz will log a message describing the number of running threads, this may help diagnose the problem. The count may be above 20, but that isn't necessarily a bad thing. Are you starting new Threads in your app? Might be, i have to ask each team. Check that they are being properly terminated. Even if the devs promise they are, double check. When you have started and stopped the application a few times are there still multiple java processes running? YES, this is the only thing assigned to me to correct it. You should ensure that the old processes are terminated before starting new ones, as an old one may hang onto one of the ports that Tomcat uses, thus preventing new instances from starting up. The Linux kill command can do this. However... After shutdown has been requested and while the process is still running, take a thread dump, or use the java tools to examine the state of the JVM. See if you can spot which Threads are still running. Try jmap, jstack and jconsole (if you're on a local machine). p *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:21 PM, Pid p...@pidster.com wrote: S Arvind wrote: Thanks pid... Can u able to give me more idea to solve it if possible.. Did you write your application? Are you using Quartz in your application? Are you starting new Threads in your app? When you have started and stopped the application a few times are there still multiple java processes running? p Thanks, Arvind S *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:00 PM, Pid p...@pidster.com wrote: S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18 -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18 -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp org.apache.catalina.startup.Bootstrap start [/code] So if i keep repeating the start and shutdown after few cycles it is completely refusing to start. What might be the source or reason of this problem? Advance Thanks, If you are leaving an active process behind when you stop the server, then doing it lots of times over isn't going to be healthy. Usually this is because your application has left non-daemon threads running that haven't been shutdown. It was was recently pointed out (on this list) that the Quartz job scheduler is often a culprit in this regard. If you have are starting threads yourself, then you need to make sure that you properly terminate them when the application (and server) shuts down. A ServletContextListener is useful in this regard. p Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail:
Re: tomcat shutdown problem
S Arvind wrote: Is the application completely unchanged for deployment on Tomcat 6? yes it is completely *unchanged*... is anything must be changed for quartz? okay, then your best bet is to explore what the JVM is doing after shutdown and check which threads are still running. p --Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 5:06 PM, Pid p...@pidster.com wrote: Please do not keep using reply to all. It is annoying and unnecessary. I will obviously receive a copy of the mail if you just send a reply to the list. Did you write your application? there are team of 200 Engineers wrote that application so i dont know where the problem is Are you using Quartz in your application? yeah we have quartz scheduler in our application. But when we run in Tomcat 5 we dont have this kind of problem Is the application completely unchanged for deployment on Tomcat 6? When you shutdown, Quartz will log a message describing the number of running threads, this may help diagnose the problem. The count may be above 20, but that isn't necessarily a bad thing. Are you starting new Threads in your app? Might be, i have to ask each team. Check that they are being properly terminated. Even if the devs promise they are, double check. When you have started and stopped the application a few times are there still multiple java processes running? YES, this is the only thing assigned to me to correct it. You should ensure that the old processes are terminated before starting new ones, as an old one may hang onto one of the ports that Tomcat uses, thus preventing new instances from starting up. The Linux kill command can do this. However... After shutdown has been requested and while the process is still running, take a thread dump, or use the java tools to examine the state of the JVM. See if you can spot which Threads are still running. Try jmap, jstack and jconsole (if you're on a local machine). p *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:21 PM, Pid p...@pidster.com wrote: S Arvind wrote: Thanks pid... Can u able to give me more idea to solve it if possible.. Did you write your application? Are you using Quartz in your application? Are you starting new Threads in your app? When you have started and stopped the application a few times are there still multiple java processes running? p Thanks, Arvind S *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:00 PM, Pid p...@pidster.com wrote: S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18 -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18 -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp org.apache.catalina.startup.Bootstrap start [/code] So if i keep repeating the start and shutdown after few cycles it is completely refusing to start. What might be the source or reason of this problem? Advance Thanks, If you are leaving an active process behind when you stop the server, then doing it lots of times over isn't going to be healthy. Usually this is because your application has left non-daemon threads running that haven't been shutdown. It was was recently pointed out (on this list) that the Quartz job scheduler is often a culprit in this regard. If you have are starting threads yourself, then you need to make sure that you properly terminate them when the application (and server) shuts down. A ServletContextListener is useful in this regard. p Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown problem
Did you write your application? there are team of 200 Engineers wrote that application so i dont know where the problem is One (or more) of them made a mistake, and has left a non-daemon thread running. You need to find out what thread is running. One way to do this is to get a thread dump. First, ask Tomcat to stop normally. When it doesn't stop, generate a thread dump. kill -QUIT java-pid will tell the JVM to print a thread dump to the console where the JVM was started - it will probably go into your tomcat/logs/catalina.out log file unless you have redirected it somewhere else in your configuration. Look at what non-daemon threads are running. Any non-daemon threads still running will need to be fixed by one of your 200 Engineers :) Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown problem
Pid very thanks for guiding me .. one more help alone... can u please tell me how to check which thread it is runnin by quartz other then checking code ... i am centos, jvm 5, tomcat 5 and tomcat 6.. i think i am disturbin u lot, but ... -Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* On Mon, Apr 27, 2009 at 7:18 PM, Pid p...@pidster.com wrote: S Arvind wrote: Is the application completely unchanged for deployment on Tomcat 6? yes it is completely *unchanged*... is anything must be changed for quartz? okay, then your best bet is to explore what the JVM is doing after shutdown and check which threads are still running. p --Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 5:06 PM, Pid p...@pidster.com wrote: Please do not keep using reply to all. It is annoying and unnecessary. I will obviously receive a copy of the mail if you just send a reply to the list. Did you write your application? there are team of 200 Engineers wrote that application so i dont know where the problem is Are you using Quartz in your application? yeah we have quartz scheduler in our application. But when we run in Tomcat 5 we dont have this kind of problem Is the application completely unchanged for deployment on Tomcat 6? When you shutdown, Quartz will log a message describing the number of running threads, this may help diagnose the problem. The count may be above 20, but that isn't necessarily a bad thing. Are you starting new Threads in your app? Might be, i have to ask each team. Check that they are being properly terminated. Even if the devs promise they are, double check. When you have started and stopped the application a few times are there still multiple java processes running? YES, this is the only thing assigned to me to correct it. You should ensure that the old processes are terminated before starting new ones, as an old one may hang onto one of the ports that Tomcat uses, thus preventing new instances from starting up. The Linux kill command can do this. However... After shutdown has been requested and while the process is still running, take a thread dump, or use the java tools to examine the state of the JVM. See if you can spot which Threads are still running. Try jmap, jstack and jconsole (if you're on a local machine). p *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:21 PM, Pid p...@pidster.com wrote: S Arvind wrote: Thanks pid... Can u able to give me more idea to solve it if possible.. Did you write your application? Are you using Quartz in your application? Are you starting new Threads in your app? When you have started and stopped the application a few times are there still multiple java processes running? p Thanks, Arvind S *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:00 PM, Pid p...@pidster.com wrote: S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18 -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18 -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp org.apache.catalina.startup.Bootstrap start [/code] So if i keep repeating the start and shutdown after few cycles it is completely refusing to start. What might be the source or reason of this problem? Advance Thanks, If you are leaving an active process behind when you stop the server, then doing it lots of times over isn't going to be healthy. Usually this is because your application has left non-daemon threads running that haven't been shutdown. It was was recently pointed out (on this list) that the Quartz job scheduler is often a culprit in this regard. If you have are starting threads
Re: tomcat shutdown problem
S Arvind wrote: Pid very thanks for guiding me .. one more help alone... can u please tell me how to check which thread it is runnin by quartz other then checking code ... i am centos, jvm 5, tomcat 5 and tomcat 6.. i think i am disturbin u lot, but ... As Dan said, kill -QUIT pid, and as I said previously, familiarise yourself with jstack, jmap and possibly jconsole, all of which are command line tools available with the Sun JREs. p -Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* On Mon, Apr 27, 2009 at 7:18 PM, Pid p...@pidster.com wrote: S Arvind wrote: Is the application completely unchanged for deployment on Tomcat 6? yes it is completely *unchanged*... is anything must be changed for quartz? okay, then your best bet is to explore what the JVM is doing after shutdown and check which threads are still running. p --Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 5:06 PM, Pid p...@pidster.com wrote: Please do not keep using reply to all. It is annoying and unnecessary. I will obviously receive a copy of the mail if you just send a reply to the list. Did you write your application? there are team of 200 Engineers wrote that application so i dont know where the problem is Are you using Quartz in your application? yeah we have quartz scheduler in our application. But when we run in Tomcat 5 we dont have this kind of problem Is the application completely unchanged for deployment on Tomcat 6? When you shutdown, Quartz will log a message describing the number of running threads, this may help diagnose the problem. The count may be above 20, but that isn't necessarily a bad thing. Are you starting new Threads in your app? Might be, i have to ask each team. Check that they are being properly terminated. Even if the devs promise they are, double check. When you have started and stopped the application a few times are there still multiple java processes running? YES, this is the only thing assigned to me to correct it. You should ensure that the old processes are terminated before starting new ones, as an old one may hang onto one of the ports that Tomcat uses, thus preventing new instances from starting up. The Linux kill command can do this. However... After shutdown has been requested and while the process is still running, take a thread dump, or use the java tools to examine the state of the JVM. See if you can spot which Threads are still running. Try jmap, jstack and jconsole (if you're on a local machine). p *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:21 PM, Pid p...@pidster.com wrote: S Arvind wrote: Thanks pid... Can u able to give me more idea to solve it if possible.. Did you write your application? Are you using Quartz in your application? Are you starting new Threads in your app? When you have started and stopped the application a few times are there still multiple java processes running? p Thanks, Arvind S *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:00 PM, Pid p...@pidster.com wrote: S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18 -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18 -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp org.apache.catalina.startup.Bootstrap start [/code] So if i keep repeating the start and shutdown after few cycles it is completely refusing to start. What might be the source or reason of this problem? Advance Thanks, If you are leaving an active process behind when you stop the server, then doing it lots of times over isn't going to be healthy. Usually this is because your application has left non-daemon threads running that haven't been shutdown. It was was recently pointed out (on this list) that the Quartz job
Re: tomcat shutdown problem
S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18 -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18 -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp org.apache.catalina.startup.Bootstrap start [/code] So if i keep repeating the start and shutdown after few cycles it is completely refusing to start. What might be the source or reason of this problem? Advance Thanks, If you are leaving an active process behind when you stop the server, then doing it lots of times over isn't going to be healthy. Usually this is because your application has left non-daemon threads running that haven't been shutdown. It was was recently pointed out (on this list) that the Quartz job scheduler is often a culprit in this regard. If you have are starting threads yourself, then you need to make sure that you properly terminate them when the application (and server) shuts down. A ServletContextListener is useful in this regard. p Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown problem
Thanks pid... Can u able to give me more idea to solve it if possible.. Thanks, Arvind S *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:00 PM, Pid p...@pidster.com wrote: S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18 -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18 -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp org.apache.catalina.startup.Bootstrap start [/code] So if i keep repeating the start and shutdown after few cycles it is completely refusing to start. What might be the source or reason of this problem? Advance Thanks, If you are leaving an active process behind when you stop the server, then doing it lots of times over isn't going to be healthy. Usually this is because your application has left non-daemon threads running that haven't been shutdown. It was was recently pointed out (on this list) that the Quartz job scheduler is often a culprit in this regard. If you have are starting threads yourself, then you need to make sure that you properly terminate them when the application (and server) shuts down. A ServletContextListener is useful in this regard. p Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown problem
S Arvind wrote: Thanks pid... Can u able to give me more idea to solve it if possible.. Did you write your application? Are you using Quartz in your application? Are you starting new Threads in your app? When you have started and stopped the application a few times are there still multiple java processes running? p Thanks, Arvind S *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:00 PM, Pid p...@pidster.com wrote: S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18 -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18 -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp org.apache.catalina.startup.Bootstrap start [/code] So if i keep repeating the start and shutdown after few cycles it is completely refusing to start. What might be the source or reason of this problem? Advance Thanks, If you are leaving an active process behind when you stop the server, then doing it lots of times over isn't going to be healthy. Usually this is because your application has left non-daemon threads running that haven't been shutdown. It was was recently pointed out (on this list) that the Quartz job scheduler is often a culprit in this regard. If you have are starting threads yourself, then you need to make sure that you properly terminate them when the application (and server) shuts down. A ServletContextListener is useful in this regard. p Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown problem
Did you write your application? there are team of 200 Engineers wrote that application so i dont know where the problem is Are you using Quartz in your application? yeah we have quartz scheduler in our application. But when we run in Tomcat 5 we dont have this kind of problem Are you starting new Threads in your app? Might be, i have to ask each team. When you have started and stopped the application a few times are there still multiple java processes running? YES, this is the only thing assigned to me to correct it. *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:21 PM, Pid p...@pidster.com wrote: S Arvind wrote: Thanks pid... Can u able to give me more idea to solve it if possible.. Did you write your application? Are you using Quartz in your application? Are you starting new Threads in your app? When you have started and stopped the application a few times are there still multiple java processes running? p Thanks, Arvind S *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:00 PM, Pid p...@pidster.com wrote: S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18 -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18 -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp org.apache.catalina.startup.Bootstrap start [/code] So if i keep repeating the start and shutdown after few cycles it is completely refusing to start. What might be the source or reason of this problem? Advance Thanks, If you are leaving an active process behind when you stop the server, then doing it lots of times over isn't going to be healthy. Usually this is because your application has left non-daemon threads running that haven't been shutdown. It was was recently pointed out (on this list) that the Quartz job scheduler is often a culprit in this regard. If you have are starting threads yourself, then you need to make sure that you properly terminate them when the application (and server) shuts down. A ServletContextListener is useful in this regard. p Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: tomcat shutdown problem
Please do not keep using reply to all. It is annoying and unnecessary. I will obviously receive a copy of the mail if you just send a reply to the list. Did you write your application? there are team of 200 Engineers wrote that application so i dont know where the problem is Are you using Quartz in your application? yeah we have quartz scheduler in our application. But when we run in Tomcat 5 we dont have this kind of problem Is the application completely unchanged for deployment on Tomcat 6? When you shutdown, Quartz will log a message describing the number of running threads, this may help diagnose the problem. The count may be above 20, but that isn't necessarily a bad thing. Are you starting new Threads in your app? Might be, i have to ask each team. Check that they are being properly terminated. Even if the devs promise they are, double check. When you have started and stopped the application a few times are there still multiple java processes running? YES, this is the only thing assigned to me to correct it. You should ensure that the old processes are terminated before starting new ones, as an old one may hang onto one of the ports that Tomcat uses, thus preventing new instances from starting up. The Linux kill command can do this. However... After shutdown has been requested and while the process is still running, take a thread dump, or use the java tools to examine the state of the JVM. See if you can spot which Threads are still running. Try jmap, jstack and jconsole (if you're on a local machine). p *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:21 PM, Pid p...@pidster.com wrote: S Arvind wrote: Thanks pid... Can u able to give me more idea to solve it if possible.. Did you write your application? Are you using Quartz in your application? Are you starting new Threads in your app? When you have started and stopped the application a few times are there still multiple java processes running? p Thanks, Arvind S *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:00 PM, Pid p...@pidster.com wrote: S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18 -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18 -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp org.apache.catalina.startup.Bootstrap start [/code] So if i keep repeating the start and shutdown after few cycles it is completely refusing to start. What might be the source or reason of this problem? Advance Thanks, If you are leaving an active process behind when you stop the server, then doing it lots of times over isn't going to be healthy. Usually this is because your application has left non-daemon threads running that haven't been shutdown. It was was recently pointed out (on this list) that the Quartz job scheduler is often a culprit in this regard. If you have are starting threads yourself, then you need to make sure that you properly terminate them when the application (and server) shuts down. A ServletContextListener is useful in this regard. p Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* - 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: tomcat shutdown problem
usually ps -ef will show you all active processes with PID(processID) PPID(parentProcessID) THR(NumThreads) PR(priortity) NAME More information is available from the brainiacs at University of Illinois http://www.math.uiuc.edu/~gfrancis/illimath/windows/aszgard_mini/bin/CommandTools/readme1.txt Martin Gainty I have not failed. I've just found 10,000 ways that won't work - Thomas Edison __ 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: arvindw...@gmail.com Date: Sat, 25 Apr 2009 14:07:25 +0530 Subject: Re: tomcat shutdown problem To: users@tomcat.apache.org; p...@pidster.com Thanks pid... Can u able to give me more idea to solve it if possible.. Thanks, Arvind S *Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison * On Sat, Apr 25, 2009 at 2:00 PM, Pid p...@pidster.com wrote: S Arvind wrote: A wierd problem occur while shutdowning the tomcat 6 in the Fedora and Centos. Usually i use shell file to shutdown. After shutting down when see the postgre preocess by [code]*ps -ef | grep java*[/code] it is still showing the process as running. such as [code] tomcat 14694 1 72 Apr23 ?23:44:25 /usr/java/jdk1.5.0_13/jre/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M -Xms1024M -Xmx1024M -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18 -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18 -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp org.apache.catalina.startup.Bootstrap start [/code] So if i keep repeating the start and shutdown after few cycles it is completely refusing to start. What might be the source or reason of this problem? Advance Thanks, If you are leaving an active process behind when you stop the server, then doing it lots of times over isn't going to be healthy. Usually this is because your application has left non-daemon threads running that haven't been shutdown. It was was recently pointed out (on this list) that the Quartz job scheduler is often a culprit in this regard. If you have are starting threads yourself, then you need to make sure that you properly terminate them when the application (and server) shuts down. A ServletContextListener is useful in this regard. p Arvind S * Many of lifes failure are people who did not realize how close they were to success when they gave up. -Thomas Edison* - 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: Tomcat Shutdown
AlexElba wrote: Hello, Are they any static variables that tomcat will set when user will try to shutdown tomcat? And how do you think a user would try to do that ? And just assuming the user would succeed in such an attempt, and Tomcat would shutdown, what good would it do if it set a static variable just before ? What was it ? have a beer and rethink your concept ? If you have further questions, can you also maybe specify on which kind of system you are, with what operating system, which Tomcat version, etc.. It may help answer more helpfully. (I also have this lingering doubt about the very wisdom of setting a static variable, but that may just be my lack of Java knowledge). - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Shutdown
From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Tomcat Shutdown (I also have this lingering doubt about the very wisdom of setting a static variable, but that may just be my lack of Java knowledge). No lingering needed; the very concept smacks of bad C programming... highly inappropriate for an app server environment. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Shutdown
So how to ping to application so that tomcat is going to be shutdown? --- On Tue, 3/10/09, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R chuck.caldar...@unisys.com Subject: RE: Tomcat Shutdown To: Tomcat Users List users@tomcat.apache.org Date: Tuesday, March 10, 2009, 6:05 PM From: André Warnier [mailto:a...@ice-sa.com] Subject: Re: Tomcat Shutdown (I also have this lingering doubt about the very wisdom of setting a static variable, but that may just be my lack of Java knowledge). No lingering needed; the very concept smacks of bad C programming... highly inappropriate for an app server environment. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat Shutdown
From: Aleksandr Elbakyan [mailto:ramal...@yahoo.com] Subject: RE: Tomcat Shutdown So how to ping to application so that tomcat is going to be shutdown? I'm not sure I understand your question. When Tomcat receives a shutdown request (message on the shutdown port, ctrl-c on Windows, or kill SIGTERM on Linux), it stops each of the deployed applications running inside it. Each such application may declare a ServletContextListener that will be called during the shutdown sequence to do whatever cleanup the application needs, such as terminating threads it has started. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Shutdown
Dear Aleksandr, So how to ping to application so that tomcat is going to be shutdown? http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContextListener.html Register it in web.xml -- Kees Jan http://java-monitor.com/forum/ kjkos...@kjkoster.org 06-51838192 The secret of success lies in the stability of the goal. -- Benjamin Disraeli - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown script initiates Heap dump collection
Hi Andre I could not execute the following in my production server echo catalina.sh : JAVA_OPTS = $JAVA_OPTS /var/log/tomcat_debug_file.log Here is how I start the tomcat services /opt/app/tomcat/public1/bin/startup.sh I was checking all the file the startup.sh uses startup.sh includes catalina.sh catalina.sh includes setenv.sh and setclasspath.sh However, I dont see any JAVA_OPTS parameter defined. I believe, this is a optional parameter and it is not defined in our environment. your views ? Could you please let me know the relation between JAVA_OPTS and the heap dump collection? Thanks -- View this message in context: http://www.nabble.com/Tomcat-shutdown-script-initiates-Heap-dump-collection-tp21421003p21612325.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat shutdown script initiates Heap dump collection
Hi Chuck In catalina.sh file, I could see that JAVA_OPTS and CATALINA_OPTS are being referenced as follows.. exec $_RUNJDB $JAVA_OPTS $CATALINA_OPTS \... However, the value for JAVA_OPTS is not defined in catalina.sh As I had already mentioned, ONLY CATALINA_OPTS are defined in setenv.sh CATALINA_OPTS='-Xms512M -Xmx1536M' Where can I find the values configured for JAVA_OPTS ? Please guide. Thanks Prakash -- View this message in context: http://www.nabble.com/Tomcat-shutdown-script-initiates-Heap-dump-collection-tp21421003p21463786.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat shutdown script initiates Heap dump collection
Prakash Nathan1 wrote: Hi Chuck In catalina.sh file, I could see that JAVA_OPTS and CATALINA_OPTS are being referenced as follows.. exec $_RUNJDB $JAVA_OPTS $CATALINA_OPTS \... However, the value for JAVA_OPTS is not defined in catalina.sh As I had already mentioned, ONLY CATALINA_OPTS are defined in setenv.sh CATALINA_OPTS='-Xms512M -Xmx1536M' Where can I find the values configured for JAVA_OPTS ? The quickie answer is to add a line echo catalina.sh : JAVA_OPTS = $JAVA_OPTS /var/log/tomcat_debug_file.log to the beginning of your catalina.sh, and see what comes out. The better answer : To start Tomcat, you must use a command like /etc/init.d/tomcatxx start yes ? If so, then look first at that script, and follow the chain of scripts that itself calls. Depending on the system you are using, there may be other files that are read in during startup and which define options such as JAVA_OPTS. Under Linux e.g., look in the /etc/default dir. The thing is, there are so many different platform flavors and setups and ways to start these things, that there is no easy answer. You will have to piece the puzzle together yourself. On my Linux Debian systems, the chain is roughly as follows : /etc/init.d/tomcat5.5 does some stuff, then reads /etc/default/tomcat5.5, then does some more stuff, then calls up /usr/share/tomcat5.5/bin/startup.sh, which itself calls /usr/share/tomcat5.5/bin/catalina.sh, which itself runs /usr/share/tomcat5.5/bin/setenv.sh. And there are probably bits I'm forgetting.. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat shutdown script initiates Heap dump collection
Thanks Chuck Here are the environment details Apache Tomcat/4.1.27 JVM/JDK: 1.4.2_06 Platform: OS Red Hat Enterprise Linux AS release 3 (Taroon Update 5) Where Can I get the JVM setting configured for running Tomcat? Are you refering to setenv.sh ? CATALINA_OPTS='-Xms512M -Xmx1536M Please let me know. Thanks -- View this message in context: http://www.nabble.com/Tomcat-shutdown-script-initiates-Heap-dump-collection-tp21421003p21444591.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat shutdown script initiates Heap dump collection
From: Prakash Nathan1 [mailto:mrap...@yahoo.com] Subject: RE: Tomcat shutdown script initiates Heap dump collection Where Can I get the JVM setting configured for running Tomcat? Are you refering to setenv.sh ? CATALINA_OPTS='-Xms512M -Xmx1536M That is one variable you can use; the other is JAVA_OPTS. (I hope the mix of single and double quotes above is just a typo.) Some of the 3rd-party distributions of Tomcat add their own JVM options to be helpful, and you may have run into that. If you were running with a more recent JVM, you could use JConsole to see what the command line arguments are. (I'm trying to forget everything I knew about the 1.4 JDK.) - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat shutdown script initiates Heap dump collection
From: Prakash Nathan1 [mailto:mrap...@yahoo.com] Subject: Tomcat shutdown script initiates Heap dump collection Things you didn't bother to tell us: 1) Tomcat version you're using. 2) JRE/JDK version you're using. 3) Platform you're running on. Would you like us to guess? Heap Dumps are collected in catalina.out log file. 1. Is this a normal behavior ? No. Will it have any impacts on performance ? The heap dump at termination won't, but since this is going on, other more noticeable things might be configured to happen as well. 2. Could you please let us know the configuration which triggers the heap dump collection ? Nothing in Tomcat. What JVM command line parameters do you have set for running Tomcat? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat ./shutdown
Dear Thinh, I use apache-tomcat-5.5.17 and sometimes when I call ./shutdown.sh, the java process which runs Tomcat still alive. Because this java process is still alive, the next call ./startup.sh does not work. Thus, I have to kill this Java process first. Could you please give me a hint how I avoid this problem? Here is some discussion on your issue: http://java-monitor.com/forum/showthread.php?t=83 Basically, kill -3 Tomcat as it hangs after you tried to shut it down. Then solve the problem that causes your Tomcat to hang. -- Kees Jan http://java-monitor.com/forum/ kjkos...@kjkoster.org 06-51838192 The secret of success lies in the stability of the goal. -- Benjamin Disraeli - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat ./shutdown
On 7Jan, 2009, at 16:11, l...@informatik.uni-hamburg.de wrote: Hello, I use apache-tomcat-5.5.17 and sometimes when I call ./shutdown.sh, the java process which runs Tomcat still alive. Because this java process is still alive, the next call ./startup.sh does not work. Thus, I have to kill this Java process first. Could you please give me a hint how I avoid this problem? I'm actually having trouble with this as well. It does look, however, like the tomcat process dies after a while in my case. But using restart (stop immediately followed by start) does not work though. Is it possible to stop tomcat synchronously such that the stop invocation does not return before tomcat is entirely show down? -dennis -- Geysir IT d...@geysirit.dk http://geysirit.dk +45 31 51 60 00 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat ./shutdown
From: l...@informatik.uni-hamburg.de [mailto:l...@informatik.uni-hamburg.de] Subject: Tomcat ./shutdown I use apache-tomcat-5.5.17 and sometimes when I call ./shutdown.sh, the java process which runs Tomcat still alive. The usual cause of this is non-daemon threads improperly managed by a webapp. If such threads do exist, the JVM will not terminate until those threads do. Try using JConsole or jstack to examine the JVM instance when the shutdown fails to see what the remaining threads are doing. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat ./shutdown
Sometime there's an even more simple solution to it: Some applications just take ages when they're shut down. Very nice example for this is Apache Roller. Shutting down Tomcat without Roller goes instantly, shutting down Tomcat with Roller takes up to 5 minutes. So what happens if you shut down Tomcat *before* having your lunchbreak - is it still alive when you return? That's a serious question Except from that: Any hints in the logs? Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat Shutdown Port as Variable
[EMAIL PROTECTED] wrote: Hi All - I have quite a few installs of Tomcat on the same server (same CATALINA_HOME, different CATALINA_BASE), and I am interested in making my configs a little more portable. I'm trying to make certain unique items in my server.xml variable ( ${variablename} ), being pulled from my CATALINA_OPTS as parameters (-D...). Everything works great, however, the shutdown port seems to be an issue. Since catalina.sh does not utilize CATALINA_OPTS for the stop command, it does not process my parameter (-Dtc.shutdown.port=) and therefore will not attempt to shutdown the correct port. Is there any good way to achieve this to keep my server.xml modular without hacking apart the standard scripts that come with tomcat? Adding it to JAVA_OPTS instead? Regards, Rainer - 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: Tomcat Shutdown Port as Variable
a shame that you cant specify that attribute via %JAVA_OPTS% maybe look at writing a set_8005 script which writes that specific_port to %TOMCAT_HOME%/conf/server.xml should be fine as long as you execute the script before starting TC .. any other suggestions? Martin Gainty __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. To: users@tomcat.apache.org Subject: Tomcat Shutdown Port as Variable From: [EMAIL PROTECTED] Date: Wed, 15 Oct 2008 09:42:51 -0400 Hi All - I have quite a few installs of Tomcat on the same server (same CATALINA_HOME, different CATALINA_BASE), and I am interested in making my configs a little more portable. I'm trying to make certain unique items in my server.xml variable ( ${variablename} ), being pulled from my CATALINA_OPTS as parameters (-D...). Everything works great, however, the shutdown port seems to be an issue. Since catalina.sh does not utilize CATALINA_OPTS for the stop command, it does not process my parameter (-Dtc.shutdown.port=) and therefore will not attempt to shutdown the correct port. Is there any good way to achieve this to keep my server.xml modular without hacking apart the standard scripts that come with tomcat? for reference, TC version 6.0.18 Thanks, Al _ Stay up to date on your PC, the Web, and your mobile phone with Windows Live. http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
RE: Tomcat Shutdown Port as Variable
From: Martin Gainty [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat Shutdown Port as Variable a shame that you cant specify that attribute via %JAVA_OPTS% As Rainer already pointed out, you can; the shutdown script does not use CATALINA_OPTS, but it does honor JAVA_OPTS. - 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]
Re: Tomcat Shutdown Port as Variable
I have quite a few installs of Tomcat on the same server (same CATALINA_HOME, different CATALINA_BASE), and I am interested in making my configs a little more portable. I'm trying to make certain unique items in my server.xml variable ( ${variablename} ), being pulled from my CATALINA_OPTS as parameters (-D...). Everything works great, however, the shutdown port seems to be an issue. Since catalina.sh does not utilize CATALINA_OPTS for the stop command, it does not process my parameter (-Dtc.shutdown.port=) and therefore will not attempt to shutdown the correct port. Is there any good way to achieve this to keep my server.xml modular without hacking apart the standard scripts that come with tomcat? Adding it to JAVA_OPTS instead? That works as expected. Thank you very much! Al
Re: Tomcat shutdown event
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 To whom it may concern, Tom Cat wrote: I have a servelet spawn a thread that should run until tomcat is shutdown. The problem is, when Tomcat is shut down, the thread keeps running. You need to define your thread as a daemon thread and it won't stop the JVM from shutting down. Don't worry about all this Tomcat lifecycle and servlet init/destroy stuff from the other responses. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjQItIACgkQ9CaO5/Lv0PA2wgCfd7Z/9/pbC/zdb9LmludWZosP LQEAniHg9oFR1KwC11w5w1XcRV2JMs49 =tB3N -END PGP SIGNATURE- - 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: Tomcat shutdown event
- Original Message - From: Tom Cat [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Saturday, September 13, 2008 1:13 AM Subject: Tomcat shutdown event Hello, I have a servelet spawn a thread that should run until tomcat is shutdown. The problem is, when Tomcat is shut down, the thread keeps running. Does Tomcat have a shutdown event that I could use to trigger the thread destruction? If not, is there any graceful way of handling this? Thanks A servlet has two overrides that you may find useful... init destroy One is called at the very beginning of life and one at the end... If the thread is active, one could poll a mustIContinue flag... and if Destroy set that false the thread falls thru. after cleaning up... Killing threads is not a thing to do ever... idea should be for the service to clean up and end itself. If its a waiting thread... then you also have to wake it up so it can get out... Alot to do with design... On some systems...a third party engine, like an indexer can take a long time to finish and dont expose any controls, like interrupt me now engines like that are a problem I havent experienced any problems with letting a service thread run after tomcat, in my case it is indexing engines that may run for 2 or 3 mins after tc has said goodbye... thats ok... but it depends on what you doing If your service should be ending... its a batch... and the batch is actually completing... but TC is cleaning up nicely... thats a bug, refs holding somewhere... you got to find em ;) Anyway dont bang it closed... --- HARBOR : http://www.kewlstuff.co.za/index.htm The most powerful application server on earth. The only real POJO Application Server. See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm --- - 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: Tomcat shutdown event
2008/9/13 Tom Cat [EMAIL PROTECTED]: I have a servlet spawn a thread that should run until tomcat is shutdown. The problem is, when Tomcat is shut down, the thread keeps running. Does Tomcat have a shutdown event that I could use to trigger the thread destruction? If not, is there any graceful way of handling this? You may implement a o.a.c.LifecycleListener see http://tomcat.apache.org/tomcat-6.0-doc/config/context.html Also, the Servlet spec provides the ServletContextListener interface. Also, Java has support for JVM shutdown hooks. Also, if you start your own thread you may want to call Thread.setDaemon(true), because non-demon (default) threads prevent JVM from shutdown. Best regards, Konstantin Kolinko - 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: Tomcat Shutdown error transport error 202: bind failed
I tired not giving $JPDA_OPTS to CATALINA_OPTS, but after that debugging wasnt hapenning at all. Caldarale, Charles R wrote: From: varunsuresh [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat Shutdown error transport error 202: bind failed export CATALINA_OPTS=$CATALINA_OPTS $JPDA_OPTS The above is wrong. By appending JPDA_OPTS to CATALINA_OPTS, you end up with the JPDA settings twice on the command line. Just take out the above line. - 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] -- View this message in context: http://www.nabble.com/Tomcat-Shutdown-error-transport-error-202%3A-bind-failed-tp14737139p14912916.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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: Tomcat Shutdown error transport error 202: bind failed
From: varunsuresh [mailto:[EMAIL PROTECTED] Subject: Re: Tomcat Shutdown error transport error 202: bind failed export CATALINA_OPTS=$CATALINA_OPTS $JPDA_OPTS The above is wrong. By appending JPDA_OPTS to CATALINA_OPTS, you end up with the JPDA settings twice on the command line. Just take out the above line. - 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]
Re: Tomcat Shutdown error transport error 202: bind failed
markt-2 wrote: varunsuresh wrote: These are my debug options -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=,server=y,suspend=n How are you setting these? Using JPDA_TRANSPORT etc works for me. Mark This is how i set them export JPDA_TRANSPORT=dt_socket export JPDA_ADDRESS= export JPDA_SUSPEND=n export JPDA_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND export CATALINA_OPTS=$CATALINA_OPTS $JPDA_OPTS -- View this message in context: http://www.nabble.com/Tomcat-Shutdown-error-transport-error-202%3A-bind-failed-tp14737139p14753922.html Sent from the Tomcat - User mailing list archive at Nabble.com. - 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: Tomcat Shutdown error transport error 202: bind failed
varunsuresh wrote: These are my debug options -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=,server=y,suspend=n How are you setting these? Using JPDA_TRANSPORT etc works for me. Mark - 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: Tomcat Shutdown Unexpectedly
Dan, Have you found a solution to this problem? Thanks, Sep. -- View this message in context: http://www.nabble.com/Tomcat-Shutdown-Unexpectedly-t1598450.html#a4416594 Sent from the Tomcat - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]