RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
By any chance, is there a case mismatch - is your webapp properly deployed in [appBase]/Spc.xml or perhaps incorrectly in [appBase]/spc.xml? I'm not sure I understand this question. The Spc.war file is copied to ${CATALINA_HOME}/webapps and Tomcat deploys it to ${CATALINA_HOME}/webapps/Spc. There is no other Spc.xml file except the one in ${CATALINA_HOME}/conf/Catalina/localhost. Is there supposed to be another Spc.xml file in the deployment? Can you post your entire server.xml? My server.xml (it should be the distribution copy with SSL and access log enabled): By the way, I appreciate your help and time, but I would surely understand if you let this go - no one else where I work has this problem and it doesn't seem to be endemic in the wider population of Tomcat users. Any way, thanks again. 8-- --- ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- Note: A Server is not itself a Container, so you may not define subcomponents such as Valves at this level. Documentation at /docs/config/server.html -- Server port=8005 shutdown=SHUTDOWN !--APR library loader. Documentation at /docs/apr.html -- Listener className=org.apache.catalina.core.AprLifecycleListener SSLEngine=on / !--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 name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources !-- 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 !--The connectors can use a shared executor, you can define one or more named thread pools-- !-- Executor name=tomcatThreadPool namePrefix=catalina-exec- maxThreads=150 minSpareThreads=4/ -- !-- A Connector represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 -- 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=8443 / -- !-- 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 SSLEnabled=true maxThreads=150 scheme=https secure=true clientAuth=false sslProtocol=TLS / !-- Define an AJP 1.3 Connector on port 8009 -- Connector port=8009 protocol=AJP/1.3 redirectPort=8443 / !-- 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
RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
From: Law, Christopher [mailto:chris@snapon.com] Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) By any chance, is there a case mismatch - is your webapp properly deployed in [appBase]/Spc.xml or perhaps incorrectly in [appBase]/spc.xml? Sorry - shouldn't have been responding when it was so late after a really, really long day. The above should have been referring to Spc.war and spc.war, not any .xml files. Just looking for possible casing issues, since Java and Tomcat are case-sensitive, whereas Windows is not. My server.xml (it should be the distribution copy with SSL and access log enabled): That all looks fine. - 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 hangs for minutes between ContextConfig and StandardContext (Starting the app)
Well, I guess I was wrong. The delay is still there. I installed a new copy of Tomcat and still have the same problem. I have the following context files: ${CATALINA_HOME}/conf/context.xml Which contains (comments removed): Context WatchedResourceWEB-INF/web.xml/WatchedResource Manager pathname= / /Context ${CATALINA_HOME}/conf/Catalina/localhost/Spc.xml Context antiJARLocking=true antiResourceLocking=true Manager pathname= / /Context I uncommented the Manager element because I don't want to persist sessions between startups. I am still getting the four minute delay. The tomcat log messages show (similar to before): 2009-10-12 18:06:13,973 DEBUG main org.apache.catalina.startup.ContextConfig - Successfully processed context [/Spc] configuration file E:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null 2009-10-12 18:10:12,987 DEBUG main org.apache.catalina.core.StandardContext - Starting /Spc I notice that the null is still being displayed, which, according to an earlier reply indicated the file has no recognizable content. Can you tell me what I'm doing wrong? Thank you for any help. -Original Message- From: Law, Christopher [mailto:chris@snapon.com] Sent: Saturday, October 10, 2009 10:02 AM To: Tomcat Users List Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) Yup, guess I missed the keyword Attributes in the doc. Anyway, I added the attributes and it has significantly improved the deploy and startup. There are minor delays as indicated in the Tomcat doc, but these are delays of seconds - much better than four minutes! Thank you! -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, October 09, 2009 8:40 PM To: Tomcat Users List Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) From: Law, Christopher [mailto:chris@snapon.com] Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) The Tomcat logs show: 2009-10-09 16:03:11,093 DEBUG main org.apache.catalina.startup.ContextConfig - Successfully processed context [/Spc] configuration file D:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null The null says your Spc.xml file had no recognizable content; looks like you have it formatted incorrectly. It should look like this: Context antiJARLocking=true antiResourceLocking=true / - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
From: Law, Christopher [mailto:chris@snapon.com] Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) ${CATALINA_HOME}/conf/context.xml Which contains (comments removed): Context WatchedResourceWEB-INF/web.xml/WatchedResource Manager pathname= / /Context That looks o.k. ${CATALINA_HOME}/conf/Catalina/localhost/Spc.xml Context antiJARLocking=true antiResourceLocking=true Manager pathname= / /Context The additional Manager element isn't needed (but it won't hurt); the global one will suffice. 2009-10-12 18:06:13,973 DEBUG main org.apache.catalina.startup.ContextConfig - Successfully processed context [/Spc] configuration file E:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null I notice that the null is still being displayed, which, according to an earlier reply indicated the file has no recognizable content. Having now looked through the code, I think I was mistaken. Looks like there's a normal path that will produce that message even when a valid Context element is present. Can you tell me what I'm doing wrong? At this point, I'm reduced to guessing. By any chance, is there a case mismatch - is your webapp properly deployed in [appBase]/Spc.xml or perhaps incorrectly in [appBase]/spc.xml? Can you post your entire server.xml? (Grasping for straws here.) - 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 hangs for minutes between ContextConfig and StandardContext (Starting the app)
Yup, guess I missed the keyword Attributes in the doc. Anyway, I added the attributes and it has significantly improved the deploy and startup. There are minor delays as indicated in the Tomcat doc, but these are delays of seconds - much better than four minutes! Thank you! -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Friday, October 09, 2009 8:40 PM To: Tomcat Users List Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) From: Law, Christopher [mailto:chris@snapon.com] Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) The Tomcat logs show: 2009-10-09 16:03:11,093 DEBUG main org.apache.catalina.startup.ContextConfig - Successfully processed context [/Spc] configuration file D:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null The null says your Spc.xml file had no recognizable content; looks like you have it formatted incorrectly. It should look like this: Context antiJARLocking=true antiResourceLocking=true / - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
Well, I created a context file named for my app (Spc.xml) and placed it in ${CATALINA_HOME}/conf/Catalina/localhost/. I set the two entries: antiJARLockingtrue/antiJARLocking antiResourceLockingtrue/antiResourceLocking The Tomcat logs show: 2009-10-09 16:03:11,093 DEBUG main org.apache.catalina.startup.ContextConfig - Successfully processed context [/Spc] configuration file D:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null [Almost a four minute delay] 2009-10-09 16:07:04,984 DEBUG main org.apache.catalina.core.StandardContext - Starting /Spc and the thread dumps still show a similar state, with the: at java.io.FileOutputStream.close0(Native Method) at the top of the main thread. -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Wednesday, October 07, 2009 5:46 PM To: Tomcat Users List Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) From: Law, Christopher [mailto:chris@snapon.com] Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) I'm afraid I don't know what a blocking entropy is. /dev/random is the system-provided random byte stream for UNIX/Linux and some other platforms. In order to generate a reasonably random sequence, it needs sources of randomness, such as keyboard interrupts, mouse movements, radioactive decay; than randomness is termed entropy, and until there's enough of it, the stream will block when requests are made to it. main prio=6 tid=0x002a7000 nid=0xd5c runnable [0x0090f000..0x0090fe54] java.lang.Thread.State: RUNNABLE at java.io.FileOutputStream.close0(Native Method) at java.io.FileOutputStream.close(FileOutputStream.java:279) at java.io.FilterOutputStream.close(FilterOutputStream.java:143) The above is the interesting one: it's stuck in close(), waiting for something in the underlying file system. Since you're on Windows, you may need to set the antiJARLocking and antiResourceLocking attributes in the Context element for your webapp. http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
From: Law, Christopher [mailto:chris@snapon.com] Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) The Tomcat logs show: 2009-10-09 16:03:11,093 DEBUG main org.apache.catalina.startup.ContextConfig - Successfully processed context [/Spc] configuration file D:\apache-tomcat-6.0.18\conf\Catalina\localhost\Spc.xml null The null says your Spc.xml file had no recognizable content; looks like you have it formatted incorrectly. It should look like this: Context antiJARLocking=true antiResourceLocking=true / - 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 hangs for minutes between ContextConfig and StandardContext (Starting the app)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rainer, On 10/6/2009 2:00 PM, Rainer Jung wrote: On 06.10.2009 17:41, Christopher Schultz wrote: Another possibility is that SecureRandom is taking forever to initialize: if your JVM is configured to use a blocking source of entropy, that may be the problem. This often happens in *NIX environments, but it appears that you are running on Microsoft Windows, so that's unlikely to be the problem. ... and should only be a problem if SSL is involved. Doesn't Tomcat use SecureRandom for session id generation, at least under certain configurations? This would trip over a blocking entropy source regardless of SSL configuration, right? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrNBQMACgkQ9CaO5/Lv0PC5igCgjVbDsu74+cKSGW4geTCezF9r fE0An2X4LgJg8/jpkSV+Vgn+yjqdTpF/ =+3Ms -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
I appreciate your responses, but I'm afraid I don't know what a blocking entropy is. Also, I don't appear to have any issues in resolving or referencing DTDs during building. I had posted another email indicating some more behavior, basically that the delay occurs only when a new WAR file is deployed. If the WAR file doesn't change, I can re-deploy it without any delays. In addition, I grabbed some thread dumps during the delay. But I don't know enough to know what to look for. I compared two of the thread dumps taken one-minute apart. The only two differences in the files are the timestamp at the top and the JNI global references count at the bottom (the earlier dump showed 921, the later, 959). Here is the earlier thread dump. Again, any help is greatly appreciated: ---8--- -- 2009-10-06 19:44:47 Full thread dump Java HotSpot(TM) Client VM (11.2-b01 mixed mode, sharing): Low Memory Detector daemon prio=6 tid=0x02c41800 nid=0xae0 runnable [0x..0x] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None CompilerThread0 daemon prio=10 tid=0x02c3bc00 nid=0x490 waiting on condition [0x..0x02eef9bc] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None Attach Listener daemon prio=10 tid=0x02c3a400 nid=0xd2c waiting on condition [0x..0x] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None Signal Dispatcher daemon prio=10 tid=0x02c39000 nid=0xc18 runnable [0x..0x] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None Finalizer daemon prio=8 tid=0x02c30c00 nid=0x99c in Object.wait() [0x02dff000..0x02dffa94] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x088f0288 (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116) - locked 0x088f0288 (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) Locked ownable synchronizers: - None Reference Handler daemon prio=10 tid=0x02c2f800 nid=0x9ec in Object.wait() [0x02daf000..0x02dafb14] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x088f0310 (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:485) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116) - locked 0x088f0310 (a java.lang.ref.Reference$Lock) Locked ownable synchronizers: - None main prio=6 tid=0x002a7000 nid=0xd5c runnable [0x0090f000..0x0090fe54] java.lang.Thread.State: RUNNABLE at java.io.FileOutputStream.close0(Native Method) at java.io.FileOutputStream.close(FileOutputStream.java:279) at java.io.FilterOutputStream.close(FilterOutputStream.java:143) at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:324) at org.apache.catalina.startup.ExpandWar.expand(ExpandWar.java:158) at org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java: 883) at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:1012) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.j ava:279) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:117) at org.apache.catalina.core.StandardContext.init(StandardContext.java:5338) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4086 ) - locked 0x088f0710 (a org.apache.catalina.core.StandardContext) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja va:791) - locked 0x088f08a0 (a java.util.HashMap) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31 1) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) - locked 0x088f0500 (a org.apache.catalina.core.StandardHost) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) - locked 0x088f0500 (a
RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
From: Law, Christopher [mailto:chris@snapon.com] Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) I'm afraid I don't know what a blocking entropy is. /dev/random is the system-provided random byte stream for UNIX/Linux and some other platforms. In order to generate a reasonably random sequence, it needs sources of randomness, such as keyboard interrupts, mouse movements, radioactive decay; than randomness is termed entropy, and until there's enough of it, the stream will block when requests are made to it. main prio=6 tid=0x002a7000 nid=0xd5c runnable [0x0090f000..0x0090fe54] java.lang.Thread.State: RUNNABLE at java.io.FileOutputStream.close0(Native Method) at java.io.FileOutputStream.close(FileOutputStream.java:279) at java.io.FilterOutputStream.close(FilterOutputStream.java:143) The above is the interesting one: it's stuck in close(), waiting for something in the underlying file system. Since you're on Windows, you may need to set the antiJARLocking and antiResourceLocking attributes in the Context element for your webapp. http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
Thanks, Chuck, I'll take a look into this. Appreciate it. Chris -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Wednesday, October 07, 2009 5:46 PM To: Tomcat Users List Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) From: Law, Christopher [mailto:chris@snapon.com] Subject: RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) I'm afraid I don't know what a blocking entropy is. /dev/random is the system-provided random byte stream for UNIX/Linux and some other platforms. In order to generate a reasonably random sequence, it needs sources of randomness, such as keyboard interrupts, mouse movements, radioactive decay; than randomness is termed entropy, and until there's enough of it, the stream will block when requests are made to it. main prio=6 tid=0x002a7000 nid=0xd5c runnable [0x0090f000..0x0090fe54] java.lang.Thread.State: RUNNABLE at java.io.FileOutputStream.close0(Native Method) at java.io.FileOutputStream.close(FileOutputStream.java:279) at java.io.FilterOutputStream.close(FilterOutputStream.java:143) The above is the interesting one: it's stuck in close(), waiting for something in the underlying file system. Since you're on Windows, you may need to set the antiJARLocking and antiResourceLocking attributes in the Context element for your webapp. http://tomcat.apache.org/tomcat-6.0-doc/config/context.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
From: Law, Christopher [mailto:chris@snapon.com] Subject: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) It almost seems like Tomcat is blocked waiting for a reply from some request. Quite possible. Could be DNS resolution, or references in .xml files to external DTDs, among others. You might want to run Wireshark while Tomcat is starting and just see what requests are being made. Also, try taking a thread dump or three during the delay and see what's going on inside Tomcat. There is no context file in conf or conf/Catalina/localhost. So you removed the standard conf/context.xml file that's distributed with Tomcat? Are there any remote (CIFS/SMB) file references involved? - 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 hangs for minutes between ContextConfig and StandardContext (Starting the app)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Christopher, On 10/6/2009 10:50 AM, Law, Christopher wrote: Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP professional. I have a problem that occurs during startup deploying a WAR file. Tomcat deploys the WAR file but then there is a delay of minutes before it tries to start the application. During the delay, there is no CPU usage and there is no abnormal activity that I can detect. When Tomcat decides to start the application, it fires right up. It almost seems like Tomcat is blocked waiting for a reply from some request. It might be. Can you take a thread dump during this delay to see what is happening? http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F My guess is that you are using XML validation and you have a firewall that is preventing the JVM from contacting a remote server to fetch a DTD. Another possibility is that SecureRandom is taking forever to initialize: if your JVM is configured to use a blocking source of entropy, that may be the problem. This often happens in *NIX environments, but it appears that you are running on Microsoft Windows, so that's unlikely to be the problem. Any more information you can provide will certainly be helpful. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrLZSQACgkQ9CaO5/Lv0PBTXgCfeVocP4clX5dBblkIKaBwrHkG rHAAn1klDppfjMEU+vA4wDQQqLsNryJP =Sfu+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
Does the app perform normally when it does start up? I recently experienced this when I inadvertently placed the same jar in two places - the app displayed other errors when it finally loaded. p -- On 6 Oct 2009, at 15:52, Law, Christopher chris@snapon.com wrote: Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP professional. I have a problem that occurs during startup deploying a WAR file. Tomcat deploys the WAR file but then there is a delay of minutes before it tries to start the application. During the delay, there is no CPU usage and there is no abnormal activity that I can detect. When Tomcat decides to start the application, it fires right up. It almost seems like Tomcat is blocked waiting for a reply from some request. My typical workflow consists of the following: Open a command shell. Edit code Build WAR Remove ${CATALINA_HOME}/webapps/* Remove ${CATALINA_HOME}/work/Catalina/localhost Remove ${CATALINA_HOME}/logs/* Copy the WAR file to ${CATALINA_HOME}/webapps From the command shell: startup Test application From the command shell: shutdown repeat I set the log level for Tomcat to debug and this is the output, early on: 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.HostConfig - Watching WatchedResource 'D:\apache-tomcat-6.0.18\conf\web.xml' 2009-10-04 16:04:23,327 INFO main org.apache.catalina.startup.HostConfig - Deploying web application archive Spc.war 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.core.ContainerBase - Add child StandardContext[/Spc] StandardEngine[Catalina].StandardHost [localhost] 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.ContextConfig - ContextConfig: Initializing 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.ContextConfig - Processing context [/Spc] configuration file D:\apache-tomcat-6.0.18 conf/context.xml 2009-10-04 16:04:23,327 DEBUG main org.apache.catalina.startup.ContextConfig - Processing context [/Spc] configuration file D:\apache-tomcat-6.0.18\conf Catalina/localhost/context.xml.default [ This is almost a 4 minute delay ] 2009-10-04 16:08:19,481 DEBUG main org.apache.catalina.core.StandardContext - Starting /Spc 2009-10-04 16:08:19,481 DEBUG main org.apache.catalina.core.StandardContext - Registering j2eeType=WebModule,name=//localhost/ Spc,J2EEApplication=none,J2EEServe r=none for null I'm at a loss since I startup and shutdown Tomcat during each iteration. There is no context file in conf or conf/Catalina/localhost. I don't delete to the RecycleBin. If anyone can tell me what I'm doing wrong or what may be causing the delay, I'd appreciate it. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
On 06.10.2009 17:41, Christopher Schultz wrote: Christopher, On 10/6/2009 10:50 AM, Law, Christopher wrote: Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP professional. I have a problem that occurs during startup deploying a WAR file. Tomcat deploys the WAR file but then there is a delay of minutes before it tries to start the application. During the delay, there is no CPU usage and there is no abnormal activity that I can detect. When Tomcat decides to start the application, it fires right up. It almost seems like Tomcat is blocked waiting for a reply from some request. It might be. Can you take a thread dump during this delay to see what is happening? http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F +1 My guess is that you are using XML validation and you have a firewall that is preventing the JVM from contacting a remote server to fetch a DTD. You can also google for xml entity resolution. Another possibility is that SecureRandom is taking forever to initialize: if your JVM is configured to use a blocking source of entropy, that may be the problem. This often happens in *NIX environments, but it appears that you are running on Microsoft Windows, so that's unlikely to be the problem. ... and should only be a problem if SSL is involved. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app)
Thanks for the reply. A little more information: 1. The app always works after it starts up (assuming I didn't introduce any errors). 2. If, after the app starts up (whether I exercise it or not), I shutdown Tomcat, remove the exact same stuff from Tomcat (WAR, exploded WAR, work/Catalina/localhost and logs), copy the WAR to webapps and startup Tomcat, there is NO (appreciable) delay, the app starts right up and runs. 3. The delay only occurs when the WAR file has changed. 4. If I reboot my machine, the first time I deploy a WAR, there is a minor delay (~15 seconds) between the deploy and the startup. Thanks for the tips on the thread dump. I will try to gather some info and post it. -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Tuesday, October 06, 2009 11:41 AM To: Tomcat Users List Subject: Re: Tomcat hangs for minutes between ContextConfig and StandardContext (Starting the app) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Christopher, On 10/6/2009 10:50 AM, Law, Christopher wrote: Hello, I'm running Tomcat 6.0.18 using Java 1.6.0_12 on Windows XP professional. I have a problem that occurs during startup deploying a WAR file. Tomcat deploys the WAR file but then there is a delay of minutes before it tries to start the application. During the delay, there is no CPU usage and there is no abnormal activity that I can detect. When Tomcat decides to start the application, it fires right up. It almost seems like Tomcat is blocked waiting for a reply from some request. It might be. Can you take a thread dump during this delay to see what is happening? http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_ running_webapp_.3F My guess is that you are using XML validation and you have a firewall that is preventing the JVM from contacting a remote server to fetch a DTD. Another possibility is that SecureRandom is taking forever to initialize: if your JVM is configured to use a blocking source of entropy, that may be the problem. This often happens in *NIX environments, but it appears that you are running on Microsoft Windows, so that's unlikely to be the problem. Any more information you can provide will certainly be helpful. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkrLZSQACgkQ9CaO5/Lv0PBTXgCfeVocP4clX5dBblkIKaBwrHkG rHAAn1klDppfjMEU+vA4wDQQqLsNryJP =Sfu+ -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