|
From: Jim E. <je...@fr...> - 2003-04-16 15:55:02
|
I've set up my wrapper to boot/shutdown from /etc/init.d and /etc/rc.d/rcNd using 'chkconfig: 2345 89 11' in the script and running chkconfig --add. Testing from the command line, the wrapper responds correctly to service start/stop commands. Here is the wrapper log produced from stop issued from the command line: INFO | jvm 1 | 2003/04/15 07:36:33 | Received a packet 103 : ping INFO | jvm 1 | 2003/04/15 07:36:33 | Send a packet 103 : ok DEBUG | wrapperp | 2003/04/15 07:36:33 | read a packet 103 : ok DEBUG | wrapper | 2003/04/15 07:36:33 | Got ping response from JVM STATUS | wrapper | 2003/04/15 07:36:36 | Shutting down. DEBUG | wrapper | 2003/04/15 07:36:36 | wrapperStopProcess(0) called. DEBUG | wrapper | 2003/04/15 07:36:36 | Sending stop signal to JVM DEBUG | wrapperp | 2003/04/15 07:36:36 | send a packet 101 : NULL INFO | jvm 1 | 2003/04/15 07:36:36 | Received a packet 101 : INFO | jvm 1 | 2003/04/15 07:36:36 | Thread, Wrapper-Connection, handling the shutdown process. INFO | jvm 1 | 2003/04/15 07:36:36 | calling listener.stop() INFO | jvm 1 | 2003/04/15 07:36:36 | WrapperSimpleApp: stop(0) INFO | jvm 1 | 2003/04/15 07:36:36 | returned from listener.stop() INFO | jvm 1 | 2003/04/15 07:36:36 | Send a packet 107 : 0 INFO | jvm 1 | 2003/04/15 07:36:36 | Closing socket. DEBUG | wrapperp | 2003/04/15 07:36:36 | read a packet 107 : 0 DEBUG | wrapper | 2003/04/15 07:36:36 | JVM signalled that it was stopped. DEBUG | wrapperp | 2003/04/15 07:36:36 | socket read no code (closed?). INFO | jvm 1 | 2003/04/15 07:36:36 | calling System.exit(0) INFO | jvm 1 | 2003/04/15 07:36:36 | 1198024 [Thread-9] INFO <com.franklinmead.runtime.OSS.StartedService> aborting INFO | jvm 1 | 2003/04/15 07:36:36 | 1198024 [Thread-9] DEBUG <com.franklinmead.runtime.OSS.StartedService> stopRequested = true INFO | jvm 1 | 2003/04/15 07:36:36 | 1198024 [Thread-9] DEBUG <com.franklinmead.runtime.OSS.StartedService> internalThread interrupted INFO | jvm 1 | 2003/04/15 07:36:36 | 1198025 [Thread-1] INFO <com.franklinmead.runtime.OSS.StartedService> aborting INFO | jvm 1 | 2003/04/15 07:36:36 | 1198025 [Thread-1] DEBUG <com.franklinmead.runtime.OSS.StartedService> stopRequested = true INFO | jvm 1 | 2003/04/15 07:36:37 | 1198074 [Thread-1] DEBUG <com.franklinmead.runtime.OSS.StartedService> internalThread interrupted INFO | jvm 1 | 2003/04/15 07:36:37 | 1198074 [Thread-3] INFO <com.franklinmead.runtime.OSS.StartedService> aborting INFO | jvm 1 | 2003/04/15 07:36:37 | 1198074 [Thread-3] DEBUG <com.franklinmead.runtime.OSS.StartedService> stopRequested = true INFO | jvm 1 | 2003/04/15 07:36:37 | 1198074 [Thread-3] DEBUG <com.franklinmead.runtime.OSS.StartedService> internalThread interrupted DEBUG | wrapper | 2003/04/15 07:36:37 | JVM exited normally. STATUS | wrapper | 2003/04/15 07:36:37 | <-- Wrapper Stopped The wrapper also starts at bootime in the order I expected. My problem is that the wrapper appears to not respond to the stop command when I issue shutdown -r now from the command line. I do not receive the "Stopping " message on the linux console, or any other message indicating the script has received a stop command. Instead the wrapper thread seems to be responding to the killall issued by linux and the end of shutdown. Here is the wrapper log from a shutdown -r now command: DEBUG | wrapperp | 2003/04/15 07:51:19 | read a packet 103 : ok DEBUG | wrapper | 2003/04/15 07:51:19 | Got ping response from JVM DEBUG | wrapperp | 2003/04/15 07:51:25 | send a packet 103 : ping INFO | jvm 1 | 2003/04/15 07:51:25 | Received a packet 103 : ping INFO | jvm 1 | 2003/04/15 07:51:25 | Send a packet 103 : ok DEBUG | wrapperp | 2003/04/15 07:51:25 | read a packet 103 : ok DEBUG | wrapper | 2003/04/15 07:51:25 | Got ping response from JVM STATUS | wrapper | 2003/04/15 07:51:27 | Shutting down. DEBUG | wrapper | 2003/04/15 07:51:27 | wrapperStopProcess(0) called. DEBUG | wrapper | 2003/04/15 07:51:27 | Sending stop signal to JVM DEBUG | wrapperp | 2003/04/15 07:51:27 | send a packet 101 : NULL INFO | jvm 1 | 2003/04/15 07:51:27 | Processing control event(WRAPPER_CTRL_SHUTDOWN_EVENT) INFO | jvm 1 | 2003/04/15 07:51:27 | WrapperSimpleApp: controlEvent(203) Ignored I'm not sure what I might have done wrong here. I created my script using the directions in the docs, but I did have to hard code the SCRIPT_DIR and SCRIPT variables, since they assumed the script was running from somewhere other then init.d... Is there some circumstance where linux will not issue the stop command to a kill script? I have other scripts that I've set up through chkconfig and they work fine? Any ideas? Jim |