RE: [Fwd: Catalina suspends for no reason?!?]
Howdy, >when you say 'sockets remain bound', do you mean the hexadecimal addresses? >how should I check these sockets? I mean the network sockets: use the netstat command to see if tomcat is still listening on ports (8005, 8080 by default). >Also, does anyone know a good CPU usage monitor for linux? You mean like the top command? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Catalina suspends for no reason?!?]
Hey Yoav, when you say 'sockets remain bound', do you mean the hexadecimal addresses? how should I check these sockets? Also, does anyone know a good CPU usage monitor for linux? Cheers S Shapira, Yoav wrote: Howdy, So do you have any idea whats going on? I don't have a good idea. It's strange they're all daemons. Does the CPU usage go way up when the JVM process is hung? Do the sockets remain bound? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Fwd: Catalina suspends for no reason?!?]
Howdy, >So do you have any idea whats going on? I don't have a good idea. It's strange they're all daemons. Does the CPU usage go way up when the JVM process is hung? Do the sockets remain bound? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Catalina suspends for no reason?!?]
So do you have any idea whats going on? S Shapira, Yoav wrote: Howdy, By address I assume you mean the hexademical numbers in the square brackets on the first line of each? Yes. 15 is a daemon, I've posted a few lines from each: Hmm, they're all daemons. How strange... Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Fwd: Catalina suspends for no reason?!?]
Howdy, >By address I assume you mean the hexademical numbers in the square >brackets on the first line of each? Yes. >15 is a daemon, I've posted a few lines from each: Hmm, they're all daemons. How strange... Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Catalina suspends for no reason?!?]
By address I assume you mean the hexademical numbers in the square brackets on the first line of each? 15 is a daemon, I've posted a few lines from each: "Thread-35" daemon prio=1 tid=0x08454c30 nid=0x38f7 waiting on condition [4f20a000..4f20c714] at sun.security.provider.MD5.engineUpdate(MD5.java:252) at sun.security.provider.MD5.finish(MD5.java:290) at sun.security.provider.MD5.engineDigest(MD5.java:303) -- "Thread-34" daemon prio=1 tid=0x08454098 nid=0x38f7 waiting for monitor entry [4f189000..4f18b714] at org.apache.catalina.session.ManagerBase.generateSessionId(ManagerBase.java:706) - waiting to lock <0x450432e0> (a org.apache.catalina.session.StandardManager) at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:584) -- "Thread-33" daemon prio=1 tid=0x080b3308 nid=0x38f7 waiting for monitor entry [4f108000..4f10a714] at org.apache.catalina.session.ManagerBase.generateSessionId(ManagerBase.java:706) - waiting to lock <0x450432e0> (a org.apache.catalina.session.StandardManager) at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:584) -- "Thread-32" daemon prio=1 tid=0x080b2790 nid=0x38f7 in Object.wait() [4f089000..4f089714] at java.lang.Object.wait(Native Method) - waiting on <0x44847bc8> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Object.wait(Object.java:429) -- "Thread-31" daemon prio=1 tid=0x080b0c98 nid=0x38f7 waiting on condition [4f008000..4f008714] at java.text.DateFormatSymbols.initializeData(DateFormatSymbols.java:468) at java.text.DateFormatSymbols.(DateFormatSymbols.java:103) at java.text.SimpleDateFormat.(SimpleDateFormat.java:442) -- "Thread-30" daemon prio=1 tid=0x080b00e0 nid=0x38f7 waiting for monitor entry [4ef85000..4ef87714] at sun.net.www.protocol.file.Handler.openConnection(Handler.java:54) - waiting to lock <0x44e41da8> (a sun.net.www.protocol.file.Handler) at java.net.URL.openConnection(URL.java:896) -- "Thread-29" daemon prio=1 tid=0x080af528 nid=0x38f7 runnable [4ef06000..4ef06714] at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:183) -- "Thread-28" daemon prio=1 tid=0x080aea28 nid=0x38f7 runnable [4ee85000..4ee85714] at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:183) -- "Thread-27" daemon prio=1 tid=0x080ac988 nid=0x38f7 waiting for monitor entry [4ee02000..4ee04714] at sun.net.www.protocol.file.Handler.openConnection(Handler.java:54) - waiting to lock <0x44e41da8> (a sun.net.www.protocol.file.Handler) at java.net.URL.openConnection(URL.java:896) -- "Thread-26" daemon prio=1 tid=0x080abeb0 nid=0x38f7 waiting for monitor entry [4ed81000..4ed83714] at sun.net.www.protocol.file.Handler.openConnection(Handler.java:54) - waiting to lock <0x44e41da8> (a sun.net.www.protocol.file.Handler) at java.net.URL.openConnection(URL.java:896) -- "Thread-25" daemon prio=1 tid=0x080c3000 nid=0x38f7 waiting for monitor entry [4ed0..4ed02714] at sun.net.www.protocol.file.Handler.openConnection(Handler.java:54) - waiting to lock <0x44e41da8> (a sun.net.www.protocol.file.Handler) at java.net.URL.openConnection(URL.java:896) -- "Thread-24" daemon prio=1 tid=0x080c2500 nid=0x38f7 waiting for monitor entry [4ec7f000..4ec81714] at sun.net.www.protocol.file.Handler.openConnection(Handler.java:54) - waiting to lock <0x44e41da8> (a sun.net.www.protocol.file.Handler) at java.net.URL.openConnection(URL.java:896) -- "Thread-23" daemon prio=1 tid=0x080c0680 nid=0x38f7 waiting for monitor entry [4ebfe000..4ec00714] at sun.net.www.protocol.file.Handler.openConnection(Handler.java:54) - waiting to lock <0x44e41da8> (a sun.net.www.protocol.file.Handler) at java.net.URL.openConnection(URL.java:896) -- "Thread-22" daemon prio=1 tid=0x080bfac8 nid=0x38f7 waiting for monitor entry [4eb7d000..4eb7f714] at sun.net.www.protocol.file.Handler.openConnection(Handler.java:54) - waiting to lock <0x44e41da8> (a sun.net.www.protocol.file.Handler) at java.net.URL.openConnection(URL.java:896) -- "Thread-21" daemon prio=1 tid=0x080bef30 nid=0x38f7 waiting for monitor entry [4eafc000..4eafe714] at sun.net.www.protocol.file.Handler.openConnection(Handler.java:54) - waiting to lock <0x44e41da8> (a sun.net.www.protocol.file.Handler) at java.net.URL.openConnection(URL.java:896) -- "Thread-20" daemon prio=1 tid=0x080be470 nid=0x38f7 waiting on condition [4ea7d000..4ea7d714] at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:1522) at
RE: [Fwd: Catalina suspends for no reason?!?]
Howdy, >The only thread that makes any sense to me, because it refers to a bit >of my own code, is thread number 15. I use my bean to download selected >files from one of several ftp mirrors. Is it a daemon thread? If you could post just the few lines of each thread in your dump (no need for the whole stack trace), that'd be interesting. Also look for two threads waiting on/locked on the same object address. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Catalina suspends for no reason?!?]
Well, Catalina did it again, suspended this weekend. But following Yoav's recommendation I ran './catalina.sh stop' and then did a 'kill -s SIGQUIT' on the JVM process and got this lovely long thread dump in my catalina.out. The only thread that makes any sense to me, because it refers to a bit of my own code, is thread number 15. I use my bean to download selected files from one of several ftp mirrors. But nothing else seems to make sense, is it ture that I shouldn't be using ftp from a bean? All the other threads were various parts of Java either 'waiting for a condition' or 'locked'... Cheers Sam "Thread-15" daemon prio=1 tid=0x085beba0 nid=0x38f7 waiting on condition [4e7f7000..4e7f8714] at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:119) at java.io.BufferedInputStream.read(BufferedInputStream.java:199) - locked <0x45152a48> (a java.io.BufferedInputStream) at sun.net.TransferProtocolClient.readServerResponse(TransferProtocolClient.java:49) at sun.net.ftp.FtpClient.readReply(FtpClient.java:211) at sun.net.ftp.FtpClient.openServer(FtpClient.java:424) at sun.net.ftp.FtpClient.(FtpClient.java:692) at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:175) - locked <0x45152ac8> (a sun.net.www.protocol.ftp.FtpURLConnection) at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:257) at edu.northwestern.monster.bean.UploadBean.pdbDownload(UploadBean.java:379) at edu.northwestern.monster.bean.UploadBean.doPost(UploadBean.java:298) at org.apache.jsp.monster_jsp._jspService(monster_jsp.java:81) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.jk.server.
RE: [Fwd: Catalina suspends for no reason?!?]
Howdy, >If I shut down Catalina and the process persists, then can I assume that >all the Catalina-associated threads have been shut down and what I'm >looking at are the persistent threads? Yeah, plus the JVM root threads (main, Finalizer, Event) that cannot shut down before your threads do. These are easily identified by name in the thread dump. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Catalina suspends for no reason?!?]
Howdy, My first problem is the definition of the JVM, i cant find it as a process in its own right, I can only find the process for catalina, sending a SIGQUIT to: /usr/local/j2sdk_nb/j2sdk1.4.2/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/j2sdk_nb/j2sdk1.4.2/lib/tools.jar:/usr/local/tomcat/bin/boot stra p.jar -Djava.security.manager -Djava.security.policy==/usr/local/tomcat/conf/catalina.policy -Dcatalina.base=/us This IS the JVM process, you've found it. Look in catalina.out for the thread dump. And there it is! Thanks Yoav, I'll check back next time Catalina hangs. If I shut down Catalina and the process persists, then can I assume that all the Catalina-associated threads have been shut down and what I'm looking at are the persistent threads? Thanks mucho S Sure enough, in its own little progam it prints out all the threads. But I obviously need to embed it in Catalina somewhere, should I create a bean that does this?? Wherever you want, e.g. a servlet you can invoke from a browser. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Fwd: Catalina suspends for no reason?!?]
Howdy, >My first problem is the definition of the JVM, i cant find it as a >process in its own right, I can only find the process for catalina, >sending a SIGQUIT to: > >/usr/local/j2sdk_nb/j2sdk1.4.2/bin/java >-Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath >/usr/local/j2sdk_nb/j2sdk1.4.2/lib/tools.jar:/usr/local/tomcat/bin/boot stra >p.jar >-Djava.security.manager >-Djava.security.policy==/usr/local/tomcat/conf/catalina.policy >-Dcatalina.base=/us This IS the JVM process, you've found it. Look in catalina.out for the thread dump. >Sure enough, in its own little progam it prints out all the threads. >But I obviously need to embed it in Catalina somewhere, should I create >a bean that does this?? Wherever you want, e.g. a servlet you can invoke from a browser. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Catalina suspends for no reason?!?]
Shapira, Yoav wrote: Howdy, So basically, I iknow this is off-topic for a tomcat-users page, but if I wanted to track down all the threads that are opened within the JVM at any one time, and the nature of the threads (ie Daemon etc.) and where they come from etc. can I do this? Sure. If you send a SIGQUIT to the JVM at any point, including when it appears hung, you will get a listing on your screen (or wherever you have stdout directed) of all the currently running JVM threads and what they're doing. I don't think that screen tells you if a given thread is a daemon. My first problem is the definition of the JVM, i cant find it as a process in its own right, I can only find the process for catalina, sending a SIGQUIT to: /usr/local/j2sdk_nb/j2sdk1.4.2/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/j2sdk_nb/j2sdk1.4.2/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar -Djava.security.manager -Djava.security.policy==/usr/local/tomcat/conf/catalina.policy -Dcatalina.base=/us isn't doing anything, but I cant seem to find the JVM process?? so i tried your alternative.. Alternatively, you can produce this information programmatically. I've posted code to the list in the past that does this (I think it was called SystemThreadList or something like that). It's a simple recursive approach: // Find root threadgroup Thread thisThread = Thread.currentThread(); ThreadGroup tg = thisThread.getThreadGroup(); while(tg.getParent() != null) { tg = tg.getParent(); } // Get all threads int estimate = 2 * tg.activeCount(); Thread[] allThreads = new Thread[estimate]; tg.enumerate(allThreads); Sure enough, in its own little progam it prints out all the threads. But I obviously need to embed it in Catalina somewhere, should I create a bean that does this?? Thanks Sam Now you list all threads, check daemon status, check the class (in case it's a specific subclass extending Thread that you're looking for), etc. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Fwd: Catalina suspends for no reason?!?]
Howdy, >So basically, I iknow this is off-topic for a tomcat-users page, but if >I wanted to track down all the threads that are opened within the JVM at >any one time, and the nature of the threads (ie Daemon etc.) and where >they come from etc. can I do this? Sure. If you send a SIGQUIT to the JVM at any point, including when it appears hung, you will get a listing on your screen (or wherever you have stdout directed) of all the currently running JVM threads and what they're doing. I don't think that screen tells you if a given thread is a daemon. Alternatively, you can produce this information programmatically. I've posted code to the list in the past that does this (I think it was called SystemThreadList or something like that). It's a simple recursive approach: // Find root threadgroup Thread thisThread = Thread.currentThread(); ThreadGroup tg = thisThread.getThreadGroup(); while(tg.getParent() != null) { tg = tg.getParent(); } // Get all threads int estimate = 2 * tg.activeCount(); Thread[] allThreads = new Thread[estimate]; tg.enumerate(allThreads); Now you list all threads, check daemon status, check the class (in case it's a specific subclass extending Thread that you're looking for), etc. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Catalina suspends for no reason?!?]
Hey, Catalina.sh shutdown connects to the shutdown port (8005 by default) and tells the server to shut down. Tomcat shuts down all its parts, and that includes destroying servlets, filters, listeners as mandated by the servlet specification. But tomcat does not call, for example, System.exit(), as that would break applications that embed tomcat. The JVM automatically shuts down daemon threads. Catalina hung again this morning, but specifically, after I shut down my netscape browser, with the Java Console open, with Ctrl-C. Im starting to realise that this is probably what is going on, the JVM is struggling to handle different threads, especially non-daemon threads, am I right? So basically, I iknow this is off-topic for a tomcat-users page, but if I wanted to track down all the threads that are opened within the JVM at any one time, and the nature of the threads (ie Daemon etc.) and where they come from etc. can I do this? I can then find out which are the threads that could be causing Catalina to hang...possibly.. Cheers S My second question as follows, what exactly do you mean by 'my application or 3rd party libraries it uses'? Are you saying that if I use some external jars in my web applications WEB-INF/lib/ directory, then I have to make sure their use is discontinued, seperately from catalina.sh?? IF they create non-daemon threads, and they provide shutdown methods, you have to call these methods. If they create daemon threads, or call their own shutdown methods (via finalizers for example), you don't need to worry about it. Same goes for your own code. Lastly, it seems as if making sure all threads are started as daemons is the best way to go but I dont know how to do that? If you're starting the thread yourself, call setDaemon(true) on it. If it's a 3rd party library, see above. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Fwd: Catalina suspends for no reason?!?]
Howdy, >I was under the impression that the start script first checks for >another Tomcat instance, and bails if it finds one. Is that not true? That's basically false. The startup code will try to bind to the ports specified in server.xml. If they're taken (by any program, tomcat or other), startup will fail with a BindException. No other checks for another tomcat instance are performed. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Fwd: Catalina suspends for no reason?!?]
Oops, please ignore... --mikej -=-- mike jackson [EMAIL PROTECTED] > -Original Message- > From: mike jackson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 04, 2004 1:45 PM > To: 'Tomcat Users List' > Subject: RE: [Fwd: Catalina suspends for no reason?!?] > > Orangevale is fine, my phone is either 916 987 3600 x0 or 916 212 2019. > > --mikej > -=-- > mike jackson > [EMAIL PROTECTED] > > > > > -Original Message- > > From: Josh Rehman [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, February 04, 2004 1:36 PM > > To: Tomcat Users List > > Subject: Re: [Fwd: Catalina suspends for no reason?!?] > > > > I was under the impression that the start script first checks for > > another Tomcat instance, and bails if it finds one. Is that not true? > > > > Sam Seaver wrote: > > > I have discovered something that may be in effect linked to my > previous > > > email, regard catalina.sh: > > > > > > I use `catalina.sh stop` and `catalina.sh start -security` to restart > > > the tomcat web server. > > > > > > However, I have come to realise that on occaison, the 'stop' command > > > does not work, and when I restart, I thereafter create two copies of > the > > > original tomcat. this should not be possible because the first tomcat > > > should be using the same port, and thus blocking the restart, but > > > somehow, the restart does happen?? > > > > > > When I stop the second process, then tomcat officially stops working, > > > even though the original process is still runnning. > > > > > > Has this happened to anyone else? > > > Thanks > > > Sam Seaver > > > > > > > > > Original Message > > > Subject: Catalina suspends for no reason?!? > > > Date: Wed, 04 Feb 2004 10:38:16 -0600 > > > From: Sam Seaver <[EMAIL PROTECTED]> > > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > > > To: [EMAIL PROTECTED] > > > > > > > > > > > > I have Catalina Tomcat 4.1.24 connected via jk2 to Httpd 2.0.47 on RH9. > > > > > > It seems every now and then, tomat just simply hangs. When I try to > > > shutdown the Catalina process via catalina.sh, it doesnt remove the > > > process?! So I have to 'kill -15' it, then start up catalina again. > > > > > > I get very little information as to what happened, but checking > jkstatus > > > I can see where the requests stopped in the scoreboard. It's hard to > > > tell sometimes, because httpd serves up the html pages just fine, but > > > its only when I try to access a *.jsp page that i realise catalina is > > > hanging again. > > > > > > The only errors I get are from httpd as listed below: > > > > > > [Wed Feb 04 09:37:47 2004] [error] msgAjp.receive(): Bad signature 00 > > > [Wed Feb 04 09:37:47 2004] [error] channelSocket.receive(): Bad header > > > [Wed Feb 04 09:37:47 2004] [error] workerEnv.processCallbacks() Error > > > reading reply > > > [Wed Feb 04 09:37:47 2004] [error] ajp13.service() ajpGetReply > > > recoverable error 12 > > > [Wed Feb 04 09:37:47 2004] [error] channelSocket.open() connect failed > > > 127.0.0.1:8009 111 Connection refused > > > [Wed Feb 04 09:37:47 2004] [error] ajp13.connect() failed > > > ajp13:localhost:8009 > > > [Wed Feb 04 09:37:47 2004] [error] ajp13.service() failed to connect > > > endpoint errno=111 Connection refused > > > > > > all these lines are repeated numerous times but at the exact same time, > > > to the second, when i tried accessing the JSP page. > > > > > > Previously, tomcat would hang on a sunday morning, and I disabled the > > > jk2 logging feature and it seems to fix this, but it has now since > > > hanged again. > > > > > > Does anyone have any idea what is happening? > > > thanks > > > Sam > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > > Thanks, > > Josh Rehman > > Citysearch Toolsdev, 3559 > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Fwd: Catalina suspends for no reason?!?]
Orangevale is fine, my phone is either 916 987 3600 x0 or 916 212 2019. --mikej -=-- mike jackson [EMAIL PROTECTED] > -Original Message- > From: Josh Rehman [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 04, 2004 1:36 PM > To: Tomcat Users List > Subject: Re: [Fwd: Catalina suspends for no reason?!?] > > I was under the impression that the start script first checks for > another Tomcat instance, and bails if it finds one. Is that not true? > > Sam Seaver wrote: > > I have discovered something that may be in effect linked to my previous > > email, regard catalina.sh: > > > > I use `catalina.sh stop` and `catalina.sh start -security` to restart > > the tomcat web server. > > > > However, I have come to realise that on occaison, the 'stop' command > > does not work, and when I restart, I thereafter create two copies of the > > original tomcat. this should not be possible because the first tomcat > > should be using the same port, and thus blocking the restart, but > > somehow, the restart does happen?? > > > > When I stop the second process, then tomcat officially stops working, > > even though the original process is still runnning. > > > > Has this happened to anyone else? > > Thanks > > Sam Seaver > > > > > > Original Message > > Subject: Catalina suspends for no reason?!? > > Date: Wed, 04 Feb 2004 10:38:16 -0600 > > From: Sam Seaver <[EMAIL PROTECTED]> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > > > > > > > I have Catalina Tomcat 4.1.24 connected via jk2 to Httpd 2.0.47 on RH9. > > > > It seems every now and then, tomat just simply hangs. When I try to > > shutdown the Catalina process via catalina.sh, it doesnt remove the > > process?! So I have to 'kill -15' it, then start up catalina again. > > > > I get very little information as to what happened, but checking jkstatus > > I can see where the requests stopped in the scoreboard. It's hard to > > tell sometimes, because httpd serves up the html pages just fine, but > > its only when I try to access a *.jsp page that i realise catalina is > > hanging again. > > > > The only errors I get are from httpd as listed below: > > > > [Wed Feb 04 09:37:47 2004] [error] msgAjp.receive(): Bad signature 00 > > [Wed Feb 04 09:37:47 2004] [error] channelSocket.receive(): Bad header > > [Wed Feb 04 09:37:47 2004] [error] workerEnv.processCallbacks() Error > > reading reply > > [Wed Feb 04 09:37:47 2004] [error] ajp13.service() ajpGetReply > > recoverable error 12 > > [Wed Feb 04 09:37:47 2004] [error] channelSocket.open() connect failed > > 127.0.0.1:8009 111 Connection refused > > [Wed Feb 04 09:37:47 2004] [error] ajp13.connect() failed > > ajp13:localhost:8009 > > [Wed Feb 04 09:37:47 2004] [error] ajp13.service() failed to connect > > endpoint errno=111 Connection refused > > > > all these lines are repeated numerous times but at the exact same time, > > to the second, when i tried accessing the JSP page. > > > > Previously, tomcat would hang on a sunday morning, and I disabled the > > jk2 logging feature and it seems to fix this, but it has now since > > hanged again. > > > > Does anyone have any idea what is happening? > > thanks > > Sam > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > Thanks, > Josh Rehman > Citysearch Toolsdev, 3559 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Catalina suspends for no reason?!?]
I was under the impression that the start script first checks for another Tomcat instance, and bails if it finds one. Is that not true? Sam Seaver wrote: I have discovered something that may be in effect linked to my previous email, regard catalina.sh: I use `catalina.sh stop` and `catalina.sh start -security` to restart the tomcat web server. However, I have come to realise that on occaison, the 'stop' command does not work, and when I restart, I thereafter create two copies of the original tomcat. this should not be possible because the first tomcat should be using the same port, and thus blocking the restart, but somehow, the restart does happen?? When I stop the second process, then tomcat officially stops working, even though the original process is still runnning. Has this happened to anyone else? Thanks Sam Seaver Original Message Subject: Catalina suspends for no reason?!? Date: Wed, 04 Feb 2004 10:38:16 -0600 From: Sam Seaver <[EMAIL PROTECTED]> Reply-To: Tomcat Users List <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] I have Catalina Tomcat 4.1.24 connected via jk2 to Httpd 2.0.47 on RH9. It seems every now and then, tomat just simply hangs. When I try to shutdown the Catalina process via catalina.sh, it doesnt remove the process?! So I have to 'kill -15' it, then start up catalina again. I get very little information as to what happened, but checking jkstatus I can see where the requests stopped in the scoreboard. It's hard to tell sometimes, because httpd serves up the html pages just fine, but its only when I try to access a *.jsp page that i realise catalina is hanging again. The only errors I get are from httpd as listed below: [Wed Feb 04 09:37:47 2004] [error] msgAjp.receive(): Bad signature 00 [Wed Feb 04 09:37:47 2004] [error] channelSocket.receive(): Bad header [Wed Feb 04 09:37:47 2004] [error] workerEnv.processCallbacks() Error reading reply [Wed Feb 04 09:37:47 2004] [error] ajp13.service() ajpGetReply recoverable error 12 [Wed Feb 04 09:37:47 2004] [error] channelSocket.open() connect failed 127.0.0.1:8009 111 Connection refused [Wed Feb 04 09:37:47 2004] [error] ajp13.connect() failed ajp13:localhost:8009 [Wed Feb 04 09:37:47 2004] [error] ajp13.service() failed to connect endpoint errno=111 Connection refused all these lines are repeated numerous times but at the exact same time, to the second, when i tried accessing the JSP page. Previously, tomcat would hang on a sunday morning, and I disabled the jk2 logging feature and it seems to fix this, but it has now since hanged again. Does anyone have any idea what is happening? thanks Sam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Josh Rehman Citysearch Toolsdev, 3559 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Fwd: Catalina suspends for no reason?!?]
Howdy, >so thought it's cut off, the process is exactly what catalina.sh >started, so why doesnt catalina.sh stop it? Catalina.sh shutdown connects to the shutdown port (8005 by default) and tells the server to shut down. Tomcat shuts down all its parts, and that includes destroying servlets, filters, listeners as mandated by the servlet specification. But tomcat does not call, for example, System.exit(), as that would break applications that embed tomcat. The JVM automatically shuts down daemon threads. >My second question as follows, what exactly do you mean by 'my >application or 3rd party libraries it uses'? Are you saying that if I >use some external jars in my web applications WEB-INF/lib/ directory, >then I have to make sure their use is discontinued, seperately from >catalina.sh?? IF they create non-daemon threads, and they provide shutdown methods, you have to call these methods. If they create daemon threads, or call their own shutdown methods (via finalizers for example), you don't need to worry about it. Same goes for your own code. >Lastly, it seems as if making sure all threads are started as daemons is >the best way to go but I dont know how to do that? If you're starting the thread yourself, call setDaemon(true) on it. If it's a 3rd party library, see above. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Fwd: Catalina suspends for no reason?!?]
Fantastic... but i dont quite get it, here's the command from catalina.sh: exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \ -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-4.0/catalina/src/share \ -Djava.security.manager \ -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ -Dcatalina.base="$CATALINA_BASE" \ -Dcatalina.home="$CATALINA_HOME" \ -Djava.io.tmpdir="$CATALINA_TMPDIR" \ org.apache.catalina.startup.Bootstrap "$@" start and here's the resulting process listed by `ps -efH | grep catalina`: monster 9665 1 0 15:02 pts/200:00:08 /usr/local/j2sdk_nb/j2sdk1.4.2/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/j2sdk_nb/j2sdk1.4.2/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar -Djava.security.manager -Djava.security.policy==/usr/local/tomcat/conf/catalina.pol so thought it's cut off, the process is exactly what catalina.sh started, so why doesnt catalina.sh stop it? My second question as follows, what exactly do you mean by 'my application or 3rd party libraries it uses'? Are you saying that if I use some external jars in my web applications WEB-INF/lib/ directory, then I have to make sure their use is discontinued, seperately from catalina.sh?? Lastly, it seems as if making sure all threads are started as daemons is the best way to go but I dont know how to do that? thanks Sam Seaver Shapira, Yoav wrote: Howdy, However, I have come to realise that on occaison, the 'stop' command does not work, and when I restart, I thereafter create two copies of the original tomcat. this should not be possible because the first tomcat should be using the same port, and thus blocking the restart, but somehow, the restart does happen?? When I stop the second process, then tomcat officially stops working, even though the original process is still runnning. Has this happened to anyone else? You likely have non-daemon threads that prevent the JVM from existing. Tomcat shuts its own threads down, including the listeners, so the ports are available for other processes, and you can start another tomcat. But the first JVM instance can't exit. You are responsible for shutting down threads started by your application or 3rd party libraries it uses. Alternatively, make all your threads daemons, or add shutdown code in a context listener or a JVM shutdown hook. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Fwd: Catalina suspends for no reason?!?]
Howdy, >However, I have come to realise that on occaison, the 'stop' command >does not work, and when I restart, I thereafter create two copies of the >original tomcat. this should not be possible because the first tomcat >should be using the same port, and thus blocking the restart, but >somehow, the restart does happen?? > >When I stop the second process, then tomcat officially stops working, >even though the original process is still runnning. > >Has this happened to anyone else? You likely have non-daemon threads that prevent the JVM from existing. Tomcat shuts its own threads down, including the listeners, so the ports are available for other processes, and you can start another tomcat. But the first JVM instance can't exit. You are responsible for shutting down threads started by your application or 3rd party libraries it uses. Alternatively, make all your threads daemons, or add shutdown code in a context listener or a JVM shutdown hook. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]