|
From: Markus S. <sc...@gm...> - 2007-12-19 10:24:18
|
Hi We have encountered a problem with service wrapper (3.2 and 3.3). We use the WrapperSimpleApp as integration method. We have registred our own Shutdown hook. When we stop the service using the service mgmt console, some parts of the Shutdown hook runs, but the vm is being terminated before the shutdownhook is finished. See the logfile using the debug-option: wrapper | 2007/12/19 10:49:49 | SERVICE_CONTROL_STOP wrapper | 2007/12/19 10:49:49 | wrapperStopProcess(0) called. jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Received a packet SERVICE_CONTROL_CODE : 1 jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: ServiceControlCode from Wrapper with code 1 wrapper | 2007/12/19 10:49:49 | Sending stop signal to JVM wrapperp | 2007/12/19 10:49:49 | send a packet STOP : NULL jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Received a packet STOP : jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Thread, Wrapper-Connection, handling the shutdown process. jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: calling listener.stop () jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Waiting for WrapperListener.stop runner thread to complete. jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: WrapperListener.stoprunner thread started. jvm 1 | 2007/12/19 10:49:49 | WrapperSimpleApp Debug: stop(0) jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: WrapperListener.stoprunner thread stopped. jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: returned from listener.stop() -> 0 jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: shutdownJVM(0) Thread:Wrapper-Connection jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Send a packet STOPPED : 0 wrapperp | 2007/12/19 10:49:49 | read a packet STOPPED : 0 wrapper | 2007/12/19 10:49:49 | JVM signalled that it was stopped. jvm 1 | 2007/12/19 10:49:49 | WrapperManager Debug: Closing socket. wrapperp | 2007/12/19 10:49:49 | socket read no code (closed?). wrapperp | 2007/12/19 10:49:49 | server listening on port 32001. jvm 1 | 2007/12/19 10:49:50 | WrapperManager Debug: calling System.exit (0) -->this is our shutdown hook now jvm 1 | 2007/12/19 10:49:50 | (Log INFO): Shutdown hook called jvm 1 | 2007/12/19 10:49:50 | (Log INFO): Stop Server jvm 1 | 2007/12/19 10:49:50 | (Log INFO): Wenn der Server eine grosse Anzahl Daten sichern muss, kann dies eine Weile dauern... jvm 1 | 2007/12/19 10:49:50 | (Log INFO): All cabinets closed. jvm 1 | 2007/12/19 10:49:50 | (Log INFO): Stop services... -->this was the last message of our shutdown hook, but there shuld come more than that... wrapper | 2007/12/19 10:49:50 | JVM process exited with a code of 0, leaving the wrapper exit code set to 0. wrapper | 2007/12/19 10:49:50 | JVM exited normally. wrapper | 2007/12/19 10:49:50 | <-- Wrapper Stopped It seems to me, that our Shutdown hook is interrupted by the exit of the VM. Also the log is not always exactly the same, sometimes our shutdown hook has no time to start running at all. Is this exit of the VM caused by the wrapper? Is this a bug? I think the documentation on the website for integration method 1 is wrong when you look at the behavior above. Thanks Markus |