|
From: Elizabeth C. <ec...@er...> - 2005-12-05 17:41:18
|
I have tried using wrapper.on_exit.default=SHUTDOWN but the wrapper restarts automatically anyway when it receives an exit from the program. Is there a way to prevent the wrapper from restarting the application when we stop the application using an exit() in the program? I have searched through all the configuration parameters and I cannot find anything obvious. Here is some of what my configuration file contains: wrapper.single_invocation=TRUE wrapper.on_exit.default=SHUTDOWN wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp wrapper.java.classpath.1=../lib/wrapper.jar wrapper.java.classpath.2=../Test.jar wrapper.java.library.path.1=../lib wrapper.app.parameter.1=Test wrapper.ntservice.name=Test wrapper.ntservice.starttype=AUTO_START wrapper.ntservice.interactive=false |
|
From: Leif M. <le...@ta...> - 2005-12-08 03:02:34
|
Elizabeth,
What version of Java are you using? Java 1.2 has this problem due
to its lack of
support for Shutdown hooks, but newer JVMs should all work correctly by
default
when System.exit is called.
Could you please rerun your application with the wrapper.debug=true
property
set and then post the resulting wrapper.log file?
(Trim log entries from previous runs please.)
Remove the wrapper.on_exit.default and wrapper.single_invocation
properties.
They are not relevant here.
In the case of wrapper.on_exit.default, that is already the default
value.
The wrapper.single_invocation property is used to make sure that
more than
one invocation of the same application are never started even if they
are located
in different directories. Most applications will fail on startup due to
port conflicts
etc anyway, but this makes it possible to output a more useful error
message.
You are probably looking for the wrapper.max_failed_invocations
property.
But as I said, that should not be necessary so I would like to see what
is really
going on.
Cheers,
Leif
Elizabeth Cooper wrote:
> I have tried using
>
> wrapper.on_exit.default=SHUTDOWN
>
> but the wrapper restarts automatically anyway when it receives an exit
> from the program.
>
> Is there a way to prevent the wrapper from restarting the application
> when we stop the application using an exit() in the program?
>
> I have searched through all the configuration parameters and I cannot
> find anything obvious.
>
> Here is some of what my configuration file contains:
>
> wrapper.single_invocation=TRUE
> wrapper.on_exit.default=SHUTDOWN
> wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
>
> wrapper.java.classpath.1=../lib/wrapper.jar
>
> wrapper.java.classpath.2=../Test.jar
> wrapper.java.library.path.1=../lib
>
> wrapper.app.parameter.1=Test
>
> wrapper.ntservice.name=Test
> wrapper.ntservice.starttype=AUTO_START
> wrapper.ntservice.interactive=false
|
|
From: Elizabeth C. <ec...@er...> - 2005-12-08 05:16:19
|
Leif: I have added the wrapper log, below. The way this program works is that it has a built in timer that exits the program after 2 minutes. It started at 21:55 and exited about 2 minutes later. I deleted all the ping-ping stuff between the start and stop. I have commented out #wrapper.single_invocation=TRUE #wrapper.on_exit.default=SHUTDOWN in the configuration, but I made no other changes (other than wrapper.debug=true). You can see that the JVM restarted the application after it shut down. Any ideas about this? ----------- wrapper.log ----------- STATUS | wrapper | 2005/12/07 21:55:09 | --> Wrapper Started as Console DEBUG | wrapper | 2005/12/07 21:55:09 | Using system timer. DEBUG | wrapperp | 2005/12/07 21:55:09 | server listening on port 32000. STATUS | wrapper | 2005/12/07 21:55:09 | Launching a JVM... DEBUG | wrapper | 2005/12/07 21:55:09 | command: "..\..\..\bin\jre\bin\java" -Dergovu.jarwatcher=1 -Djava.library.path="../lib;../" -classpath "../lib/wrapper.jar;../ErgoVU.jar;../OPCServer.jar;../comm/comm.jar;../log4j.jar;../;./" -Dwrapper.key="EVeOhFsEDOU2ZKlt" -Dwrapper.port=32000 -Dwrapper.debug="TRUE" -Dwrapper.use_system_time="TRUE" -Dwrapper.version="3.1.2" -Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp com.ergotech.ergoviewer.ErgoViewer DEBUG | wrapper | 2005/12/07 21:55:09 | JVM started (PID=3776) INFO | jvm 1 | 2005/12/07 21:55:11 | WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader@e80a59 INFO | jvm 1 | 2005/12/07 21:55:11 | Wrapper Manager: JVM #1 INFO | jvm 1 | 2005/12/07 21:55:11 | Wrapper Manager: Registering shutdown hook INFO | jvm 1 | 2005/12/07 21:55:11 | Wrapper Manager: Using wrapper INFO | jvm 1 | 2005/12/07 21:55:11 | Loaded native library: wrapper.dll INFO | jvm 1 | 2005/12/07 21:55:11 | Calling native initialization method. INFO | jvm 1 | 2005/12/07 21:55:11 | Initializing WrapperManager native library. INFO | jvm 1 | 2005/12/07 21:55:11 | Java Executable: C:\ErgoTech\TransSECSOPCRB61_27May2005\bin\jre\bin\java.exe INFO | jvm 1 | 2005/12/07 21:55:11 | Windows version: 5.1.2600 INFO | jvm 1 | 2005/12/07 21:55:11 | Java Version : 1.4.2_04-b05 Java HotSpot(TM) Client VM INFO | jvm 1 | 2005/12/07 21:55:11 | Java VM Vendor : Sun Microsystems Inc. INFO | jvm 1 | 2005/12/07 21:55:11 | INFO | jvm 1 | 2005/12/07 21:55:11 | Wrapper (Version 3.1.2) http://wrapper.tanukisoftware.org INFO | jvm 1 | 2005/12/07 21:55:11 | INFO | jvm 1 | 2005/12/07 21:55:11 | WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp@10ef90c, args[]) called by thread: main INFO | jvm 1 | 2005/12/07 21:55:11 | Open socket to wrapper... INFO | jvm 1 | 2005/12/07 21:55:11 | Opened Socket INFO | jvm 1 | 2005/12/07 21:55:11 | Send a packet KEY : EVeOhFsEDOU2ZKlt INFO | jvm 1 | 2005/12/07 21:55:11 | handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=2928]) DEBUG | wrapperp | 2005/12/07 21:55:11 | accepted a socket from 127.0.0.1 on port 2928 DEBUG | wrapperp | 2005/12/07 21:55:11 | read a packet KEY : EVeOhFsEDOU2ZKlt DEBUG | wrapper | 2005/12/07 21:55:11 | Got key from JVM: EVeOhFsEDOU2ZKlt DEBUG | wrapperp | 2005/12/07 21:55:11 | send a packet LOW_LOG_LEVEL : 1 DEBUG | wrapperp | 2005/12/07 21:55:11 | send a packet PING_TIMEOUT : 30 DEBUG | wrapper | 2005/12/07 21:55:11 | Start Application. DEBUG | wrapperp | 2005/12/07 21:55:11 | send a packet START : start INFO | jvm 1 | 2005/12/07 21:55:11 | Received a packet LOW_LOG_LEVEL : 1 INFO | jvm 1 | 2005/12/07 21:55:11 | Wrapper Manager: LowLogLevel from Wrapper is 1 INFO | jvm 1 | 2005/12/07 21:55:11 | Received a packet PING_TIMEOUT : 30 INFO | jvm 1 | 2005/12/07 21:55:11 | Wrapper Manager: PingTimeout from Wrapper is 30000 INFO | jvm 1 | 2005/12/07 21:55:11 | Received a packet START : start INFO | jvm 1 | 2005/12/07 21:55:11 | calling listener.start() INFO | jvm 1 | 2005/12/07 21:55:11 | WrapperSimpleApp: start(args) INFO | jvm 1 | 2005/12/07 21:55:11 | WrapperSimpleApp: invoking main method INFO | jvm 1 | 2005/12/07 21:55:11 | ergovu.port:7116 INFO | jvm 1 | 2005/12/07 21:55:11 | synclock.timeout:0 INFO | jvm 1 | 2005/12/07 21:55:11 | htmlroot.dir:../htmlroot INFO | jvm 1 | 2005/12/07 21:55:11 | ergovu.fullscreen:false INFO | jvm 1 | 2005/12/07 21:55:11 | transsecs.deployOPC:1 INFO | jvm 1 | 2005/12/07 21:55:11 | servlet.port:7116 INFO | jvm 1 | 2005/12/07 21:55:11 | ergovu.jarwatcher:true INFO | jvm 1 | 2005/12/07 21:55:11 | debug.level:0 INFO | jvm 1 | 2005/12/07 21:55:11 | ergovu.dontscale:true INFO | jvm 1 | 2005/12/07 21:55:11 | ergovu.size:0 INFO | jvm 1 | 2005/12/07 21:55:11 | controller.classname:com.ergotech.ergoviewer.HeadlessController INFO | jvm 1 | 2005/12/07 21:55:11 | Executable "null" will be called to set the time INFO | jvm 1 | 2005/12/07 21:55:11 | ErgoVUController : bound INFO | jvm 1 | 2005/12/07 21:55:11 | Creation Date: Sep 6, 2005 2:52:11 PM INFO | jvm 1 | 2005/12/07 21:55:12 | [OPCServer.OPCServer > createServer( )]Dec 7, 2005 9:55:12 PM INFO | jvm 1 | 2005/12/07 21:55:12 | [OPCServer.OPCServer > OPCServer()]Dec 7, 2005 9:55:12 PM INFO | jvm 1 | 2005/12/07 21:55:13 | WrapperSimpleApp: start(args) end. Main Completed=false, exitCode=null INFO | jvm 1 | 2005/12/07 21:55:13 | returned from listener.start() INFO | jvm 1 | 2005/12/07 21:55:13 | Send a packet STARTED : DEBUG | wrapperp | 2005/12/07 21:55:13 | read a packet STARTED : DEBUG | wrapper | 2005/12/07 21:55:13 | JVM signalled that it was started. DEBUG | wrapperp | 2005/12/07 21:55:13 | send a packet PING : ping INFO | jvm 1 | 2005/12/07 21:55:13 | Received a packet PING : ping INFO | jvm 1 | 2005/12/07 21:55:13 | Send a packet PING : ok ... deleted all the ping transactions .... DEBUG | wrapperp | 2005/12/07 21:57:31 | send a packet PING : ping INFO | jvm 1 | 2005/12/07 21:57:32 | Received a packet PING : ping INFO | jvm 1 | 2005/12/07 21:57:32 | Send a packet PING : ok DEBUG | wrapperp | 2005/12/07 21:57:32 | read a packet PING : ok DEBUG | wrapper | 2005/12/07 21:57:32 | Got ping response from JVM INFO | jvm 1 | 2005/12/07 21:57:33 | Build Date:Tue Feb 15 17:08:25 2005 INFO | jvm 1 | 2005/12/07 21:57:33 | Creating UnilogServer StartedmanageOPCDAcat INFO | jvm 1 | 2005/12/07 21:57:33 | INFO | jvm 1 | 2005/12/07 21:57:33 | INFO | jvm 1 | 2005/12/07 21:57:33 | *** Eval Edition - Will time out in 2 minutes. *** INFO | jvm 1 | 2005/12/07 21:57:33 | DEBUG | wrapper | 2005/12/07 21:57:33 | JVM process exited with a code of 0, leaving the wrapper exit code set to 0. ERROR | wrapper | 2005/12/07 21:57:33 | JVM exited unexpectedly. DEBUG | wrapper | 2005/12/07 21:57:33 | JVM was only running for 143 seconds leading to a failed restart count of 1. DEBUG | wrapper | 2005/12/07 21:57:33 | Waiting 5 seconds before launching another JVM. STATUS | wrapper | 2005/12/07 21:57:37 | Launching a JVM... DEBUG | wrapper | 2005/12/07 21:57:37 | command: "..\..\..\bin\jre\bin\java" -Dergovu.jarwatcher=1 -Djava.library.path="../lib;../" -classpath "../lib/wrapper.jar;../ErgoVU.jar;../OPCServer.jar;../comm/comm.jar;../log4j.jar;../;./" -Dwrapper.key="UV3lZsP4vh9xaVkO" -Dwrapper.port=32000 -Dwrapper.debug="TRUE" -Dwrapper.use_system_time="TRUE" -Dwrapper.version="3.1.2" -Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=2 org.tanukisoftware.wrapper.WrapperSimpleApp com.ergotech.ergoviewer.ErgoViewer DEBUG | wrapper | 2005/12/07 21:57:37 | JVM started (PID=3096) INFO | jvm 2 | 2005/12/07 21:57:38 | WrapperManager class initialized by thread: main Using classloader: sun.misc.Launcher$AppClassLoader@e80a59 INFO | jvm 2 | 2005/12/07 21:57:38 | Wrapper Manager: JVM #2 INFO | jvm 2 | 2005/12/07 21:57:38 | Wrapper Manager: Registering shutdown hook INFO | jvm 2 | 2005/12/07 21:57:38 | Wrapper Manager: Using wrapper INFO | jvm 2 | 2005/12/07 21:57:38 | Loaded native library: wrapper.dll INFO | jvm 2 | 2005/12/07 21:57:38 | Calling native initialization method. INFO | jvm 2 | 2005/12/07 21:57:38 | Initializing WrapperManager native library. INFO | jvm 2 | 2005/12/07 21:57:38 | Java Executable: C:\ErgoTech\TransSECSOPCRB61_27May2005\bin\jre\bin\java.exe INFO | jvm 2 | 2005/12/07 21:57:38 | Windows version: 5.1.2600 INFO | jvm 2 | 2005/12/07 21:57:38 | Java Version : 1.4.2_04-b05 Java HotSpot(TM) Client VM INFO | jvm 2 | 2005/12/07 21:57:38 | Java VM Vendor : Sun Microsystems Inc. INFO | jvm 2 | 2005/12/07 21:57:38 | INFO | jvm 2 | 2005/12/07 21:57:38 | Wrapper (Version 3.1.2) http://wrapper.tanukisoftware.org INFO | jvm 2 | 2005/12/07 21:57:38 | INFO | jvm 2 | 2005/12/07 21:57:38 | WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp@10ef90c, args[]) called by thread: main INFO | jvm 2 | 2005/12/07 21:57:38 | Open socket to wrapper... INFO | jvm 2 | 2005/12/07 21:57:38 | Opened Socket INFO | jvm 2 | 2005/12/07 21:57:38 | Send a packet KEY : UV3lZsP4vh9xaVkO INFO | jvm 2 | 2005/12/07 21:57:38 | handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=2929]) DEBUG | wrapperp | 2005/12/07 21:57:38 | accepted a socket from 127.0.0.1 on port 2929 DEBUG | wrapperp | 2005/12/07 21:57:38 | read a packet KEY : UV3lZsP4vh9xaVkO DEBUG | wrapper | 2005/12/07 21:57:38 | Got key from JVM: UV3lZsP4vh9xaVkO DEBUG | wrapperp | 2005/12/07 21:57:38 | send a packet LOW_LOG_LEVEL : 1 DEBUG | wrapperp | 2005/12/07 21:57:38 | send a packet PING_TIMEOUT : 30 DEBUG | wrapper | 2005/12/07 21:57:38 | Start Application. DEBUG | wrapperp | 2005/12/07 21:57:38 | send a packet START : start INFO | jvm 2 | 2005/12/07 21:57:38 | Received a packet LOW_LOG_LEVEL : 1 INFO | jvm 2 | 2005/12/07 21:57:38 | Wrapper Manager: LowLogLevel from Wrapper is 1 INFO | jvm 2 | 2005/12/07 21:57:38 | Received a packet PING_TIMEOUT : 30 INFO | jvm 2 | 2005/12/07 21:57:38 | Wrapper Manager: PingTimeout from Wrapper is 30000 INFO | jvm 2 | 2005/12/07 21:57:38 | Received a packet START : start INFO | jvm 2 | 2005/12/07 21:57:38 | calling listener.start() INFO | jvm 2 | 2005/12/07 21:57:38 | WrapperSimpleApp: start(args) INFO | jvm 2 | 2005/12/07 21:57:38 | WrapperSimpleApp: invoking main method INFO | jvm 2 | 2005/12/07 21:57:38 | ergovu.port:7116 INFO | jvm 2 | 2005/12/07 21:57:38 | synclock.timeout:0 INFO | jvm 2 | 2005/12/07 21:57:38 | htmlroot.dir:../htmlroot INFO | jvm 2 | 2005/12/07 21:57:38 | ergovu.fullscreen:false INFO | jvm 2 | 2005/12/07 21:57:38 | transsecs.deployOPC:1 INFO | jvm 2 | 2005/12/07 21:57:38 | servlet.port:7116 INFO | jvm 2 | 2005/12/07 21:57:38 | ergovu.jarwatcher:true INFO | jvm 2 | 2005/12/07 21:57:38 | debug.level:0 INFO | jvm 2 | 2005/12/07 21:57:38 | ergovu.dontscale:true INFO | jvm 2 | 2005/12/07 21:57:38 | ergovu.size:0 INFO | jvm 2 | 2005/12/07 21:57:38 | controller.classname:com.ergotech.ergoviewer.HeadlessController INFO | jvm 2 | 2005/12/07 21:57:38 | Executable "null" will be called to set the time INFO | jvm 2 | 2005/12/07 21:57:38 | ErgoVUController : bound INFO | jvm 2 | 2005/12/07 21:57:38 | Creation Date: Sep 6, 2005 2:52:11 PM INFO | jvm 2 | 2005/12/07 21:57:39 | [OPCServer.OPCServer > createServer( )]Dec 7, 2005 9:57:39 PM INFO | jvm 2 | 2005/12/07 21:57:39 | [OPCServer.OPCServer > OPCServer()]Dec 7, 2005 9:57:39 PM INFO | jvm 2 | 2005/12/07 21:57:40 | WrapperSimpleApp: start(args) end. Main Completed=false, exitCode=null INFO | jvm 2 | 2005/12/07 21:57:40 | returned from listener.start() INFO | jvm 2 | 2005/12/07 21:57:40 | Send a packet STARTED : DEBUG | wrapperp | 2005/12/07 21:57:40 | read a packet STARTED : DEBUG | wrapper | 2005/12/07 21:57:40 | JVM signalled that it was started. DEBUG | wrapperp | 2005/12/07 21:57:40 | send a packet PING : ping INFO | jvm 2 | 2005/12/07 21:57:40 | Received a packet PING : ping INFO | jvm 2 | 2005/12/07 21:57:40 | Send a packet PING : ok DEBUG | wrapperp | 2005/12/07 21:57:40 | read a packet PING : ok DEBUG | wrapper | 2005/12/07 21:57:40 | Got ping response from JVM DEBUG | wrapperp | 2005/12/07 21:57:44 | send a packet PING : ping INFO | jvm 2 | 2005/12/07 21:57:44 | Received a packet PING : ping INFO | jvm 2 | 2005/12/07 21:57:44 | Send a packet PING : ok DEBUG | wrapperp | 2005/12/07 21:57:44 | read a packet PING : ok DEBUG | wrapper | 2005/12/07 21:57:44 | Got ping response from JVM INFO | jvm 2 | 2005/12/07 21:57:45 | Got Control Signal 2->201 INFO | jvm 2 | 2005/12/07 21:57:45 | Handled signal INFO | jvm 2 | 2005/12/07 21:57:45 | Processing control event(WRAPPER_CTRL_CLOSE_EVENT) INFO | jvm 2 | 2005/12/07 21:57:45 | WrapperSimpleApp: controlEvent(201) Stopping INFO | jvm 2 | 2005/12/07 21:57:45 | WrapperManager.stop(0) called by thread: Wrapper-Control-Event-Monitor INFO | jvm 2 | 2005/12/07 21:57:45 | Send a packet STOP : 0 DEBUG | wrapperp | 2005/12/07 21:57:45 | read a packet STOP : 0 DEBUG | wrapper | 2005/12/07 21:57:45 | JVM requested a shutdown. (0) DEBUG | wrapper | 2005/12/07 21:57:45 | wrapperStopProcess(0) called. DEBUG | wrapper | 2005/12/07 21:57:45 | Sending stop signal to JVM DEBUG | wrapperp | 2005/12/07 21:57:45 | send a packet STOP : NULL INFO | jvm 2 | 2005/12/07 21:57:45 | Received a packet STOP : INFO | jvm 2 | 2005/12/07 21:57:46 | Thread, Wrapper-Control-Event-Monitor, handling the shutdown process. INFO | jvm 2 | 2005/12/07 21:57:46 | calling listener.stop() INFO | jvm 2 | 2005/12/07 21:57:46 | WrapperSimpleApp: stop(0) INFO | jvm 2 | 2005/12/07 21:57:46 | returned from listener.stop() INFO | jvm 2 | 2005/12/07 21:57:46 | Send a packet STOPPED : 0 DEBUG | wrapperp | 2005/12/07 21:57:46 | read a packet STOPPED : 0 DEBUG | wrapper | 2005/12/07 21:57:46 | JVM signalled that it was stopped. INFO | jvm 2 | 2005/12/07 21:57:47 | Closing socket. INFO | jvm 2 | 2005/12/07 21:57:47 | Closed socket: java.net.SocketException: socket closed DEBUG | wrapperp | 2005/12/07 21:57:47 | socket read no code (closed?). INFO | jvm 2 | 2005/12/07 21:57:47 | Server daemon shut down INFO | jvm 2 | 2005/12/07 21:57:47 | calling System.exit(0) INFO | jvm 2 | 2005/12/07 21:57:47 | Build Date:Tue Feb 15 17:08:25 2005 INFO | jvm 2 | 2005/12/07 21:57:47 | Creating UnilogServer StartedmanageOPCDAcat INFO | jvm 2 | 2005/12/07 21:57:47 | INFO | jvm 2 | 2005/12/07 21:57:47 | INFO | jvm 2 | 2005/12/07 21:57:47 | *** Eval Edition - Will time out in 2 minutes. *** INFO | jvm 2 | 2005/12/07 21:57:47 | STATUS | wrapper | 2005/12/07 21:57:47 | CTRL-C trapped. Forcing immediate shutdown. DEBUG | wrapper | 2005/12/07 21:57:47 | JVM process exited with a code of 0, leaving the wrapper exit code set to 0. INFO | wrapper | 2005/12/07 21:57:47 | JVM exited on its own while waiting to kill the application. STATUS | wrapper | 2005/12/07 21:57:48 | <-- Wrapper Stopped At 08:02 PM 12/7/2005, you wrote: >Elizabeth, > What version of Java are you using? Java 1.2 has this problem due to > its lack of >support for Shutdown hooks, but newer JVMs should all work correctly by >default >when System.exit is called. > > Could you please rerun your application with the wrapper.debug=true > property >set and then post the resulting wrapper.log file? >(Trim log entries from previous runs please.) > > Remove the wrapper.on_exit.default and wrapper.single_invocation > properties. >They are not relevant here. > > In the case of wrapper.on_exit.default, that is already the default value. > > The wrapper.single_invocation property is used to make sure that more than >one invocation of the same application are never started even if they are >located >in different directories. Most applications will fail on startup due to >port conflicts >etc anyway, but this makes it possible to output a more useful error message. > > You are probably looking for the wrapper.max_failed_invocations property. >But as I said, that should not be necessary so I would like to see what is >really >going on. > >Cheers, >Leif > >Elizabeth Cooper wrote: >>I have tried using >> >>wrapper.on_exit.default=SHUTDOWN >> >>but the wrapper restarts automatically anyway when it receives an exit >>from the program. >> >>Is there a way to prevent the wrapper from restarting the application >>when we stop the application using an exit() in the program? >> >>I have searched through all the configuration parameters and I cannot >>find anything obvious. >> >>Here is some of what my configuration file contains: >> >>wrapper.single_invocation=TRUE >>wrapper.on_exit.default=SHUTDOWN >>wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp >> >>wrapper.java.classpath.1=../lib/wrapper.jar >> >>wrapper.java.classpath.2=../Test.jar >>wrapper.java.library.path.1=../lib >> >>wrapper.app.parameter.1=Test >> >>wrapper.ntservice.name=Test >>wrapper.ntservice.starttype=AUTO_START >>wrapper.ntservice.interactive=false > > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >_______________________________________________ >Wrapper-user mailing list >Wra...@li... >https://lists.sourceforge.net/lists/listinfo/wrapper-user Elizabeth Cooper ErgoTech Systems, Inc. |
|
From: Leif M. <le...@ta...> - 2005-12-08 05:59:11
|
Elizabeth,
Yes, as I thought, it appears that the shutdown hook is not being
run when your
application calls System.exit. I did a Google search and am not yet
sure how this
could be happening as you are using java 1.4.2... :-/ From the logs, I
can see that
the wrapper's shutdown hook is indeed being registered:
INFO | jvm 1 | 2005/12/07 21:55:11 | Wrapper Manager: Registering
shutdown hook
Any idea on your end? I have never seen this in any JVM other than
old 1.2
versions. I'll post back if I find anything.
As a workaround, calling WrapperManager.stop() rather than System.exit()
will make sure the JVM exits correctly.
The problem is that if the JVM exits without its shutdown hook being
run, or if
the user code calls System.halt() then the Wrapper process will assume
that the
JVM crashed. This is why it is being restarted.
Cheers,
Leif
Elizabeth Cooper wrote:
> Leif:
>
> I have added the wrapper log, below.
>
> The way this program works is that it has a built in timer that exits
> the program after 2 minutes. It started at 21:55 and exited about 2
> minutes later. I deleted all the ping-ping stuff between the start and
> stop.
>
> I have commented out
> #wrapper.single_invocation=TRUE
> #wrapper.on_exit.default=SHUTDOWN
>
> in the configuration, but I made no other changes (other than
> wrapper.debug=true).
>
> You can see that the JVM restarted the application after it shut down.
>
> Any ideas about this?
>
> ----------- wrapper.log -----------
>
<snip>
|