|
From: Gary H. <ghi...@fe...> - 2007-06-04 20:30:22
|
Hi Leif, Thank you for you very prompt and courteous reply. Setting the wrapper.ntservice.console=3Dtrue property solved the DUMP problem, and should work fine for us, assuming there are no other side effects. Out of curiosity, however, do you have a rough estimate of when 3.3.0 will be made available? Regarding the STOP issue, setting wrapper.debug=3Dtrue was a big help = (see output below). If I understand the output correctly, Tomcat (the Java app that we are wrapping) is calling System.exit() from the method that we hooked up to the STOP command via the WrapperStartStopApp class. =20 Thanks, Gary STATUS | wrapper | 2007/06/04 13:17:57 | Command 'STOP'. Shutting down with exit code 0. DEBUG | wrapper | 2007/06/04 13:17:57 | wrapperStopProcess(0) called. DEBUG | wrapper | 2007/06/04 13:17:57 | Sending stop signal to JVM DEBUG | wrapperp | 2007/06/04 13:17:57 | send a packet STOP : NULL INFO | jvm 1 | 2007/06/04 13:17:57 | Received a packet STOP :=20 INFO | jvm 1 | 2007/06/04 13:17:57 | Thread, Wrapper-Connection, handling the shutdown process. INFO | jvm 1 | 2007/06/04 13:17:57 | calling listener.stop() INFO | jvm 1 | 2007/06/04 13:17:57 | Waiting for WrapperListener.stop runner thread to complete. INFO | jvm 1 | 2007/06/04 13:17:57 | WrapperListener.stop runner thread started. INFO | jvm 1 | 2007/06/04 13:17:57 | Jun 4, 2007 1:17:57 PM org.apache.coyote.http11.Http11BaseProtocol pause INFO | jvm 1 | 2007/06/04 13:17:57 | INFO: Pausing Coyote HTTP/1.1 on http-7101 INFO | jvm 1 | 2007/06/04 13:17:58 | Jun 4, 2007 1:17:58 PM org.apache.catalina.core.StandardService stop INFO | jvm 1 | 2007/06/04 13:17:58 | INFO: Stopping service FetchAgentRunnerServer INFO | jvm 1 | 2007/06/04 13:17:58 | Jun 4, 2007 1:17:58 PM org.apache.coyote.http11.Http11BaseProtocol destroy INFO | jvm 1 | 2007/06/04 13:17:58 | INFO: Stopping Coyote HTTP/1.1 on http-7101 INFO | jvm 1 | 2007/06/04 13:17:58 | WrapperStartStopApp: start main method completed INFO | jvm 1 | 2007/06/04 13:17:59 | WrapperListener.stop runner thread stopped. INFO | jvm 1 | 2007/06/04 13:17:59 | returned from listener.stop() -> 0 INFO | jvm 1 | 2007/06/04 13:17:59 | shutdownJVM(0) Thread:Wrapper-Connection INFO | jvm 1 | 2007/06/04 13:17:59 | Wrapper Manager: Unable to unregister shutdown hook: java.lang.IllegalStateException: Shutdown in progress INFO | jvm 1 | 2007/06/04 13:17:59 | Send a packet STOPPED : 0 INFO | jvm 1 | 2007/06/04 13:17:59 | Wrapper Manager: ShutdownHook started INFO | jvm 1 | 2007/06/04 13:17:59 | WrapperManager.stop(0) called by thread: Wrapper-Shutdown-Hook INFO | jvm 1 | 2007/06/04 13:17:59 | Thread, Wrapper-Shutdown-Hook, waiting for the JVM to exit. INFO | jvm 1 | 2007/06/04 13:17:59 | System.exit appears to have been called from within the INFO | jvm 1 | 2007/06/04 13:17:59 | WrapperListener.stop() method. If possible the application INFO | jvm 1 | 2007/06/04 13:17:59 | should be modified to avoid this behavior. INFO | jvm 1 | 2007/06/04 13:17:59 | To avoid a deadlock, this thread will only wait 5 seconds INFO | jvm 1 | 2007/06/04 13:17:59 | for the application to shutdown. This may result in the INFO | jvm 1 | 2007/06/04 13:17:59 | application failing to shutdown completely before the JVM INFO | jvm 1 | 2007/06/04 13:17:59 | exists. Removing the offending System.exit call will INFO | jvm 1 | 2007/06/04 13:17:59 | resolve this. DEBUG | wrapperp | 2007/06/04 13:17:59 | read a packet STOPPED : 0 DEBUG | wrapper | 2007/06/04 13:17:59 | JVM signalled that it was stopped. INFO | jvm 1 | 2007/06/04 13:17:59 | Closing socket. DEBUG | wrapperp | 2007/06/04 13:17:59 | socket read no code (closed?). DEBUG | wrapperp | 2007/06/04 13:17:59 | server listening on port 32001. INFO | jvm 1 | 2007/06/04 13:18:00 | calling System.exit(0) INFO | jvm 1 | 2007/06/04 13:18:00 | Send a packet STOPPED : 0 INFO | jvm 1 | 2007/06/04 13:18:00 | Wrapper Manager: ShutdownHook complete DEBUG | wrapper | 2007/06/04 13:18:00 | JVM process exited with a code of 0, leaving the wrapper exit code set to 0. DEBUG | wrapper | 2007/06/04 13:18:00 | JVM exited normally. STATUS | wrapper | 2007/06/04 13:18:00 | <-- Wrapper Stopped -----Original Message----- From: wra...@li... [mailto:wra...@li...] On Behalf Of Leif Mortenson Sent: Monday, June 04, 2007 6:02 AM To: wra...@li... Subject: Re: [Wrapper-user] Trouble using wrapper.commandfile property to generate a thread dump Gary, This is a known problem that has been fixed for the 3.3.0 release. The problem is that a dump signal can not be sent from a process which does not have a console as is the case with services. For now, you can work around the problem by setting the wrapper.ntservice.console=3Dtrue property. This will cause a console window to be created, but you will not see it unless the wrapper.ntservice.interactive property is also set to true. Another workaround is to set the wrapper.request_thread_dump_on_failed_jvm_exit=3Dtrue Let me know if this works for you. I will need more information to tell you why you are getting that error on shutdown. Set the wrapper.debug=3Dtrue property and post the output. Cheers, Leif Gary Hirschhorn wrote: > > I am trying to use the wrapper.commandfile property to generate a=20 > thread dump when running as an NT Service, but I am getting the error=20 > message below in the log files. If I try to stop the service instead,=20 > the service does stop, but I get error messages indicating that it=20 > could not stop cleanly. Does anyone know why this would happen and=20 > how I can generate a thread dump? I have included my configuration=20 > properties file below. > > Thank you very much for any help. > > > STATUS | wrapper | 2007/06/04 03:20:32 | Command 'DUMP'. Requesting a > Thread Dump. > STATUS | wrapper | 2007/06/04 03:20:32 | Dumping JVM state. > ERROR | wrapper | 2007/06/04 03:20:32 | Unable to send BREAK event=20 > to JVM process. Err(6 : The handle is invalid. (0x6)) > > > STATUS | wrapper | 2007/06/04 03:24:12 | Command 'STOP'. Shutting=20 > down with exit code 0. > INFO | jvm 1 | 2007/06/04 03:24:13 | Jun 4, 2007 3:24:12 AM=20 > org.apache.coyote.http11.Http11BaseProtocol pause > INFO | jvm 1 | 2007/06/04 03:24:13 | INFO: Pausing Coyote=20 > HTTP/1.1 on http-7101 > INFO | jvm 1 | 2007/06/04 03:24:13 | Jun 4, 2007 3:24:13 AM=20 > org.apache.catalina.core.StandardService stop > INFO | jvm 1 | 2007/06/04 03:24:13 | INFO: Stopping service=20 > FetchAgentRunnerServer > ERROR | wrapper | 2007/06/04 03:24:50 | Shutdown failed: Timed out=20 > waiting for signal from JVM. > ERROR | wrapper | 2007/06/04 03:24:50 | JVM did not exit on request, > terminated > STATUS | wrapper | 2007/06/04 03:24:51 | <-- Wrapper Stopped > ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |